Sovling $y” + 16y = 12\sin{wt}$ to figure out how a spring behaves at different values of $\omega$

calculusordinary differential equations

Question:

A vertically hanging spring has the spring constant $k = 32 N/m$.

A body with the mass $m = 2~kg$ is at rest and in equilibrium in the lower end of the spring.

At time $t = 0$, a variable force $F(t) = 12\sin{\omega t}$ is applied to this body in the direction of gravity.

Describe the movement of the body for different values of the angular frequency $\omega$ of the external force. What happens with the body at these different $\omega$?

You may neglect air resistance.

Attempted solution:

I have put the spring on a $y$-axis with a positive direction downward.

Let $y = 0$ be the location for the lower end of the spring at the moment of equilibrium at $t = 0$. The length of the spring is then $l$. This produces the equation:

$$kl = mg$$

Let $y(t)$ be the location for the mass at time t.

The force equation gives:

$$my''(t) = mg – k(y(t) + l) + F(t) \Rightarrow$$
$$my''(t) = -ky(t) + F(t) \Rightarrow$$
$$y'' + \frac{k}{m}y = 12\sin{wt}$$

Plugging in the values of $k$ and $m$ gives:

$$y'' + \frac{32}{2}y = 12\sin{wt} \Rightarrow$$
$$y'' + 16y = 12\sin{wt}$$

Solving this differential equation produces the result:

$$y(x) = A \sin{4x} + B \cos{4x} – \frac{12\sin{\omega x}}{\omega^2 – 16}$$

where A and B are unknown constants.

Here, I am a bit stuck. I can tell that something really bad might happen if $\omega = 4$ since this means that $y(t)$ contains something that grows to infinity. I assume this is some form of resonance. At other finite values of $\omega$, nothing too exciting seems to happen.

When I look at some plots of different values for $\omega$ (such as $\omega = 4$ and $\omega = 3$), $\omega = 4$ has the characteristic oscillating out of control, while $\omega = 3$ does not as $t$ grows.

What do you think would be sufficient to finish this question of?

The expected answer contains solutions to the differential equation for $\omega = 4$ and $\omega \neq 4$ (how can there be a solution for all values of a variable except one?) but without unknown constants $A$ and $B$ (presumably these have been determined by one or a few initial conditions hiding somewhere?), and determination of the amplitude at $\omega = 4$ in order to more explicitly show that the amplitude grows to infinity.

Best Answer

Yes, there’s definitely a problem with $\omega=4$: your particular solution is undefined!

You likely used the method of undetermined coefficients with the ansatz $y_p=A\cos{\omega t}+B\sin{\omega t}$. Observe, though, that when $\omega=4$, this is precisely the complementary solution, so you already know that $y_p''+16y_p=0\ne12\sin4t$. When this occurs, the rule of thumb is to try $y_p=t(a\cos{4t}+b\sin{4t})$ instead. Computing $y_p''+16y_p$ and equating coefficients, we get $$y_p = -\frac32t\cos{4t}.$$ The general solution when $\omega=4$ is therefore $$y=\left(c_1-\frac32t\right)\cos{4t}+c_2\sin{4t}.$$ The initial conditions $y(0)=y'(0)=0$ give us $c_1=0$ and $c_2=\frac38$ for $$y=\frac38\sin{4t}-\frac32t\cos{4t}.$$ This indeed grows without bound as $t\to\infty$.

If you examine the maximum amplitude of the oscillations for various values of $\omega$, you’ll find that it grows rapidly as $\omega\to4$. This is indeed a resonance phenomenon. The sum of the two sinusoids in the solution can be approximated by a product of two sinusoids, with the envelope having a frequency of half the difference between the frequencies of the original two. As $\omega\to4$, the resulting “beats” get farther and farther apart. You can think of the period of the beats becoming infinitely long in the limit, with the amplitude envelope never shrinking back down to zero.

To see why adding a factor of $t$ to the particular solution is the correct approach, we can use variation of parameters to find the solution to the equation. I’ll describe this in terms of a system of first-order linear equations because I find the description is more concise that way. By introducing the function $u(t)=y'(t)$, the second-order equation $y''+ay'+by=0$ can be written as $$\begin{bmatrix}u'\\y'\end{bmatrix} = \begin{bmatrix}-a&-b\\1&0\end{bmatrix} \begin{bmatrix}u\\y\end{bmatrix},$$ or, more compactly, $\mathbf x'=A\mathbf x$. If the initial conditions are given as values of $y(0)$ and $y'(0)$, then the solution to this equation is $y=e^{tA}\mathbf x(0)$.

For the inhomogeneous equation $\mathbf x'-A\mathbf x=\mathbf b(t)$, we make the ansatz $\mathbf x_p=e^{tA}\mathbf w(t)$ for some as-yet-undetermined vector function $\mathbf w$. Plugging this into the differential equation produces $$Ae^{tA}\mathbf w + e^{tA}\mathbf w'-Ae^{tA}\mathbf w = e^{tA}\mathbf w'=\mathbf b,$$ so $$\mathbf w'=e^{-tA}\mathbf b.$$ We integrate this, choosing the constant of integration so that $\mathbf w(0)=0$: $$\mathbf w(t) = \int_0^t e^{-sA}\mathbf b(s)\,ds$$ and thus $$\mathbf x(t)=e^{tA}\mathbf x(0) + \int_0^t e^{(t-s)A}\mathbf b(s)\,ds.$$

Applying this to your equation, we have $$A=\begin{bmatrix}0&-16\\1&0\end{bmatrix}, e^{tA} = (\cos{4t})I+{\sin{4t}\over4}A = \begin{bmatrix}\cos{4t}&-4\sin{4t}\\\frac14\sin{4t}&\cos{4t}\end{bmatrix}.$$ Here, we take $\mathbf b=(12\sin{\omega t},0)^T$, so that $$e^{(t-s)A}\mathbf b(s) = \begin{bmatrix}12\sin{\omega s}\cos{4(t-s)} \\ 3\sin{\omega s}\sin{4(t-s)}\end{bmatrix} = \begin{bmatrix} 6\left(\sin{((\omega+4)s-4t)}+\sin{((\omega-4)s+4t)}\right) \\ \frac32\left(\cos{((\omega+4)s-4t)} - \cos{((\omega-4)s+4t)}\right)\end{bmatrix}.$$ When $\omega=4$, the second term of each component is independent of $s$, so its integral will be equal to $t$ times a sinusoid, which is what we used for the method of undetermined coefficients at the top.