# Solution to y'' = -W*W*y - Bcos(W*t) ?

Printable View

• Jul 8th 2007, 09:04 PM
cyal
Solution to y'' = -W*W*y - Bcos(W*t) ?
Does anybody know the solution to

y'' = -W*W*y - B cos(W*t)

where W and B are constants and t is time.

y'' is second order derivative of y with respect to t

Thank you.
• Jul 8th 2007, 09:44 PM
servantes135
are you sure that it's not -(w^2)t not -(w^2)y
• Jul 8th 2007, 10:03 PM
Jhevon
Quote:

Originally Posted by cyal
Does anybody know the solution to

y'' = -W*W*y - B cos(W*t)

where W and B are constants and t is time.

y'' is second order derivative of y with respect to t

Thank you.

What servantes135 said made me got scared there might be a typo...there better not be! This took forever to type.

What we have here is a second order differential equation. I'm much too tired to go through any lengthly explanation, so I won't (unless you need me to). I will use the method of undermined coefficients, hopefully you know it.

$\displaystyle y'' = - W^2 y - B \cos (Wt)$

$\displaystyle \Rightarrow y'' + W^2 y = -B \cos (Wt)$

For the homogeneous solution, assume $\displaystyle y = e^{ \lambda t}$

$\displaystyle \Rightarrow \lambda ^2 + W^2 = 0$

$\displaystyle \Rightarrow \lambda = \frac { \pm \sqrt {-4W^2}}{2} = \pm W ~i$

$\displaystyle \Rightarrow y_h = c_1 \cos (Wt) + c_2 \sin (Wt)$

Now we choose a particular solution of the form:

$\displaystyle y_p = k_1 t \cos (Wt) + k_2 t \sin (Wt)$

$\displaystyle \Rightarrow y_p' = k_1 \cos (Wt) - Wk_1 t \sin (Wt) + k_2 \sin(Wt) + Wk_2 t \cos (Wt)$

$\displaystyle \Rightarrow y_p'' = -Wk_1 \sin (Wt) - Wk_1 \sin (Wt) - W^2 k_1 t \cos (Wt) +$ $\displaystyle W k_2 \cos (Wt) + Wk_2 \cos (Wt) - W^2k_2 t \sin (Wt)$

Plug the respective formulas for the particular solution into the original differential equation, we obtain:

$\displaystyle -Wk_1 \sin (Wt) - Wk_1 \sin (Wt) - W^2 k_1 t \cos (Wt) + W k_2 \cos (Wt) + Wk_2 \cos (Wt)$ $\displaystyle - W^2k_2 t \sin (Wt) + W^2 k_1 t \cos (Wt) + W^2 k_2 t \sin (Wt) = -B \cos (Wt)$

This simplifies to:

$\displaystyle -2Wk_1 \sin (Wt) + 2Wk_2 \cos (Wt) = -B \cos (Wt)$

By equating coefficients we get:

$\displaystyle -2Wk_1 = 0 \implies k_1 = 0$

$\displaystyle 2Wk_2 = -B \implies k_2 = - \frac {B}{2W}$

Now our general solution is given by:

$\displaystyle y_g = y_h + y_p$

$\displaystyle \Rightarrow y_g = k_1 \cos (Wt) + k_2 \sin (Wt) - \frac {B}{2W} t \sin (Wt)$

I'm really tired, so you should really double check this
• Jul 9th 2007, 03:00 AM
CaptainBlack
Quote:

Originally Posted by Jhevon
Now our general solution is given by:

$\displaystyle y_g = y_h + y_p$

$\displaystyle \Rightarrow y_g = k_1 t \cos (Wt) + k_2 t \sin (Wt) - \frac {B}{2W} t \sin (Wt)$

I'm really tired, so you should really double check this

Well

$\displaystyle y(t)=- \frac {B}{2W} t \sin (Wt)$

is a particular integral, but you have added in the solution to the homogeneous equation incorrectly, the general solution is:

$\displaystyle y(t) = k_1 \cos (Wt) + k_2 \sin (Wt) - \frac {B}{2W} t \sin (Wt)$

RonL
• Jul 9th 2007, 08:11 AM
servantes135
thanks jevon after I posed I started thinking that it might be a homogenous derivative but I was also extreemly tired last night too. That makes so much more sence then what was runnung thought my head.
• Jul 9th 2007, 08:23 AM
Jhevon
Quote:

Originally Posted by CaptainBlack
Well

$\displaystyle y(t)=- \frac {B}{2W} t \sin (Wt)$

is a particular integral, but you have added in the solution to the homogeneous equation incorrectly, the general solution is:

$\displaystyle y(t) = k_1 \cos (Wt) + k_2 \sin (Wt) - \frac {B}{2W} t \sin (Wt)$

RonL

