Similarity solution of 1D diffusion on half line

Derivation of exact similarity solution of the diffusion problem:u(and lim_{t}= D u_{xx}, 0<x<∞ , t>0 u(x,0) = u_{init}, 0<x<∞ u(0,t) = u_{o},_{x→∞}u(x,t) = u_{init}),t>0with D, u_{init}, u_{o}constants. 1. Seek u(x,t) as a function of a "similarity variable", i.e. as u(x,t) = w(ξ) with ξ = x / √t Plug into the heat equation to obtain the ODE for w(ξ): w ′′ + (ξ/(2D)) w ′ = 0 2. Solve the ODE explicitly to find its general solution: w(ξ) = (A√π /2) erf( ξ / (2√D) ) + B, with A, B arbitrary constants. Therefore u(x,t) = (A√π /2) erf( x / (2√(D t) ) ) + B . 3. Apply the BC and IC to find A, B, thus obtaining the explicit similarity solution u(x,t) = u_{o}+ (u_{init}− u_{o}) erf( x / (2√(Dt) ) ), valid for 0≤x<∞ , t≥0.