Solving $-u''(x) = \delta(x)$ A question asks us to solve the differential equation
$-u''(x) = \delta(x)$
with boundary conditions 
$u(-2) = 0$ and $u(3) = 0$ where $\delta(x)$ is the Dirac delta function. But inside the same question, teacher gives the solution in two pieces as $u = A(x+2)$ for $x\le0$ and $u = B(x-3)$ for $x \ge 0$. I understand when we integrate the delta function twice the result is the ramp function $R(x)$. However elsewhere in his lecture the teacher had given the general solution of that DE as
$u(x) = -R(x) + C + Dx$
So I dont understand how he was able to jump from this solution to the two pieces. Are these the only two pieces possible, using the boundary conditions given, or can there be other solutions? 
Full solution is here (section 1.2 answer #2)
http://ocw.mit.edu/courses/mathematics/18-085-computational-science-and-engineering-i-fall-2008/assignments/pset1.pdf

Both describe the same type of function.
The ramp function is nothing but
\begin{align} R(x) = \begin{cases}0 & x \leq 0
\\ x & x \geq 0\end{cases} \end{align}
 If you use the general solution and plug in the same boundary conditions, 
\begin{align}u(-2) &= -R(-2) + C -2D = C - 2D = 0 
\\
u(3) &= -R(3) + C + 3D = -3 + C +3D = 0\end{align}
with the solution $C=6/5$, $D=3/5$, and then split it at $x=0$ to get rid of the ramp function and you obtain;
\begin{align}u(x) = \begin{cases} \frac65 + \frac35 x & x \leq 0\\ -x + \frac65 + \frac35 x = \frac65 - \frac25 x &x \geq 0\end{cases}\end{align}
which is exactly the same expression you got by splitting the function earlier (pratically, there is no difference, but its shorter when written with the ramp function).
