Given:
where
With initial conditions:
Find the overall solution for and plot these solutions on the interval from
First we find the homogeneous solution to the ODE:
The characteristic equation is:
Then,
Therefore the homogeneous solution is:
Now to find the particulate solution
For n=4
We can then use a matrix to organize the known coefficients:
Then, using MATLAB and the backlash operator we can solve for these unknowns:
Therefore
Superposing the homogeneous and particulate solution we get
Differentiating:
Evaluating at the initial conditions:
We obtain:
Finally we have:
For n=7
We can then use a matrix to organize the known coefficients:
Then, using MATLAB and the backlash operator we can solve for these unknowns:
Therefore
Superposing the homogeneous and particulate solution we get
Differentiating:
Evaluating at the initial conditions:
We obtain: