next up previous
Next: About this document ...

Problem set #6

Consider the diffusion equation in 1-dimension with fixed boundary conditions.

\begin{eqnarray*}u_t & = & \frac{1}{1000} u_{xx} \\
u(0,t) & = & 0 \\
u(2,t) & = & 0
\end{eqnarray*}


1.
Use separation of variables to find a solution to this problem in terms of Fourier series.


First, we separate variables.

u(x,t) = f(x)g(t)

Then, if we substitute this expression into the PDE and divide by u = fg, we obtain

\begin{displaymath}\frac{1000 g'}{g} = \frac{f''}{f}.
\end{displaymath}

The expression on the left is a function of t only and the expression on the right is a function of x only. Thus, each must be equal to some separation constant, $-\lambda$. (The minus sign comes from the fact that I know I want $\lambda>0$, and I have solved the problem before.)

\begin{eqnarray*}g' & = & -\frac{\lambda}{1000} g \\
f'' & = & - \lambda f
\end{eqnarray*}


Therefore,

\begin{displaymath}g = A e^{-\lambda t}.
\end{displaymath}

The sign of $\lambda$ affects whether or not we have oscillatory solutions or exponential solutions. Since the boundary conditions are zero at each side, we see that the only possible solutions are oscillatory ones. To satisfy the boundary conditions at both ends, we see that

\begin{displaymath}f = c \sin(\sqrt{\lambda}x)
\end{displaymath}

and that

\begin{displaymath}\lambda = \frac{n^2 \pi^2}{4}
\end{displaymath}

where n is any integer. Thus, we have a general solution

\begin{displaymath}u_n(x,t) = c_n e^{-\frac{n^2 \Pi^2 t}{4000}} \sin \left(\frac{n \pi x}{2}\right)
\end{displaymath}

and the full solution is a linear combination of these solutions.

\begin{displaymath}u (x,t) = \sum^{\infty}_{n=1} c_n e^{-\frac{n^2 \pi^2 t}{4000}} \sin \left(\frac{n \pi x}{2}\right).
\end{displaymath}

The coefficients, cn, are the Fourier coefficients of the initial conditions because

\begin{displaymath}u(x,0) = \sum^{\infty}_{n=1} c_n \sin \left(\frac{n \pi x}{2}\right)
\end{displaymath}


2.
Solve with problem with initial conditions

\begin{displaymath}u(x,0) = \begin{cases}
2 & \frac{1}{3} \leq x \leq \frac{2}{3...
...{3} \leq x \leq \frac{5}{3} \\
0 & {\rm otherwise}
\end{cases}\end{displaymath}

Examine plots of the solution at t=0 and t=1 using the first 5 terms, the first 10 terms, the first 20 terms and the first 50 terms of the series solution.


As stated before, the cn's come from the initial conditions.

\begin{displaymath}c_n = \frac{\int_0^2 u(x,0) \sin\left(\frac{n \pi x}{2}\right)
dx}{\int_0^2 \sin^2 \left(\frac{n \pi x}{2}\right) dx}
\end{displaymath}

In this case, the Fourier coefficients are

\begin{displaymath}c_n = \frac{2}{n \pi} \left[
\cos\left(\frac{2 n \pi}{3}\righ...
...5 n \pi}{6}\right)-
2\cos\left(\frac{n \pi}{3}\right)
\right].
\end{displaymath}


 
Figure 1: Approximate solution to problem 2 at t=1 with 5 terms, 20 terms and 50 terms of the Fourier series.
\resizebox{2in}{!}{\includegraphics{fig1.eps}} \resizebox{2in}{!}{\includegraphics{fig2.eps}} \resizebox{2in}{!}{\includegraphics{fig3.eps}}


3.
Solve with problem with initial conditions

\begin{displaymath}u(x,0) = \begin{cases}
24\left(x-\frac{1}{3}\right) & \frac{1...
...{2} \leq x \leq \frac{5}{3} \\
0 & {\rm otherwise}
\end{cases}\end{displaymath}

Examine plots of the solution at t=0 and t=1 using the first 5 terms, the first 10 terms, the first 20 terms and the first 50 terms.


This problem is very similar to the second problem. The only difference is that it will have different Fourier series. In this case,

\begin{displaymath}c_n = \frac{48}{n^2 \pi^2}
\left[
4\sin\left(\frac{n \pi}{4}\...
...ac{n \pi}{3}\right)-
2\sin\left(\frac{n \pi}{6}\right)
\right]
\end{displaymath}


 
Figure 2: Approximate solution to problem 3 at t=1 with 5 terms, 20 terms and 50 terms of the Fourier series.
\resizebox{2in}{!}{\includegraphics{fig4.eps}} \resizebox{2in}{!}{\includegraphics{fig5.eps}} \resizebox{2in}{!}{\includegraphics{fig6.eps}}


4.
Both of the initial conditions describe initial concentrations near x=1/2 and x=3/2. For the two different initial conditions above, which solution converges faster. Explain your conclusion in terms of the Fourier coefficients. Hint: Look at the rate of convergences of the coefficients.


From the figures, we can see that the third problem converges to a solution much faster than the second problem. That is, the second problem requires all 50 terms before the oscillations start to fade away. The third problem looks fairly clean after 10 or 20 terms. Some students examined the relative sizes of the coefficients as a function of n which is a fine way to go. Better still, one can examine the coefficients in analytic form and see that the coefficients for the second problem decay like 1/n while the coefficients for the third problem decay like 1/n2. Interestingly, the harmonic series 1+1/2+1/3+... diverges yet the solution to the second problem converges, albeit slowly. Why, do you suppose this happens?



 
next up previous
Next: About this document ...
Louis F Rossi
2001-12-07