\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\newcommand{\undb}{\underbrace}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}

{\bf Question}

Solve the diffusion equation

$$\ds\frac{\pl f}{\pl t}-\ds\frac{\pl ^2 f}{\pl x^2}=h(x,t)$$

by Laplace transforms, subject to the following boundary
conditions in the specified domains:

\begin{description}
\item[(i)]
$h(x,t)=\delta(x-x_0)\delta(t-t_0),\ 0<x<\infty,\ 0<t<\infty$

$f(x,0)=0,\ f(0,t)=0,\ f,\ f_x \to 0$ as $x \to \infty$.

\item[(ii)]
$h(x,t)=0,\ -\infty<x<x\infty,\ 0<t<\infty$

$f(x,0)=F(x),\ f(0,t)=0,\ f,\ f_x \to 0$ as $x \to \infty$.

\item[(iii)]
$h(x,t)=0,\ 0<x<1,\ 0<t<\infty$

$f(x,0)=F(x),\ f(0,t)=f(1,t)=0$

\end{description}

Hints: For (i) use a Fourier sine transform in $x$, and a Laplace
transform in $t$. Then follow the lecture example carefully. For
(ii) Laplace transform in $t$ not $x$, and then Fourier transform
in $x$. For (iii) solve by a Laplace transform and then obtain the
inverse transform either from the infinite series formula

$$\ds\frac{1}{\sinh\sqrt{\sigma}}=2\exp(-\sqrt{\sigma})
\sum_{n=0}^{\infty}\exp(-2n\sqrt{sigma})$$

or from a series of residues (no branch cut is needed). Note these
examples will be the hardest you meet, either here or on the exam!

\medskip

{\bf Answer}

\begin{description}
\item[(i)]
This is similar to the lecture example, only that here we have
$0<x<\infty$ rather than $-\infty<x<+\infty$. So we do a
$\ds\frac{1}{2}$ range Fourier Transform in $x$ followed by the
Laplace transform in $t$.

We use a \un{sine} transform, rather than a \un{cosine} transform,
since $f(0,t)=0$.

