second order ODE. I have this second order ODE:
$$-au''+bu'=x^2$$
where $u=u(x)$, $a=\text{constant}>0$, $b=\text{constant}\ge0 $
and  $$u(0)=1 ,u(1)=0$$
I tried to solve it and I get:
$$u(x)=D+Ce^{bx/a}$$
where $D,C$ are constant.

Is my answer correct?
How I can find $D$ and $C$?
I realy need help because there are 3 other quistions depending on this one.
Thanks.
 A: Hint: put $u'=w$ to reduce the order of the ode

$$ -au''+bu'=x^2 \implies -w'+bw=x^2. $$

A: Till now it is correct
But you have to find particular integral  for $x^2$ 
If it is final solution
Then use the conditions
 $u(0)=1 ,u(1)=0$
$u(x)=D+Ce^{bx/a}$--------(1)
using  $u(0)=1$ in $(1)$ we get
$1= D+C$
And using $u(1)=0 $ in $(1)$ we get
$ 0=D+Ce^{b/a}$
Solve above two equations and find value of $ C$ and $ D$
.
A: $$u(0)=1\implies D+Ce^0=1\implies D+C=1$$
$$u(1)=0\implies D+Ce^{b/a}=0$$
so $D=1-C$ and $1-C+Ce^{b/a}=0$, so $1-C(1-e^{b/a})=0$ and so $C={1\over 1-e^{b/a}}$
A: Hint
I'd guess particular solution as
\begin{align}
u_p' &= Ax^2+Bx+C \\
u_p'' &= 2Ax + B
\end{align}
Now, substitute it to the ODE given
$$
-2Aax - Ba + Abx^2 + Bbx + Cb = Abx^2 + (Bb - 2Aa)x + Cb - Ba = x^2
$$
from which you can find
\begin{align}
Ab &= 1 \\
Bb - 2Aa &= 0 \\
Cb - Ba &= 0
\end{align}
$$
A = \frac 1b; B = \frac {2a}{b^2}; C = \frac {2a^2}{b^3}
$$
So, particular solution
$$
u_p = \frac A3 x^3 + \frac B2 x + Cx = \frac 1{3b}x^3 + \frac a{b^2}x^2 + \frac {2a^2}{b^3} x
$$
Therefore, general solution
$$
u = C_1 + C_2 e^{\frac ba x} + \frac 1{3b}x^3 + \frac a{b^2}x^2 + \frac {2a^2}{b^3} x
$$
If you substitute BCs you get
\begin{align}
u(0) &= C_1 + C_2 = 1 \\
u(1) &= C_1 + C_2 e^{\frac ba} + \frac 1{3b} + \frac a{b^2} + \frac {2a^2}{b^3} = 0
\end{align}
After solving which you get your constants $C_1$ and $C_2$.
Update
As for the case with $b = 0$, that's different story. You need to solve
$$
-au'' = x^2
$$
which has a solution
$$
u = -\frac 1{12a}x^4 + C_1 x + C_2
$$
and you need to substitute BC to this one rather than the solution I provided above.
