# Solving differential equations - tricky algebra

For $a>0$ and $\omega > 0$, show that as $t \rightarrow \infty$, the solution to the inhomogeneous differential equation $$\frac{d^2y}{dt^2}+2a\frac{dy}{dt} + y = \sin(\omega t)$$ approaches a particular solution which can be expressed in the form $$R \cos(\omega t - \phi)$$ where you should determine the amplification factor $R$ and $\tan (\phi)$.

Obviously the homogenous part doesn't matter, as it'll tend to zero.

I think I made a mistake when finding my particular solution. I tried a particular solution of $\lambda \cos(\omega t) + \mu \sin(\omega t)$ and obtained $$\lambda = \displaystyle \frac{2a}{(1-\omega^2)^2 - 4a^2 \omega} , \mu = \displaystyle \frac{1}{1-\omega^2} + \displaystyle \frac{4a^2 \omega}{(1-\omega^2)-4a^2 \omega}$$ but this leads to horrible expressions for $R$ and $\tan (\phi)$, which I don't think are right.

• It would be nice if you could also write down the derivatives of your trial solution, as if there is an error, it probably is located there. May 20 '17 at 13:05

If you let $y_p = R\cos(\omega t- \phi)$ then $y_p' = -R\omega\sin(\omega t - \phi)$ and $y_p'' = -R\omega^2\cos(\omega t - \phi)$ so we have $$-R\omega^2\cos(\omega t -\phi) -2aR\omega\sin(\omega t-\phi) + R\cos(\omega t - \phi) = \sin(\omega t)$$

Expanding each term out gets you $$R\omega^2(\cos \omega t \cos \phi+\sin \omega t\sin \phi) + 2aR\omega(\sin \omega t\cos \phi -\sin \phi \cos \omega t) -R(\cos\omega t\cos \phi + \sin \omega t \sin \phi) = -\sin \omega t$$

(alternatively see LutzL's more efficient method in the comments to arrive at the next step)

So comparing the $\cos$ coefficients and noting that $R$ is non-zero gives $$\omega^2\cos \phi-2a\omega\sin \phi - \cos \phi = 0\implies \omega^2-1=2a\omega\tan \phi \Rightarrow \tan \phi = \frac{\omega^2 - 1}{2a\omega}$$

Similarly, for $\sin$ one has $$R\omega^2\sin \phi +2aR\omega\cos \phi-R\sin \phi = -1 \implies R = \frac{-1}{(\omega^2 - 1) \sin \phi + 2aw\cos \phi}$$

and you can clean out the $\phi$ dependence.

Moral: They've explicitly given you the form of the particular solution, don't use $\lambda \sin (\cdot) + \mu \cos(\cdot)$ Caveat: (there will likely be one or two minor sign errors in my answer)

• You could also rewrite the right side as $\sin(ωt)=\sinϕ\cos(ωt-ϕ)+\cosϕ\sin(ωt-ϕ)$ so you do not need to expand on the left side. May 20 '17 at 14:26
• @LutzL Indeed. I initially considered that, but couldn't find a neat way to expressing $\sin (\omega t)$ in your form without pen and paper available. So I went the brute force way. I've added a mention of your approach in my answer. Thanks! May 20 '17 at 14:29
• @ZainPatel hi ;) May 20 '17 at 16:21

You should get $$\pmatrix{1−ω^2&2aω\\-2aω&1−ω^2} \pmatrix{λ\\μ} = \pmatrix{0\\1}$$ where the matrix is of the scaling-rotation kind. Multiplying with its transpose gives $$\Bigl((1−ω^2)^2+4a^2ω^2\Bigr)\pmatrix{λ\\μ} = \pmatrix{1−ω^2&-2aω\\2aω&1−ω^2} \pmatrix{0\\1}$$ where the result looks somewhat simpler than your formulas.

You can also think of $y=Re(z)$ where $z$ solves $$z''+2az'+z=-ie^{iωt}$$ where you would try $z=Ce^{iωt}$ with coefficient equation $$C(-ω^2+i2aω+1)=-i\iff C=\frac{-i}{(1-ω^2)+i2aω}$$ where you get $R$ and $-ϕ$ from the polar form of $C$, or $$\frac1R e^{iϕ}=i((1-ω^2)+i2aω).$$