Diffusion Examples

William O. Bray
University of Maine

The purpose of this notebook is to illustrate graphically the solution to the heat equation on the real line. The intial value problem has the form
diffusion-line_1.gif
IC: u(x,0)=f(x)

The Gaussian

In[29]:=

diffusion-line_2.gif

The above defines the heat kernel. In what follows are several
examples of solutions to the Cauchy problem for the heat equation.
These illustrate ideas presented in class.

In[30]:=

diffusion-line_3.gif

Out[30]=

diffusion-line_4.gif

Example 1

In[31]:=

diffusion-line_5.gif

Out[33]=

diffusion-line_6.gif

Notice that the above formula is the same as obtained in the text obtained by hand calculation and using the definition of the error function.

In[34]:=

diffusion-line_7.gif

Out[34]=

diffusion-line_8.gif

A three dimensional rendition of the solution is given as follows.

In[35]:=

diffusion-line_9.gif

Out[35]=

diffusion-line_10.gif

Example 2

In[37]:=

diffusion-line_11.gif

Out[39]=

diffusion-line_12.gif

In[40]:=

diffusion-line_13.gif

Out[40]=

diffusion-line_14.gif

The initial data above is an odd function. The following plot illustrates that our solution also gives the solution to an IBVP on the half-line with homogeneous Dirichlet boundary condition at x=0. This foreshadows the method of reflection discussed in Chapter 4 of the text.

In[41]:=

diffusion-line_15.gif

Out[41]=

diffusion-line_16.gif

Example 3

In[42]:=

diffusion-line_17.gif

Out[44]=

diffusion-line_18.gif

In[45]:=

diffusion-line_19.gif

Out[45]=

diffusion-line_20.gif

In[46]:=

diffusion-line_21.gif

In[47]:=

diffusion-line_22.gif

Out[47]=

diffusion-line_23.gif

In[48]:=

diffusion-line_24.gif

Out[48]=

diffusion-line_25.gif

In[49]:=

diffusion-line_26.gif

Out[49]=

diffusion-line_27.gif

Spikey Created with Wolfram Mathematica 8.0