I'm not sure whether this is really appropriate for MathOverflow or not. Still, let me say a little more: As I've mentioned above, you can work out completely the case where $a$ is constant using explicit solutions. If $a$ is not constant, I'm not aware of a definitive answer but you can get separate necessary conditions and sufficient conditions, involving upper or lower bounds on $a$ using the Sturm comparison theorem. Last, I believe that it is possible to find an integral condition on $a$ that is sufficient for there to be a unique solution to the boundary value problem.
The vector-valued version of this problem is used to analyze how geodesics on a Riemannian manifold behave given assumptions on the curvature.