ah, yes, sorry. where did my t's come from. i'll correct it.
• Jul 9th 2007, 08:48 AM
cyal
Thank you
Thank you everybody for providing the solution :)
• Jul 9th 2007, 10:31 PM
cyal
On a related note..
Thank you very much for your help with the previous problem. Could somebody please help me with a related problem ..

y'' = - W ^ 2 * y - B cos( K * t )

where K is not equal to W
• Jul 9th 2007, 10:35 PM
Jhevon
Quote:

Originally Posted by cyal
Thank you very much for your help with the previous problem. Could somebody please help me with a related problem ..

y'' = - W ^ 2 * y - B cos( K * t )

where K is not equal to W

this problem is pretty much the same as the last one. in fact, this one is easier than the last one.

find the homogeneous solution as i did, but for the particular solution choose:

$\displaystyle y_p = k_1 \sin (Kt) + k_2 \cos (Kt)$

no product rule is required to differentiate those guys, just a little chain rule, so you'll have a much easier time with the computations
• Jul 10th 2007, 08:34 PM
cyal
Thank you very much
Jhevon thank you very much for taking time to answer my question.:)
• Jul 10th 2007, 09:51 PM
cyal
little confused by the solution.
I tried the solution for the 2nd question.
y'' = -w^2y + Bcos(kt) (where k != w)
which was
y = Asin(wt+d) + B/(w^2 - k^2) cos(kt)

I am confused about the 2nd part, seems like as K approaches W, the amplitude will be extreamly high.
If you think of the system as a Simple Oscillator (y'' = -w^2y) with a small driving force (Bcos(kt)), the fact that you get a huge oscialltion when the driving frequency K is close to natural frequency W seems odd. :confused: Especially when the amplitude is only growing linearly with time when K = W. Does somebody happen to know any valid explanation for this?

Thank you.
• Jul 10th 2007, 10:26 PM
Jhevon
Quote:

Originally Posted by cyal
I tried the solution for the 2nd question.
y'' = -w^2y + Bcos(kt) (where k != w)
which was
y = Asin(wt+d) + B/(w^2 - k^2) cos(kt)

the solution is:

$\displaystyle y = c_1 \cos (Wt) + c_2 \sin (Wt) - \frac {B}{W^2 - K^2} \cos (Kt)$

Quote:

I am confused about the 2nd part, seems like as K approaches W, the amplitude will be extreamly high.
If you think of the system as a Simple Oscillator (y'' = -w^2y) with a small driving force (Bcos(kt)), the fact that you get a huge oscialltion when the driving frequency K is close to natural frequency W seems odd. :confused: Especially when the amplitude is only growing linearly with time when K = W. Does somebody happen to know any valid explanation for this?

Thank you.
No comment :D:o
• Jul 10th 2007, 11:07 PM
CaptainBlack
Quote:

Originally Posted by cyal
I tried the solution for the 2nd question.
y'' = -w^2y + Bcos(kt) (where k != w)
which was
y = Asin(wt+d) + B/(w^2 - k^2) cos(kt)

I am confused about the 2nd part, seems like as K approaches W, the amplitude will be extreamly high.
If you think of the system as a Simple Oscillator (y'' = -w^2y) with a small driving force (Bcos(kt)), the fact that you get a huge oscialltion when the driving frequency K is close to natural frequency W seems odd. :confused: Especially when the amplitude is only growing linearly with time when K = W. Does somebody happen to know any valid explanation for this?

Thank you.

Resonance.

When the driving function is at the natural frquency of the oscillator it
is pumping energy into the system and so the amplitude goes off to infinity.

Look at the solution to the first ODE where K=W, there is a t infront of
one of the sinusoids, so as t goes to infinity the amplitude goes to
infinity.

RonL
• Jul 11th 2007, 09:42 AM
cyal
Quote:

Originally Posted by CaptainBlack
Resonance.

When the driving function is at the natural frquency of the oscillator it
is pumping energy into the system and so the amplitude goes off to infinity.

Look at the solution to the first ODE where K=W, there is a t infront of
one of the sinusoids, so as t goes to infinity the amplitude goes to
infinity.

RonL

Right I understand that at Resonance the oscillator will keep gaining energy as the time increases.

But with the solution to the 2nd ODE, time does not need to be infinity, even with in a 1/10th of a second the system can gain humongous energy when K is close to W.

consider K = W + 10^-4
then W^2 - K^2 => -2*W*10^-4
which means the second term in 2nd ODE, becomes
-B/(2*W)*10^4 * cos(kt)

even if you take 't' close to 1 or 2 seconds, that is a huge gain in energy. Even more than what the system would have gained at Resonance within the first two seconds, which is contrary to reality.

Or may be as K approaches W, the solution transforms into the 1st ODE solution for Resonance.