# Find the solution to the ODE of an underdamped, forced pendulum.

Consider the underdamped, forced pendulum governed by the ODE $$\frac{d^2\theta}{dt^2}+\eta\frac{d\theta}{dt}+\omega_0^2\theta=F_0\cos(\omega_Ft)$$ where $$2\omega_0>\eta,\omega_F>0$$ and $$F_0>0$$.

Find the general solution assuming $$\omega_0\neq\omega_F$$.

I derived the complementary equation as follows: $$\theta(t)=Ae^{-\frac{\eta}{2}t}\cos(\omega t)+Be^{-\frac{\eta}{2}t}\sin(\omega t)\quad\text{ where }\omega=\frac{\sqrt{4\omega_0^2-\eta^2}}{2}$$

Using the method of undetermined coefficients, we guess that $$\theta_p$$ is of the form $$\theta_p(t)=A\cos(\omega_F t)+B\sin(\omega_F t)$$ The first and second order derivatives are \begin{align*} \frac{d\theta_p}{dt}&=-A\omega_F\sin(\omega_F t)+B\omega_F\cos(\omega_F t)\\ \frac{d^2\theta_p}{dt^2}&=-A\omega_F^2\cos(\omega_F t)-B\omega_F^2\sin(\omega_F t) \end{align*}

Plugging these into the ODE, we can find $$A$$ and $$B$$. \begin{align*} F_0\cos(\omega_F t)&=-A\omega_F^2\cos(\omega_F t)-B\omega_F^2\sin(\omega_F t)\\ &\quad\quad\quad\quad\quad+\eta\left(-A\omega_F\sin(\omega_F t)+B\omega_F\cos(\omega_F t)\right)+\omega_0^2\left(A\cos(\omega_F t)+B\sin(\omega_F t)\right)\\ \end{align*}

I then found that the solution is $$\theta(t)=Ae^{-\frac{\eta}{2}t}\cos(\omega t)+Be^{-\frac{\eta}{2}t}\sin(\omega t)+\frac{F_0\eta\omega_F\sin(\omega_Ft)}{\omega_F^4+\omega_F(\eta^2-2\omega_0)+\omega_0^4}-\frac{(F_0\omega_F^2-F_0\omega_0^2)\cos(\omega_F t)}{\omega_F^4+\omega_F(\eta^2-2\omega_0)+\omega_0^4}$$ where $$\omega=\frac{\sqrt{4\omega_0^2-\eta^2}}{2}$$.

The part that I am having trouble with is finding the particular solution given $$\theta(0)=\theta'(0)=0$$. This requires finding the derivative of $$\theta(t)$$ which is quite messy. I was wondering if I had computed the correct solution to this problem. Thanks

You general and particular solution look correct. Though the $$\omega_F$$ term should be $$\omega_F^2$$ and the $$\omega_0$$ term should be $$\omega_0^2$$ in the denominator. Otherwise the forms all look correct. As for initial conditions,
$$\theta(0)= A -\frac{F_0(\omega_F^2 - \omega_0^2)}{\omega_F^4 + \omega_F^2(\eta^2 - 2\omega_0^2) +\omega_0^4} =0$$ so $$A= \frac{F_0(\omega_F^2 - \omega_0^2)}{\omega_F^4 + \omega_F^2(\eta^2 - 2\omega_0^2) +\omega_0^4}$$
And $$\theta'(0) = -\frac{\eta}{2}A + \omega B + \frac{F_0 \eta \omega_F^2}{\omega_F^4 + \omega_F^2(\eta^2 - 2\omega_0^2) +\omega_0^4} = 0$$ so
$$\omega B = \frac{\eta}{2}A -\frac{F_0 \eta \omega_F^2}{\omega_F^4 + \omega_F^2(\eta^2 - 2\omega_0^2) +\omega_0^4}$$ Simply plug in $$A$$ from above and divide by $$\omega$$ and you should have everything.
• It looked so messy I didn't even realize that since we are differentiating in terms of $t$, everything can be treated as a constant. The derivative is not so hard after all. Thank you so much. Commented Feb 19, 2022 at 0:40