How to solve and plot a 2nd oder differenetial equation?

10 views (last 30 days)
i have already done the solving part but i am stuck on the plotting.Here is the question
Find a 2 pi periodic solution to the equation x''+2x'+x=cos(t)
Also find the solution to x''+2x'+x=cos(t), x(0)=x'(0)=0
and verify that it approaches the periodic solution as t grows
Here is what i wrote on matlab
syms t xt
xt=dsolve('D2x+2*Dx+1*x=cos(t)','x(0)=Dx(0)=0')
please help for the question and the plot if it has to be between time period / limits

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!