A forced damped spring-mass system (Fig. P28.47) has the following ordinary diff
ID: 3767355 • Letter: A
Question
A forced damped spring-mass system (Fig. P28.47) has the following ordinary differential equation of motion: md^2x/dt^2 + a|dx/dt|dx/dt + kx = F sin (omegat) where x displacement from the equilibrium position, t - lime. m = 2 kg mass, a = 5 N/(m/s)2. and k = 6 N/m. The (Limping term is nonlinear and represents air damping. The forcing function F, sin(omegat) has values of F_n = 2.5 N and omega = 0.5 rad/sec. The initial conditions are Solve this equation using a numerical method over the time period 0Explanation / Answer
%function t=t(n,t0,t1,y0)
function y=y(n,t0,t1,y0)
h=(t1-t0)/n;
t(1)=t0;
y(1)=y0;
for i=1:n
t(i+1)=t(i)+h;
y(i+1)=y(i)+h*ex(t(i),y(i));
end;
V=[t',y']
plot(t,y)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.