Consider the diffusion equation in 1-dimension with fixed boundary conditions.
- 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
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,
. (The minus sign comes
from the fact that I know I want
, and I have solved the
problem before.)
Therefore,
The sign of
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
and that
where n is any integer.
Thus, we have a general solution
and the full solution is a linear combination of these solutions.
The coefficients, cn, are the Fourier coefficients of
the initial conditions because
- 2.
- Solve with problem with initial conditions
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.
In this case, the Fourier coefficients are
Figure 1:
Approximate solution to problem 2 at t=1 with 5 terms, 20 terms and 50
terms of the Fourier series.
 |
- 3.
- Solve with problem with initial conditions
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,
Figure 2:
Approximate solution to problem 3 at t=1 with 5 terms, 20 terms and 50
terms of the Fourier series.
 |
- 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?