$\left\{\begin{array}{ll} 0=\ds\int_0^{\infty}\left\{\ds\frac{\pl
f}{\pl t}-\ds\frac{\pl^2 f}{\pl
x^2}-\delta(x-x_0)\delta(t-t_0)\right\}\sin kx\ dx\\
0=\ds\int_0^{\infty} f(x,0) \sin kx\ dx=\hat{f}(0) \end{array}
\right.$

$\Rightarrow \left\{\begin{array} {ll}
\ds\frac{d\hat{f}}{dt}+k^2\hat{f}-\sin kx_0\delta(t-t_0)=0\\
\hat{f}(0)=0 \end{array} \right.$

Laplace Transform in $t$:

$\ds\int_0^{\infty}\left\{\ds\frac{d\hat{f}}{dt}+k^2\hat{f}-\sin
kx_0\delta(t-t_0)\right\}=0$

$\Rightarrow p\hat{\bar{f}}-\hat{f}(0)+k^2\hat{\bar{f}}-\sin
kx_0e^{-pt_0}=0$

\hspace{1in} $\stackrel{\uparrow}{=0\ \rm{by\ b.c.}}$

$\Rightarrow \hat{\bar{f}}=\ds\frac{\sin kx_0e^{-pt_0}}{(p+k^2)}$

Invert the Laplace Transform by standard rules or inversion
integral:

$$\bar{f}(k)=\ds\frac{1}{2\pi i}\ds\int\ds\frac{dp\ \sin
kx_0}{(p+k^2)}e^{p(t-t_0)}$$

\hspace{2in} \setlength{\unitlength}{.1in}\begin{picture}(0,2)

\put(0,0){\vector(0,1){1}}

\put(0,1){\line(0,1){1}}

\end{picture}

$\left.\begin{array}{l} \rm{For}\ t>t_0\ \rm{complete\ to\ left\
etc.} \cdots\\ \rm{For}\ t<t_0\ \rm{complete\ to\ right\ etc.}
\cdots \end{array}\right\} u(t-t_0)\ \rm{needed}$

Get residue at $p=-k^2$ for $t>t_0$

$\Rightarrow \bar{f}(k)=\sin kx_0 e^{-(t-t_0)k^2}e(t-t_0)$

Invert the sine transform

$$f(x,t)=\ds\frac{1}{\pi}\ds\int_0^{\infty}dk\ \sin kx_0
e^{-k^2(t-t_0)} u(t-t_0)\sin kx$$

But $\sin kx_0\sin kx=\ds\frac{1}{2}\cos
k(x-x_0)-\ds\frac{1}{2}\cos k(x+x_0)$

So the integral $\ds\int dk$ reduces to two integrals of the form

$\ds\int_0^{\infty}dk\ \cos kXe^{-k^2T};\
X=\left\{\begin{array}{l}x+x_0\\ x-x_0 \end{array} \right.,\
T=t-t_0$

$=Re\left\{\ds\frac{1}{2}\ds\int_{-\infty}^{+\infty}
e^{-k^2T+ikx}dk\right\}$ (NB good trick to know)

$=Re\left\{\ds\frac{1}{2}\ds\int_{-\infty}^{+\infty}
e^{-\left(kT^{\frac{1}{2}}-\frac{iX}{2T^{\frac{1}{2}}}\right)^2-\frac{X^2}{4T}}\
dk\right\}$

$=\ds\frac{e^{-\frac{X^2}{4T}}}{2}\sqrt{\ds\frac{\pi}{T}}$

\ \ \ \ \ \ \vdots

$\Rightarrow f(x,t)=\ds\frac{u(t-t_0)}{\sqrt{4\pi(t-t_0)}}
\left\{e^{-\frac{(x-x_0)^2}{4(t-t_0)}}-e^{-\frac(x+x_0)^2}{4(t-t_0)}\right\}.$

\item[(ii)]
Laplace in $t$ and Fourier in $x$:

\begin{eqnarray*} \ds\int_0^{\infty}\ds\frac{\pl f}{\pl t}e^{-tp}\
dt & = & \ds\int_0^{\infty}\ds\frac{\pl^2 f}{\pl x^2}e^{-pt}\ dt\\
\Rightarrow p\bar{f}-f(x,0) & = & \ds\frac{\pl ^2 \bar{f}}{\pl
x^2}\\ p\bar{f}-F(x) & = & \ds\frac{\pl ^2 \bar{f}}{\pl x^2}
\end{eqnarray*}

For each $p$ this is an ODE in $x$ for $\bar{f}(x,p)$ i.e.,

$$p\bar{f}-F(x)=\ds\frac{d^2\bar{f}}{dx^2}$$

Fourier transform in $x$ (we can't solve it directly if we don't
know $F(x)$)

$p\hat{\bar{f}}-\hat{F}(k)=-k^2\hat{\bar{f}} \Rightarrow
\hat{\bar{f}}=\ds\frac{\hat{F}(k)}{(p+k^2)}$

Invert the Laplace transform:

$$\hat{f}(k)=\ds\frac{1}{2\pi i}\ds\int \ds\frac{dp\
e^{pt}\hat{F}(k)}{p+k^2}$$

\hspace{2.23in} \setlength{\unitlength}{.1in}\begin{picture}(0,2)

\put(0,0){\vector(0,1){1}}

\put(0,1){\line(0,1){1}}

\end{picture}

\newpage
Complete to the left for $t>0$, semicircle contour vanishes to
give pole contribution from $p=-k^2$

$$\hat{f}(k)=e^{-k^2t}\hat{F}(k).$$

Require the Fourier inversion of a product of Fourier transforms
$e^{-kt}$ and $\hat{F}(k) \Rightarrow$ convolution

\begin{eqnarray*} \Rightarrow f(x,t) & = & \Im^{-1}[e^{-k^2t}] \ast
\Im^{-1}[\hat{F}(k)]\\ f(x,t) & = & \ds\frac{1}{\sqrt{2\pi t}
\ds\int_{-\infty}^{+\infty}\undb{e^{-\frac{(x-y)^2}{4t}}}}F(y)\,
dy\end{eqnarray*}

\hspace{1.5in} Fourier Transform
$\left[\ds\frac{e^{-\frac{x^2}{4t}}}{\sqrt{4\pi
t}}\right]=e^{-k^2t}$
\end{description}
\end{document}
