How to find a 2 π periodic solution for the Equation?; x" + 2 x' + x =cos(t)
Also I need to find the solution to: x" + 2 x' + x =cos(t), x(0)=x'(0)=0
finally I need to plot the graph. Thanks for you help
Best Answer
The first approach is to use the Symbolic Math Toolbox(See documentation). In order to solve the differential equation x" + 2 x' + x =cos(t), you can use the functiondsolve(See documentation for dsolve). For example,
>> syms x(t);
>> sol = dsolve('D2x+2*Dx+x = cos(t)', 't');
For the one with boundary conditions x" + 2 x' + x =cos(t), x(0)=x'(0)=0, you can try
Alternatively, you may want to consider numerical ordinary differential equation solvers, such as ode45(See Documentation). Take a look at Examples 2 and 3 in the documentation. Example 2 shows how to handle higher order terms and Example 3 illustrates how to deal with time-varying terms.
Best Answer