# 2nd order nonhomogeneos differential equations with initial conditions

1. May 16, 2013

### pedro123

1. The problem statement, all variables and given/known data

The problem states

d^2y/dt^2 +15y= cost4t + 2sin t

initial conditions y(0)=y'(0)=0

2. Relevant equations

3. The attempt at a solution

All I have is this r^2+15=0

making r(+-)=√15

and making yh= C1cos√15+C2√15

the next part includes solve for the nonhomogenous equation

cos4t + 2sint

but here is where I can't come with the particular solution can it be

yp= Acos2t +B sin2t

2. May 16, 2013

### Staff: Mentor

No, r = ±√(-15) = ±i√(15).

But rather than working with eit√15 and e-it√15, it's much easier to work with cos(t√(15)) and sin(t√(15)).
See above.

What would you have for yh, considering the corrections I made?
No, these won't work. You'll need four expressions for your particular solution, not two.

3. May 16, 2013

### pedro123

So yh= cos(t√(15)) + sin(t√(15))

and now I need to use the method of undetermined cooficients to come with a particular solution.

is Yp= Acos 2t +B sin 2t

Yp'=-2Asin 2t + 2B cos 2t
Yp''= -4Acos 2t - 4B sin 2t

right or did I make mistake and if it is right

it will make

d^2y/dt^2 +15Yp= -4Acos 2t - 4B sin 2t + 15 Acos 2t +15B sin 2t

d^2y/dt^2 +15Yp= 11cost + 11sint

is the particular solution right

4. May 17, 2013

### CAF123

That is still not the full general solution to the homogeneous equation.

Could you explain more what you are doing here? In particular why are substituting a form where the argument of sin is 2t?

5. May 17, 2013

### HallsofIvy

Staff Emeritus
Your non-homogeneous part has sin(t) and sin(4t). Those do NOT "combine" to give sin(2t).
Look for a solution of the form A sin(t)+ B cos(t)+ C sin(4t)+ D cos(4t).

6. May 17, 2013

### pedro123

so you mean for the nonhomegenous part

yp=A sin(t)+ B cos(t)+ C sin(4t)+ D cos(4t).
yp'=A cos(t) - B sin(t) + 4C cos (4t) + - 4D sin (4t)
yp''= -A sin(t) - B cos(t) - 16C sin(4t) - 16D cos(4t)

7. May 17, 2013

### Staff: Mentor

Yes. Now substitute yp and its derivatives into your diff. equation to solve for A, B, C, and D.

For your general solution you will also need yh, which wasn't right in post #3.

8. May 17, 2013

### pedro123

so you mean Yp''-Yp'+15Yp=cost4t to solve

-A sin(t) - B cos(t) - 16C sin(4t) - 16D cos(4t) + 15A sin(t)+ 15B cos(t)+ 15C sin(4t)+ 15D cos(4t) = cos (4t ) + 2 sin(t)

-14 A sin(t) +14 B cos(t) -C sin(4t) -D cos(4t) = cos (4t) + 2 sin t

-C = 1 = -1

-D = 1 = -1

-14A = 1 = -1/14

14B = 1 = 1/14

are all these values for A B C and D right and my differential equation

9. May 17, 2013

### Staff: Mentor

Don't write things like the above. You're saying that -C is equal to 1 and that 1 is equal to -1, which isn't true. You should write something like this
-C = 1, so C = -1
or
-C = 1 $\Rightarrow$ C = -1

I don't know - check them and see.

If yp = (-1/14)sin(t) + (1/14)cos(t) - sin(4t) - cos(4t),
what is yp'' + 15yp? It better be equal to cos(4t) + 2sin(t).