# Toronto Math Forum

## APM346-2015S => APM346--Tests => Test 1 => Topic started by: Victor Ivrii on February 12, 2015, 07:29:27 PM

Title: TT1 Problem 5
Post by: Victor Ivrii on February 12, 2015, 07:29:27 PM
$\newcommand{\erf}{\operatorname{erf}}$
Write the solution of the diffusion equation on a half line
\begin{align*}
&u_t -9u_{xx}  =0, \qquad&& 0<x<+\infty,\ t>0\\
&u(x,0) = e^{-x} ,\\
&u (0,t)= 0 ;
\end{align*}
solution must be expressed through
\begin{equation*}
\erf (z)= \sqrt{\frac{2}{\pi}}\int_0^z e^{-\frac{s^2}{2}}\,ds.
\end{equation*}
Title: Re: TT1 Problem 5
Post by: Jessica Chen on February 12, 2015, 10:00:28 PM
Question 5
Title: Re: TT1 Problem 5
Post by: Victor Ivrii on February 14, 2015, 06:07:19 AM
Difficult to read, I will try but the typed solution would be much more useful for everyone. Since it is  Dirichlet problem $e^{-y}$ is extended as an odd function to $y<0$: it is $-e^y$ there. Then solution is given by

u(x,t)=\frac{1}{\sqrt{4k\pi t}}\int _0^\infty \Bigl( \exp \bigl(-\frac{(x-y)^2}{4kt}\bigr) - \exp \bigl(-\frac{(x+y)^2}{4kt}\bigr)\Bigr)e^{-y}\,dy=
u_1+u_2
\label{a}

and we consider only the first term as the second term is obtained by replacing $x$ by $-x$ and changing sign:  $u_2(x,t)=-u_1(-x,t)$. Then

u_1(x,t)=\frac{1}{\sqrt{4k\pi t}}\int _0^\infty  \exp \bigl(-\frac{(x-y)^2}{4kt}-y\bigr) \,dy
\label{b}

and let us note that
\begin{equation*}
-\frac{(x-y)^2}{4kt}-y= -\frac{y^2 - 2xy +4kt y +x^2}{4kt} =  -\frac{(y-x +2kt )^2 }{4kt}-x +kt
\end{equation*}
and therefore

u_1(x,t)=\frac{1}{\sqrt{4k\pi t}}e^{-x+kt}\int _0^\infty  \exp \bigl(-\frac{(y-x+2kt)^2}{4kt}\bigr) \,dy=
\frac{1}{\sqrt{2\pi }}e^{-x+kt}\int _{\frac{-x+2kt}{ \sqrt{2kt}}}^\infty  e^{-\frac{s^2}{2}} \,ds=
\frac{1}{2}e^{-x+kt}\Bigl(1-\erf \bigl(\frac{-x+2kt}{ \sqrt{2kt}}\bigr)\Bigr).
\label{c}

Then

u(x,t)= \frac{1}{2}e^{-x+kt}\Bigl(1-\erf \bigl(\frac{-x+2kt}{ \sqrt{2kt}}\bigr)\Bigr)-
\frac{1}{2}e^{x+kt}\Bigl(1-\erf \bigl(\frac{x+2kt}{ \sqrt{2kt}}\bigr)\Bigr).
\label{d}