Using a Similarity Variable to transform a PDE into an ODE I have the following PDE with BC and IC:
$$u_t=b u_{xx}-c u$$
$$u(x,0)=u_0 (x\to\infty)\text{ and }u(0,t)=0(t\to \infty)$$
In this video Dr Chris Tisdell shows how to transform such a PDE into an ODE, by rearranging the variables $x$ and $t$ into a single variable $p$.
First he defines the following variables and relations:
$$\bar{X}=a^{\alpha}x$$
$$\bar{T}=a^{\beta}t$$
$$\bar{u}=a^{\gamma}u(x,t)=a^{\gamma}u$$
$$\bar{X}\bar{T}^s=xt^s\text{ and }\bar{u}\bar{T}^r=ut^r$$
$$u(x,t)=t^{-r}g(xt^s)=t^{-r}g(p)$$
$$\bar{X}=a^{\alpha}x\text{ and }\bar{T}=a^{\beta}t\text{ and }\bar{u}(\bar{X}\bar{T})=a^{\gamma}u(x,t)$$
$$\bar{u}_{\bar{T}}=a^{\gamma-\beta}u_t$$
$$\bar{u}_{\bar{X}}=a^{\gamma-\alpha}u_x$$
$$\bar{u}_{\bar{X}\bar{X}}=a^{\gamma-2\alpha}u_{xx}$$
$$\bar{u}_{\bar{T}}-a\bar{u}_{\bar{X}\bar{X}}+c\bar{u}=a^{\alpha-\gamma}u_t-ba^{\gamma-2\beta}u_{xx}+ca^{\gamma}u=0$$
Which is true only if:
$$\gamma-\alpha=\gamma-2\beta=\gamma$$
$$\alpha=-2\beta$$
Using this relation he determines that for:
$$\bar{X}\bar{T}^s=xt^s\Rightarrow s=-1/2$$
The variable $p=xt^{-1/2}$ is then defined.
$$\bar{u}\bar{T}^r=ut^r\text{ for }r=-\gamma/2\alpha$$
Then we have:
$$u(x,t)=t^{-r}g(p)$$
And this is where I get stuck (possibly because my PDE isn't the same as his example PDE) when I try and form the ODE in $g(p)$.
Can anyone show me how to proceed?
 A: Just note that $$u_t+cu=e^{-ct}\frac{\partial}{\partial t}(e^{ct}u)$$
and that, in consequence, setting $U=e^{ct}u$ allows you to rewrite the equation as
$$U_t=bU_{xx}~,~ U(x,0)|_{x\to\infty}=u_0~, ~e^{-ct}U(0,t)|_{t\to\infty}=0$$
This can be solved by a similar scaling ansatz. The final solution can be written in the form (the proof is left to the reader)
$$u(x,t)=u_0e^{-ct}\text{erf}\left(\frac{x}{2\sqrt{bt}}\right)$$
with $\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-y^2}dy$.
EDIT: Here's a few more details. It can be seen readily by following that procedure that the most general solution to a scale invariant boundary problem like the one posed above is
$$U(x,t)=t^{-r}f(x^2/t)$$
Here's why- as shown in the video if $U(x,t)$ is a solution, then the function $a^{-\gamma}U(a^{\alpha}x, a^{2\alpha}t)$ is also a solution to the boundary problem posed (which is scale invariant). Now choose $a^{2\alpha}=t$. Then the solution can be written as
$$U(x,t)=t^{-\gamma/2\alpha}U(x/\sqrt{t},1)\equiv t^{-r}f(x^2/t)$$
where the appropriate redefinitions have been made. Now let's apply the boundary condition $U(x,0)|_{x\to\infty}=u_0$:
$$U(x,0)|_{x\to\infty}=\lim_{x\to\infty}(\lim_{t\to 0}t^{-r}f(x^2/t))=\lim_{x\to\infty}x^{-2r}(\lim_{y\to \infty}y^{r}f(y))$$
This limit cannot be finite unless $r=0$.With that knowledge we conclude that $f(\infty)=u_0$.
The other boundary condition is a bit more subtle. Of course, knowing that $e^{-ct}U(0,t)|_{t\to\infty}=0$ does not imply that $U(0,t)|_{t\to\infty}=0$. However, if we can find a solution that satisfies the second BC (and we will), then the first one is automatically satisfied. Now with our reduced scale invariant boundary condition by plugging in the scaling ansatz we obtain
$$U(0,t)=0\Rightarrow f(0)=0$$
Last but not least, plug the ansatz into the PDE to obtain
$$U_t=bU_{xx}\Rightarrow 4byf''(y)+(2b+y)f'(y)=0~~, y=x^2/t$$
which is separable and can be solved to yield
$$f'(y)=\frac{C}{\sqrt{y}}e^{-y/4b}, ~C\in\mathbb{R}$$
Integrate once more in $(0,y)$ and substitute $y=4bz^2$ in the integral to find the solution
$$f(y)=C\sqrt{b}\int_0^{\sqrt{y/4b}}e^{-z^2}dz=D \text{erf}\left(\frac{\sqrt{y}}{2\sqrt{b}}\right)$$
where $D=C\frac{\sqrt{\pi b}}{2}$. Since $\text{erf}(\infty)=1$ we conclude that $D=u_0$ to match the boundary condition at large $x$. Finally this yields the proposed solution
$$U(x,t)=u_0\text{erf}\left(\frac{x}{2\sqrt{bt}}\right)$$
