Boundary Value Problem $y''+uy=0$ Consider the boundary value problem 
$$y''+uy=0  \qquad     y(0)=y(\pi/2)=0$$
(a) For what values of $u$ does this problem have the trivial solution $y \equiv 0$?
(b) For what values of $u$ does the problem have nontrivial solutions?
I would really appreciate any help on this one.
 A: Here is your error: you say "What i had done was sub into the equation $r$, such that $y'' + uy$ becomes: $r^2 + u = 0 r= \pm (-u)^{1/2}$ Then since the root is a complex number: $r= (u)^{1/2}i$".
The root will be a complex number only if u is positive and you do not know that.
Rather, consider the separate cases.
1) $u= 0$.  In this case, the differential equation is $y''= 0$ which can be solved by integrating twice: $y'= A$, a constant, so $y(x)= Ax+ B$.  Now, $y(0)= B= 0$ and $y(\frac{\pi}{2})= A\cdot\frac{\pi}{2}= 0$ so $A= 0$.  Since $A$ and $B$ are both $0$, $y(x)$ is identically $0$, the "trivial" solution.
2) $u< 0$.  Let $u= -a^2$ where $a$ can be any non-zero number.  Then the equation is $y''- a^2y= 0$ which has characteristic equation $r^2- a^2= 0$.  That has real roots $a$ and $-a$.  The general solution to the equation is $y(x)= Ae^{ax}+ Be^{-ax}$.  $y(0)= A+ B= 0$ and $y(\frac{\pi}{2})= Ae^{a\cdot\frac{\pi}{2}}+ Be^{-a\cdot\frac{\pi}{2}}$.  From $A+ B= 0, B= -A$ so that   so that $A- B= 0$ and $A= B$.  Then $Ae^{a\frac{\pi}{2}}+ Be^{-a\frac{\pi}{2}}= Ae^{a\frac{\pi}{2}}- Ae^{-a\frac{\pi}{2}}= A(e^{a\frac{\pi}{2}}- e^{-a\frac{\pi}{2}})= 0$.  Since $a$ is not $0$, $e^{a\frac{\pi}{2}}- e^{-a\frac{\pi}{2}}$ is not $0$ and we must have $A= 0$ and $B= -A= 0$.   Again $A$ and $B$ are both $0$ so the $y(x)$ is identically $0$, the "trivial" solution.
3) $u> 0$.  Let $u= a^2$ where a can be any non-zero number.  Then the equation is $y''+ ay^2= 0$ which has characteristic equation $r^2+ a^2= 0$.  That has imaginary roots $ai$ and $-ai$.  The general solution to the equation is $y(x)= A \cos(ax)+ B \sin(ax)$.  $y(0)= A= 0$ and $y(\frac{\pi}{2})= B \sin(a\frac{\pi}{2})= 0$.  Now, we must have either $B= 0$ so that we have the "trivial" solution again or $\sin(a\frac{\pi}{2})$ which happens if and only if $a$ is an odd number: $a= 2n+ 1$ for some integer $n$.
A: Is $\ u$ a constant? If $\ u$ is a constant, then $\forall u, y=0$ is a solution. Supposing $\ u$ is a constant, then $\ y=A e^{i\sqrt{u} x}+Be^{-i\sqrt{u} x} $
Now, we impose boundary conditions.
$\ y(0)=0 \Rightarrow A+B=0$ or $\ A=-B$
$\ y(\pi/2)=0 \Rightarrow e^{i\sqrt u \pi/2}-e^{-i\sqrt u \pi/2}=0 \Rightarrow sinh(i\sqrt u \pi/2)=0 \Rightarrow sin(\sqrt u \pi/2)=0 \Rightarrow \pi\sqrt u/2=n\pi$
Therefore, $\ \sqrt u=2n \Rightarrow u=4n^2 $ where $\ \forall n \in \mathbb{Z} $
A: It's not too hard. There are three cases for $u$:
1) $u>0\Longrightarrow u=\omega^2$:
$$
y'' + \omega^2 y = 0\Longrightarrow y = A\cos(\omega x) + B\sin(\omega x).
$$
Since $y(0)=0$ we have $A=0$. $y(\pi/2) = B\sin(\omega \pi/2)=0$. If $\omega=2n$, $n\in\mathbb N$, then $B$ may be any. If not, $\sin(\omega \pi/2)\ne 0$, and $B=0$, and $y(x)\equiv 0$.
2) $u=0$:
$$
y'' = 0\Longrightarrow y = Ax + B
$$
While $y(0)=0$, then $B=0$. But $y(\pi/2) = A\pi/2 = 0\Longrightarrow A=0$, and $y(x)\equiv 0$.
3) $u<0\Longrightarrow u=-\omega^2$:
$$
y'' - \omega^2 y = 0\Longrightarrow y = Ae^{\omega x} + Be^{-\omega x}.
$$
Since $y(0)=0$, $y(\pi/2)$, we have
$$
A + B=0\\
Ae^{\omega \pi/2} + Be^{-\omega \pi/2} = 0
$$
Determinant of this system is
$$
\begin{vmatrix}
1 & 1\\
e^{\omega \pi/2} & e^{-\omega \pi/2}
\end{vmatrix} = e^{-\omega \pi/2} - e^{\omega \pi/2} \ne 0;
$$
so, $A=B=0$ and $y(x)\equiv 0$.
We are done.
A: Avoiding the use of exponentials and Euler's equation, we can see that the solution to $$y''+uy = 0$$ is given by $$y = A \sin\left(\sqrt{u}\cdot t\right) + B \cos\left(\sqrt{u}\cdot t\right)$$ when no boundary conditions are imposed.
Now it is a matter to see which $u$ match up with the boundary conditions.
If $y(0) = 0$ then $0 = B$, thus $y(t) = A \sin(\sqrt{u}\cdot t)$.
Now if $y(\pi/2) = 0$ then $0 = A \sin(\sqrt{u} \cdot \pi/2 )$. Now we know that this only can happen if $$\sqrt{u}\cdot \pi/2 = k \cdot \pi$$ for some integer $k$. This equation resolves the question. If it is not satisfied for some integer $k$ then there are no nontrivial solutions, and if it is satisfied then there are nontrivial solutions.
