We can numerically integrate first order differential equations using Euler method like this: $$y_{n+1} = y_n + hf(t_n, y_n)$$
And with Implicit Euler like this: $$y_{n+1} = y_n + hf(t_{n+1},y _{n+1})$$
If I have a differential equation $y' - ky = 0$, I can integrate $y$ numerically using Implicit Euler: $$y_{n+1} = y_n + hky_{n+1}$$ $$y_{n+1} = y_n\frac{1}{1-hk}$$
But how I do use Implicit Euler for second order differential equations, like for instance the equation for simple harmonic motion? $$y'' + w^2y = 0$$
We have to integrate with respect to $y$ and $y'$. For explicit Euler the numerical integration would look like this (?): $$y_{n+1} = y_n + hf(t_n, y'_n)$$ $$y'_{n+1} = y'_n + hg(t_n, y_n)$$
How would we do integrate using Implicit Euler instead?