Solution to second order ODE I have a second order linear differential equation  $$\ddot u + ku=0,$$ what is the procedure to find a general solution without any initial guess? Here $k$ is a constant.
 A: If you don't want to make an initial guess, then you can start by assuming that $$u(t) = \sum_{n=0}^\infty a_n t^n$$ and see if you can find a recurrence relation for $a_n$.
However, this is a very simple second order ODE. In fact if $k=1$ we have $$\ddot u = - u$$ and a solution of the form $$u(t) = A\sin(t) + B\cos(t)$$ works.
In fact the following holds,
If $k > 0$, then $u(t)= A\sin(\sqrt{k} t) + B \cos(\sqrt{k} t)$.
If $k < 0$, then $u(t) = A e^{\sqrt{-k} t} + B e^{-\sqrt{-k} t}$.
If $k = 0$, then $u(t) = At + B$.

As for the analytic solution method. We have $$\ddot u(t) = \sum_{n=0}^\infty a_n n (n-1) t^{n-2} = \sum_{n=0}^\infty a_{n+2} (n+2)(n+1) t^n$$ and so $$\ddot u(t) + k u(t) = \sum_{n=0}^\infty \left(a_{n+2} (n+1)(n+2) + k a_n t^n\right) =0$$
Thus $a_{n+2} = -k\cdot \frac{a_n}{(n+1)(n+2)}$.
Since this is a second order differential equation we have the choice of two initial values ($a_0$ and $a_1$). Set $a_0 = A$ and $a_1 = B$.
For even $n$ we have $$a_0 = A, a_2 = - k \frac{A}{2!}, a_4 = (-k)^2 \frac{A}{4!}, ...$$ and for odd $n$ we have $$a_1 = B, a_3 = (- k) \frac{B}{3!}, a_5 = (-k)^2 \frac{B}{5!}, ...$$
Thus $$u(t) = \sum_{n=0}^\infty (-k)^n \frac{A}{(2n)!} t^{2n} + \sum_{n=0}^\infty (-k)^n \frac{B}{(2n+1)!} t^{2n+1}$$
