\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\ud}{\underline}
\newcommand{\lin}{\int_0^\infty}
\parindent=0pt
\begin{document}


{\bf Question}

The equation governing the temperature $u(x,t)$ in a bar of metal
of length $l$ is $$ {{\partial^2u}\over {\partial x^2}}-{1 \over
k} {{\partial u} \over {\partial t}}=0 $$ The ends of the bar are
held at zero temperature, so that $$ u(0,t)=0 \hbox{ and }
u(l,t)=0 \hbox{ for all }t>0 $$ The initial temperature is given
by $u(x,0)=f(x)$ for $0 \leq x \leq l$.
\begin{description}
\item[(a)] Find the temperature $u(x,t)$ at some future time $t$ if
$f(x)$ is given by $$ f(x)=3\sin\left({{4\pi x} \over l}\right) $$

\item[(b)] Find the temperature if $k=100$, $l=1$ and  $f(x)$ is
given by $$ f(x)=\sin 2\pi x-2\sin 5\pi x \qquad 0 \leq x \leq 1
$$
\end{description}



\vspace{.5in}

{\bf Answer}

Let $y(x,t)=X(x)T(t)$ so that $$ \frac{X''}{X} =
\frac{1}{k}\frac{T''}{T} = \lambda$$ $$\Rightarrow X'' - \lambda X
= 0$$

$\ds X(0) = 0 $ and $\ds X(l) = 0$ $$\Rightarrow \lambda =
-\frac{n^2\pi^2}{l^2}$$

Therefore \begin{eqnarray*} X_n(x) & = & A_n \sin \left(\frac{n\pi
x}{l}\right) \\ T' & = & -\frac{n^2\pi^2k}{l^2} T \\ T_n(t) & = &
B_n e^{-\frac{n^2\pi^2kt}{l^2}} \end{eqnarray*}

Thus \begin{eqnarray*}u(x,t) & = & \sum_{n = 1}^\infty Q_n
\sin\left( \frac{n \pi x}{l} \right) e ^{-\frac{n^2\pi^2kt}{l^2}}
\\ f(x) & = &\sum_{n = 1}^\infty Q_n \sin\left( \frac{n \pi x}{l}
\right) \end{eqnarray*}

If $\ds f(x) = 3 \sin \left(\frac{4\pi x}{l} \right)$ then $Q_4 =
3$ and $ Q_n = 0$ otherwise.  So $$ u(x,t) = 3 \sin \left( \frac{4
\pi x}{l} \right) e^{-\frac{16\pi^2 kt}{l^2}}$$

If $\ds l = 1 $ then $\ds f(x) = \sum_{n - 1}^\infty Q_n \sin
(n\pi x)$.  But $\ds f(x) = \sin(2 \pi x) - 2 \sin (5 \pi x)$

$\Rightarrow Q_2 = 1 \hspace{.1in} Q_5 = -2$ and $ Q_n = 0$
otherwise. So $$ u(x,t) =  \sin (2\pi x) e^{-400 \pi^2t} - 2 \sin
(5\pi x) e^{-2500 \pi^2t}$$


\end{document}
