# Thread: 2nd order DE with periodic forcing

1. ## 2nd order DE with periodic forcing

Hello MHF, this is my first post hope you guys can help! Please bear with my notation, I haven't figured out how to write symbols yet.

I am having some trouble understanding my notes on a 2nd order inhomogeneous differential equation with a trigonometric RHS and how to solve it. I think it would be best if I first present the information I have and then the parts I am having trouble with:

the ODE is u" + au' +bu = Ccos(wt) a,b,C,w constant.

Solving the homogenous form to find the complementary function is no problem for me. The problem is the particular integral. Normally I would tackle this with a trial function like u=Acos(wt) + Bsin(wt) but this doesnt work in the past paper questions I have tried (I get A=B=0).

This is what appears in my course notes:

We can solve this equation by writing u=Re(x) (real part of x) where x(t) solves

x" + ax' + bx = Ce^(iwt) (*)

we find as a particular solution x= d*e^(iwt) where d=C(-w^2 + iaw + b)^-1

If we rewrite d in polar form as d=r*e^(i*phi) then x=r*e^(i(wt+phi))

and u = Re(x) = rcos(wt+phi) (sorry, unsure how to get the symbol for phi)

__________________

A number of things are unclear to me. When x(t) is defined as solving the ODE I labelled as (*), should I take that to mean just any particular solution? Not a full general solution.

Finding the particular solution x=de^(iwt) is no problem but when converting into the polar form d=r*e^(i*phi) how do I find r and phi?

And finally, WHY does this work? What is particularly useful about a trial function that satifies (*)?? Where does the RHS of (*) Ce^(iwt) come from? This would really help me a lot, I always find understanding why I'm doing something makes it much easier to learn.

I hope this isn't too convoluted and confusing to read. I'll try and figure out how to do symbols and edit this post.

2. I'm curious as to why you get $A=B=0$ with the particular solution candidate $y_{p}=A\cos(\omega t)+B\sin(\omega t).$ Differentiating once yields

$\dot{y}_{p}=-A\omega\sin(\omega t)+B\omega\cos(\omega t),$ and the second time gives

$\ddot{y}_{p}=-A\omega^{2}\cos(\omega t)-B\omega^{2}\sin(\omega t).$

Plugging this into the DE yields

$-A\omega^{2}\cos(\omega t)-B\omega^{2}\sin(\omega t)+a\left(-A\omega\sin(\omega t)+B\omega\cos(\omega t)\right)$

$+b\left(A\cos(\omega t)+B\sin(\omega t)\right)=C\cos(\omega t).$

Now then, you equate the coefficients of cosine, and you equate the coefficients of sine thus:

$-A\omega^{2}+aB\omega+bA=C$ (cosine coefficients)

$-B\omega^{2}-aA\omega+bB=0,$ (sine coefficients).

Rewriting gives the system

$\begin{bmatrix}
b-\omega^{2} &a\omega\\
-a\omega &b-\omega^{2}
\end{bmatrix}\begin{bmatrix}A\\B\end{bmatrix}=\beg in{bmatrix}C\\0\end{bmatrix}.$

$A=B=0$ is not the solution to this system. What is?

B=Caw/((b-w^2)2 + (aw)^2) and A=B(b-w^2)/aw so A=B=0 is not possible. I have looked again at the example I was trying and found some silly mistakes and have now successfully solved for A and B.

I think I rather rashly assumed that since there was this new approach I hadn't seen, there must be examples where the trial function doesn't work and I didn't check my work thoroughly. I am curious if there is any advantage to solving the complex form and taking the real part of the solution though. It seems much harder and unnecessary.

Thank you once again for your reply, I expect I shall be here again sometime, hopefully with a genuine problem, not just a silly mistake!

4. Sometimes the exponential version is simpler, especially if there's a lot of multiplication going on. It's exactly the difference between the polar representation of a complex number (which is analogous to the exponential representation), and the cartesian representation (which is analogous to the trig function representation). Adding and subtracting is easier with cartesian, multiplying, dividing, and exponentiating is easier in polar. So there you go. Does that help?