Solving a nonlinear PDE I wish to solve the following PDE:
$$
u_t - (u^{2})_{xx}=0
$$
with some boundary conditions which right now is not of much relevance apart from the fact that $u(t,x)$ is a piecewise continuous function and $u_x(t,0)=0$.
I have used the following substitution: $u(t,x)=f(\eta)t^{-\frac{1}{3}}$ and $\eta=xt^{-\frac{1}{3}}$ which reduces the above equation to a single variable of the form:
$$
\partial_{\eta}\left ( 2ff_\eta + \frac{\eta f}{3} \right )=0
$$
Now, I am very confused about how to proceed with this reduced form to solve the above equation and find the analytical solution of $f(\eta)$ thereby finding the analytical solution of $u(t,x)$.
Help of any sort is deeply appreciated. Thanks in advance.
 A: Actually, there was a key point which we were missing from the question which would make the solution very easy (it clicked to me after spending 3-4 hours on this question) which is $u_x(t,0)=0$
Now, using the chain rule we can easily derive the following:
$$
u_x(t,x) = t^{-\frac{2}{3}}f_{\eta}(\eta)=0
$$
Also, from the very definition of $\eta$, $x=0$ implies $\eta=0$ and thus
$$
u_x(t,0) = t^{-\frac{2}{3}}f_{\eta}(0)=0
$$
or simply $f_{\eta}(0)=0$
Now, we can write
$$
\partial_{\eta}\left ( 2ff_\eta + \frac{\eta f}{3} \right )=0
$$
as (for a constant $K$)
$$
2ff_\eta + \frac{\eta f}{3} = K
$$
When $\eta=0$, $f_{\eta}(0)=0$ and thus substituting them in the above equation gives $K=0$ which makes our equation
$$
2ff_\eta + \frac{\eta f}{3} = 0
$$
Now, since we are not looking for the trivial solution, hence $f(\eta) \neq 0$ which means
$$
2f_\eta + \frac{\eta}{3} = 0
$$
or
$$
f(\eta) = -\frac{\eta^2}{12} + C
$$
for a constant $C$, which can be found from the other boundary conditions.
A: Believe it or not, this is actually a rare bird: a nonlinear PDE for which you can separate variables. Dym's equation is another, but they almost do not exist. Let $u(t,x)=T(t)X(x).$ Then we have
\begin{align*}
\dot{T}X&=2T^2\!\left[(X')^2+XX''\right]\qquad\text{now divide by } T^2X:\\
\frac{\dot{T}}{T^2}&=\frac{2\!\left[(X')^2+XX''\right]}{X}=k,
\end{align*}
yielding the two ODE's:
\begin{align*}
\dot{T}&=kT^2\\
2\!\left[(X')^2+XX''\right]&=kX.
\end{align*}
The solution to the first is
$$T(t)=-\frac{1}{C+kt}.$$
The solution to the second is quite messy. Mathematica yields the following two solutions:
\begin{align*}
X(x)&=\text{InverseFunction}\left[\pm\,\frac{\text{$\#$1}^2\sqrt{3+\frac{\text{$\#$1}^3k}{c_1}}\,_2F_1\left(\frac{1}{2},\frac{2}{3};\frac{5}{3};-\frac{k\text{$\#$1}^3}{3c_1}\right)}{2\sqrt{\text{$\#$1}^3k+3c_1}}\&\right][x+c_2],
\end{align*}
so essentially the inverse of a hypergeometric $_2F_1$ function. I don't know if this solution is of much use to you, as it's implicit. But it might yield some insight. Note: the $\#1$'s in the answer have to do with the InverseFunction in Mathematica. According to Mathematica's documentation:
$$\text{InverseFunction}[f][y]$$
gives the value of $x$ for which $f[x]=y.$ The $\&$ just means "pure function", which is what the InverseFunction first argument is expecting. You can effectively ignore that.
