The Equation of motion for the standard mass-spring-dampersystem is
MẠ+ Bẋ + Kx = f(t).
Given the parameters {M = 2kg, B = 67.882 N-s/m, K = 400 N/m},determine the free response of the system to initial conditions {x0 = -1m, v0 = 40 m/s}. To help verify thecorrectness of your answer, a plot of x(t) should go through thecoordinates {t, x(t)} = {.015, -0.5141} and {t, x(t)} = 0.03,-0.2043}.
Numerically simulate the response of the system using the Matlabfunction ode45. Plot the displacement of the mass as afunction of time for the first 0.5s. Use a time-resolution of0.001s (have ode45 return values of x(t) at 1msintervals). This plot should be a solid black line with aLineWidth of 3.
“Hold†the plot and superimpose the two points listed above (thetwo {t, x(t)} pairs). Use red circles to show those points. Makethe circles’ Markersize of 10 and LineWidth of3.
Determine the exact analytic (“handâ€) solution to the problem.Use Matlab to calculate the values of that solution at 0.05s timesteps. Superimpose that data on top of the numerical solution (andthe two red circles) using blue diamonds with the sameMarkersize and LineWidth parameters as for thecircles.