Seemingly easy Ordinary Differential Equation For which values of $T$ can we find a unique solution of the ODE
$x''(t) = −x(t) $ satisfying the boundary conditions $x(0) = a_1$ and $x(T) = a_2$ for any values of $a_1$ and $a_2$ ?
I can solve this problem directly by solving the ODE and applying boundary conditions. But I am curios if the same can be solved by applying Implicit Function Theorem or Inverse Function Theorem? Also, what does a unique solution mean in this context?
Can anyone suggest anything?
 A: 
Also, what does a unique solution mean in this context?

The solutions of this equation are of the form $f(x)= A \cos(x)+B \sin(x)$.
Then for $T = \pi$ and $a_1=a_2=0$, every function of the form $g(x) = B \sin(x)$ is solution : there is an infinity of solutions with these boundary conditions.
But for $T= \frac{\pi}{2}$, no matter what are the values of $a_1$ and $a_2$, there is only one solution for each couple $(a_1,a_2)$
A: Here's a funny little proof that the only solutions are $A \cos t + B \sin t$:
Suppose $x'' = -x$.
Consider $[x' \cos t + x \sin t]' = x'' \cos t - x' \sin t + x' \sin t + x \cos t = -x \cos t + x \cos t = 0$
Thus $x' \cos t + x \sin t = C$.
Now consider $[x' \sin t - x \cos t]' = x'' \sin t + x' \cos t - x' \cos t + x \sin t = -x \sin t + x \sin t = 0$.
Thus $x' \sin t - x \cos t = D$.
Multiply the first equation by $\sin t$ and the second by $\cos t$ and subtract:
$x' \cos t \sin t + x \sin^2 t - x' \sin t \cos t + x \cos^2 t = C \cos t - D \sin t$
Thus $x (\sin^2 t + \cos^2 t) = C \cos t - D \sin t$
Thus $x = C \cos t - D \sin t$

What's going on here? This is some fancy form of the method of integrating factors.
