Solve a second-order PDE with non-constant coefficients Solve the following equation:
$$\frac{\partial u}{\partial t}+ax^2(1-x)^2\frac{\partial^2u}{\partial x^2}=0$$
with the boundary condition $u(1,x)=(.5-x)^2$, $u(t,0)=u(t,1)=.25$. Domain is $t\geq0, x\in[0,1]$, $a>0$.
Let me know if I messed up with the boundary conditions.
 A: Hint:
Let $u(t,x)=v(t,x)+0.25$ ,
Then $\dfrac{\partial u}{\partial t}=\dfrac{\partial v}{\partial t}$
$\dfrac{\partial u}{\partial x}=\dfrac{\partial v}{\partial x}$
$\dfrac{\partial^2u}{\partial x^2}=\dfrac{\partial^2v}{\partial x^2}$
$\therefore\dfrac{\partial v}{\partial t}+ax^2(1-x)^2\dfrac{\partial^2v}{\partial x^2}=0$
Of course we use separation of variables:
Let $v(t,x)=T(t)X(x)$ ,
Then $T'(t)X(x)+ax^2(1-x)^2T(t)X''(x)=0$
$T'(t)X(x)=-ax^2(1-x)^2T(t)X''(x)$
$\dfrac{T'(t)}{T(t)}=-\dfrac{ax^2(1-x)^2X''(x)}{X(x)}=\dfrac{a(1-s^2)}{4}$
$\begin{cases}\dfrac{T'(t)}{T(t)}=\dfrac{a(1-s^2)}{4}\\4x^2(1-x)^2X''(x)+(1-s^2)X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(s)e^\frac{at(1-s^2)}{4}\\X(x)=\begin{cases}c_1(s)x^\frac{1+s}{2}(1-x)^\frac{1-s}{2}+c_2(s)x^\frac{1-s}{2}(1-x)^\frac{1+s}{2}&\text{when}~s\neq0\\c_1\sqrt{x(1-x)}+c_2\sqrt{x(1-x)}(\ln x-\ln(1-x))&\text{when}~s=0\end{cases}\end{cases}$ (according to http://eqworld.ipmnet.ru/en/solutions/ode/ode0224.pdf)
$\therefore u(t,x)=0.25+\int_{-1}^1C_1(s)x^\frac{1+s}{2}(1-x)^\frac{1-s}{2}e^\frac{at(1-s^2)}{4}~ds+\int_{-1}^1C_2(s)x^\frac{1-s}{2}(1-x)^\frac{1+s}{2}e^\frac{at(1-s^2)}{4}~ds$
Which is automatically satisfied the conditions $u(t,0)=u(t,1)=0.25$
$u(1,x)=(0.5-x)^2$ :
$0.25+\int_{-1}^1C_1(s)x^\frac{1+s}{2}(1-x)^\frac{1-s}{2}e^\frac{a(1-s^2)}{4}~ds+\int_{-1}^1C_2(s)x^\frac{1-s}{2}(1-x)^\frac{1+s}{2}e^\frac{a(1-s^2)}{4}~ds=(0.5-x)^2$
