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

1. ## 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.

2. are you sure that it's not -(w^2)t not -(w^2)y

3. 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.

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

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

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

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

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

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

Now we choose a particular solution of the form:

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

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

$\Rightarrow y_p'' = -Wk_1 \sin (Wt) - Wk_1 \sin (Wt) - W^2 k_1 t \cos (Wt) +$ $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:

$-Wk_1 \sin (Wt) - Wk_1 \sin (Wt) - W^2 k_1 t \cos (Wt) + W k_2 \cos (Wt) + Wk_2 \cos (Wt)$ $- 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:

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

By equating coefficients we get:

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

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

Now our general solution is given by:

$y_g = y_h + y_p$

$\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

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

$y_g = y_h + y_p$

$\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

$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:

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

RonL

5. 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.

6. Originally Posted by CaptainBlack
Well

$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:

$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.

7. ## Thank you

Thank you everybody for providing the solution

8. ## On a related note..

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

where K is not equal to W

9. Originally Posted by cyal

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:

$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

10. ## Thank you very much

Jhevon thank you very much for taking time to answer my question.

11. ## 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. 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.

12. 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:

$y = c_1 \cos (Wt) + c_2 \sin (Wt) - \frac {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. 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

13. 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. 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

14. 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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 25, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}