Quadratic profiles for nonlinear diffusion with constant loss (source code)

= Quadratic profiles for nonlinear diffusion with constant loss
{title2=$h_t=(hh_x)_x-1$}

For the displayed <nonlinear diffusion equation>, a quadratic ansatz $h=A(t)+B(t)x^2$ reduces the <partial differential equation> exactly to
$$
B'=6B^2,\qquad A'=2AB-1.
$$
Indeed $(hh_x)_x=2AB+6B^2x^2$, and equality of the constant and quadratic <coefficients> proves the reduction. For nonzero curvature, integration gives $B=-1/[6(t-t_0)]$. On $\tau=t-t_0>0$, the remaining <linear ordinary differential equation> is $A'+A/(3\tau)=-1$, whose <integrating factor> is $\tau^{1/3}$. Thus, including spatial translation,
$$
h(x,t)=C\tau^{-1/3}-\frac{(x-x_0)^2}{6\tau}-\frac34\tau.
$$
All three constants $C,x_0,t_0$ are arbitrary, on a domain with $\tau>0$. When the quadratic coefficient vanishes, the more general affine ansatz gives $h=px+(p^2-1)t+q$.

A narrower ansatz $h=a t^{-1/3}(1-x^2/t^{2/3})-bt$ fixes two coefficients together and permits exactly $(a,b)=(1/6,3/4)$ or $(0,1)$. The zero value of $a$ is a valid spatially constant branch, not an algebraic exception to discard. These finite-parameter families are exact solutions; they are not the complete general solution of the nonlinear <partial differential equation>, and their sums need not be solutions.