# Solving a 2nd order differential with fixed constant

1. Nov 1, 2012

### th3chemist

The question is to solve the equation y'' + ω^2y = cos(ωt)

I know you'll find the complementary and particular functions and add them together.
Now I found the complementary function easily. r= +/- ωi and then plug into the general equation for complex numbers.

The problem I have is with determining the particular function: When I do it, I get 0 = cos(ωt)
The soltuion I guseed was Acos(ωt) + Bsin(ωt).

I'm confused :(.

2. Nov 1, 2012

### tiny-tim

hi th3chemist!

when the RHS is one of the complementary solutions, you have to multiply by t to get the particular solution (or tn if it's an nth-degree solution) …

try tcosωt or tsinωt

3. Nov 1, 2012

### LCKurtz

Generally, had there been a $y'$ term in the DE you would try $At\cos(\omega t)+Bt\sin(\omega t)$.

4. Nov 1, 2012

### th3chemist

Ah, thank you! I forgot that.

So let's say the one solution has t^2 e^2t
would I multiply it by t still? or t^2? This is just for my knowledge, not this question :).

5. Nov 2, 2012

### tiny-tim

hi th3chemist!

(just got up :zzz:)
(try using the X2 button just above the Reply box )

that can't happen …

the complementary solution will always be a sum of ekts (or coskts and sinkts)

6. Nov 2, 2012

### HallsofIvy

Staff Emeritus
Unless I am misunderstanding you, that's not true, tiny tim. For example, if the equation is
$$\frac{d^3y}{dt^3}- 6\frac{d^2y}{dt^2}+ 12\frac{dy}{dt}+ 8y= e^{2t}$$
then the associated homogeneous equation is
$$\frac{d^3y}{dt^3}- 6\frac{d^2y}{dt^2}+ 12\frac{dy}{dt}+ 8y= 0$$
which has characteristic equation $r^3- 6r^2+ 12r+ 8= (r- 2)^3= 0$ and so has r= 2 as a triple charateristic root.

That tells us that three independent solutions to the associate homogeneous equation are $e^{2t}$, $te^{2t}$, and $t^2e^{2t}$. In order to find a specific solution to the entire equation, we would look for a solution of the form $At^3e^{2t}$.

If, for the same left side, the right hand side were, say, $t^2e^t$ (not $t^2e^{2t}$), we would look for a soluion of the form $(At^2+ Bt+ C)e^t$ to allow for the product rule differentiation of the powers of t. And if, with the same left side, the right hand side were $t^2e^{2t}$, we would, instead of $(At^2+ Bt+ C)e^{2t}$, increase the powers to $(At^5+ Bt^4+ Ct^3)e^{2t}$ to avoid those we already have.

Of course, Th3chemist, you understand that we are talking only about "linear differential equation with constant coefficients". Non-linear differential equations or equations with variable coefficients can be much harder. Even with "linear differential equations with constant coefficients", this "method of undetermined coefficients" only works when the right hand side is something we can "guess" the for of- things like $e^{kt}$, $cos(kt)$, $sin(kt)$, poynomials in t, and products of such things. If the right hand side is not, if it is, say, a logarithm, then we need to use "variation of parameters".

7. Nov 2, 2012

### tiny-tim

Hi HallsofIvy!
Thanks, you're right

I must still have been half-asleep! :zzz:​