Need help solving non-homogeneous ODE: d^2(y)/dt^2 + y = -cos(t), y(0) = 1, y'(0) = 0

lukaszskowron96

New member
Joined
Oct 16, 2018
Messages
1
Hi, the non-homogeneous ODE I have to solve is this:

d^2(y)/dt^2 + y = -cos(t) with y(0) = 1 and y'(0) = 0

Here's the procedure I applied.

1) Find the complimentary function of homogeneous ODE:

d^2(y)/dt^2 + y = 0

It's a simple harmonic oscillator, so the solution is:

y_CF = A*cos(t) + B*sin(t) = 0 using the BCs

2) Find the particular integral:

d^2(y)/dt^2 + y = -cos(t)

and here I don't understand why the y_PI = A*x*sin(t) + B*x*cos(t) ??

The rest of the solution process is trivial.
 
and here I don't understand why the y_PI = A*x*sin(t) + B*x*cos(t) ??
You mean y_PI = A*t*sin(t) + B*t*cos(t)

And your initial guess must have been y_PI = A*sin(t) + B*cos(t)

Well it is a very difficult question you asked there! But you can treat the particular solution of your initial guess like if it is one of the repeated roots.

I am sure that you remember what to do when the characteristic equation has repeated roots, like this:

\(\displaystyle (r - 2)(r - 2) = 0\)

\(\displaystyle y(t) = c_1e^{2t} + c_2te^{2t}\)

You would multiply one of the terms by \(\displaystyle t\).

Now do the same to your differential equation solution.

\(\displaystyle y(t) = y(t)_{CF} + t*y(t)_{PI}\)
 
Top