Consider the damped oscillation model of a car suspension system,
consisting of a mass m = 300 kg attached to a spring with stiffness k =
20,000 N/m and a damper with a viscous friction coefficient c = 1,000 Ns/m.
The state of the system is described by the system of differential equations:
' −k ⋅ x ( t ) −c ⋅ y ( t )
x ( t )= y ( t ) (representing velocity) and y (t )=
'
(representing
m
acceleration), where x(t) is the displacement and y(t) is the velocity. At the
initial time t0 = 0, the object is displaced from the equilibrium position by a
distance of x(0) = 0.1 m and released with an initial velocity of y(0) = 0 m/s.
Use the 4th-order Runge-Kutta method with a step size of h = 0.5 to
approximate the position and velocity of the object in the time interval from t
= 0 to t = 2.0 s