# Understanding resonance in a spring

Homework Statement:
I have an equation which I used a double derivative to solve, now I need to find values for the variables such that when external force is applied resonance occurs
Relevant Equations:
*Attached
I have the equation $$\frac{d^2y}{dt^2} + 5y = 0$$

where I've worked out $$y = Acos(\sqrt5t) + Bsin(\sqrt 5 t)$$
$$y'' = -5Bsin(\sqrt 5 t)$$
using $$y = e^{\lambda x}$$ and using y(0) = 0 (the spring is released from equilibrium)

so an external force $$Acos(\omega(t - \phi))$$ is applied so we therefore
$$\frac{d^2y}{dt^2} + 5y = -4Bsin(\sqrt 5 t) = Acos(\omega(t - \phi))$$

$$-4Bsin(\sqrt 5 t) = -4Bcos(\frac{\pi}{2} - \sqrt 5 t)$$

so $$\frac{\pi}{2} - \sqrt 5 t = \omega(t - \phi)$$
$$-\sqrt 5(t-\frac{\pi}{2 \sqrt 5}) = \omega(t - \phi)$$

we can conclude that these are the values to create resonance
$$\omega = - \sqrt 5$$
$$\phi = \frac{\pi}{2\sqrt5}$$
A = any positive integer as only they only need to be in phase, so any amplitude is added

Are these the right conclusions?

haruspex
so an external force $$Acos(\omega(t - \phi))$$ is applied so we therefore
$$\frac{d^2y}{dt^2} + 5y = -4Bsin(\sqrt 5 t) = Acos(\omega(t - \phi))$$