Calculus 3 Lab 2
Partial derivatives, diffusion, and
waves
Note
- Lab may be changed or updated: Last changed 10/8/2009
Figure 1: Catching a wave.
Figure 2: A heated metal rod.
Partial derivatives and partial differential equations (PDE's)
are essential
in engineering, mathematics and science. In this lab we examine two of
the most fundamental partial differential equations: the wave equation
and the heat equation. While these equations appear similar, the
solutions differ greatly. We will examine solutions of these equations
in one and two spatial dimensions. Solving these equations is beyond
the
scope of this course, so the aforementioned solutions are provided.
I. Instructions
This lab is due at the start of recitation Thursday October 29.
Late labs are not accepted. You are encouraged to work in
groups of no more than 3 people, though you can work alone.
On your title page, clearly mark
- Names
- Student ID numbers
- Section number and professor
- If you do not include this information, as much as
10% will be deducted from your final score
- Only hand in one copy per group
- DO NOT just copy your entire mathematica notebook as your appendix. You should put some thought into exactly what needs to be included.
Format is worth 20% of your grade. Please refer to the following
writing guidelines for the expository sections of this report:
Writing
Guidelines for Calculus Labs
You are required to know and follow the Writing
Guidelines for all labs. For some sample "good" and "bad" labs see:
Sample
Labs
II. Goals
The goals with this lab are to:
- Learn how to use computers to plot contours,
surfaces, and curves.
- Give practice with partial derivatives, the chain rule, and
level sets.
- Improve technical writing skills.
III. Mathematical Background
IIIa. Preliminaries
The necessary topics for this lab are partial derivatives, the chain
rule, and level sets. For a review of these areas please consult chapter 12 sections 1, 3, and 5 in Thomas and Finney.
IIIb. The Heat Equation and Initial Conditions
The heat equation is:
ut = a uxx
Here u
denotes the amount of heat as a funtion of x and t, uxx
denotes the second derivative with respect to the space variable, ut
denotes the first derivate with respect to the time variable,
and a
is a constant (for the purposes of this lab). The heat equation is
extended to higher dimensions through the use of partial derivatives of
multiple space variables:
ut = a (uxx + uyy).
This equation, sometimes called the diffusion equation, models the
dissipation of heat in a medium whose properties are determined by the
constant a,
the shape of
the medium (boundary conditions), and the initial conditions. For this
lab we will consider initial value problems, i.e. the solution has to satisfy
the PDE and the initial condition. For the heat equation
we only require one initial condition:
u(x, t = 0) = f(x)
IIIc. The Wave Equation and Initial Conditions
The wave equation is:
utt = c2 uxx
Here u
denotes the amplitude of a wave as a funtion of x and t, uxx
denotes the second derivative with respect to the space variable, utt
denotes the second derivate with respect to the time
variable, and c
is a constant. This equation models the propagation of waves in a medium whose
properties are determined by the constant c,
the shape of the
medium (including boundary conditions), and the initial conditions. Note that in many applications c is not a
constant, such as in the seismic
measurements of the subsurface. The
wave equation is also extended to higher dimensions through a similar
use of partial derivatives with respect to more space
variables:
utt = c2 (uxx
+ uyy)
We will consider initial value problems here as well, so once again the solution has to satisfy the PDE and the initial condition. However, for the wave equation we must specify two initial conditions: not only the initial position of the variable u, but also the initial "velocity" ut:
u(x, t = 0) = f(x)
ut(x,
t = 0) = g(x)
Important: Note
that one of the conditions is on the first derivative with respect to
time!
IIId. Boundary Value Problems
When dealing with partial differential equations the boundaries of a
region must be taken into consideration. Thus, for typical problems in one spatial dimension, one
has to satisfy two more equations: a boundary condition at each
endpoint of the interval. Therefore, to obtain a solution, one must solve the partial differential equation, the initial conditions, and the boundary conditions. For example, consider the heat equation problem
on a finite domain
x ε
[-Pi , Pi] :
ut = a uxx
u(x, t = 0) = f(x)
u(-Pi, t) = g(t)
u(Pi, t) = h(t)
There are boundary value problems for
the wave equation as well. However, we will only consider those associated with the heat equation in this lab.
IV. Problem Statement
You are required to study, produce results, and write a report on the following problem:
Suppose you are an engineer who was hired by an educational website
to write the content for a program on wave propagation and heat
flow. The audience for this program is the average undergraduate calculus 3 student. Thus, you may assume
that the reader has a basic understanding of the concepts of partial derivatives, the chain rule, and
level sets.
The company wants an in depth exploration of two partial
differential equations: the wave equation and the heat equation.
Eventually, the goal is to produce a website that has 1.) sample solutions for each of these equations in one and two dimensions, 2.) proof that the solutions satisfy the respective partial differential equations, 3.) plots demonstrating the evolution of the solutions in time and space, and 4.) a physical
interpretation of the differences between the solutions generated by each of the equations.
For 1-D problems the client wishes to examine the following
cases:
- The wave equation with
the following initial conditions and corresponding solutions (don't worry about boundary conditions here. For x ε
[-Pi , Pi] the boundary conditions reduce to a special case called periodic boundary conditions):
u(x,t) = cos (x - ct)
u(x, t = 0) = cos (x)
ut(x, t = 0) = c (sin (x))
and
u(x,t) = sin (x + ct)
u(x, t = 0) = sin (x)
ut(x, t = 0) = c (cos (x)),
- The heat equation with
the following initial conditions, boundary conditions, and corresponding solutions on x ε
[-Pi , Pi]:
u(x,t) = (1/2) e-at cos
(x) + 1/2
u(x, t = 0) = (1/2) cos (x) + 1/2
ux(-Pi, t) = 0
ux(Pi, t) = 0
and
u(x,t) = (1/2) e-at sin
(x) + 1/2
u(x, t = 0) = (1/2) sin (x) + 1/2
u(-Pi, t) = 1/2
u(Pi, t) = 1/2.
For the 2-D problems you will not have to worry about boundary conditions. The
client wishes to examine the following cases:
- The wave equation with initial conditions and the corresponding
solution:
u(x, y, t) = sin(x - ct) + cos(y + ct)
u(x, y, t = 0) = sin(x) + cos(y)
ut(x, y, t = 0) = -c (cos(x) + sin(y)).
- The heat equation with the initial condition and the corresponding
solution:
u(x, y, t) = exp(-2at) (sin(x) sin(y)) + 1
u(x, y, t = 0) = sin(x) sin(y) + 1.
The following section will outline a few exercises, which
should guide you
solving this project.
The subsequent section will explain how you should write your
report.
Figure 3: The Great Wave off of Kanagawa by Katsushika Hokusai
V. Lab Exercises
Did
you know that you can make movies with Mathematica? Look up the
Manipulate
command in the Mathematica notebook below. Don't email any animations
to your TA's, we do not need them. Animating the solutions help
you understand their behavior. They are fun and easy too!
- Show that the 1-D solutions provided by the client satisfy the
wave equation and the heat equation along with their respective initial
conditions (and boundary conditions if they apply). It is very important to note that the partial
differential equation,
the initial conditions, and the boundary conditions are satisfied. Explain what it means for a
solution to satisfy these equations.
- Plot the given initial conditions (t = 0) for the
wave equation (c = 1 for plots from now on) and the heat equation (a = 1 for plots from now on) on the domain x ε
[-Pi , Pi].
- Plot the solutions (both wave and heat equation) for t = Pi / 8, t = 3 Pi / 8, t = 5 Pi / 8, t = 7 Pi / 8. (Hint: to see the behavior of these solutions use animations!)
- Do the plots made in the last part make sense? How does the
behavior of the solutions for each PDE compare? Do the names of the equations (the
wave equation and the heat equation) correspond to the behavior you observe in your
solutions? Explain.
- Compare the two different 1-D wave equation solutions. How are they different?
- What happens when you make c bigger? What happens when you make it smaller? (Hint: use manipulate)
- Based on these results, what does c represent?
- Assume that the two different 1-D heat equation solutions model
heat distributions on a thin rod. The boundary conditions represent the
ends of the rod. In one case, the ends of the rod are insulated (no
heat can escape). The other case is when the ends of the rod are held
at a constant temperature. Which one is which? What happens to the heat
in each case? Explain.
- What happens when you make a bigger? What happens when you make it smaller? (Hint: use manipulate)
- Based on these results, what does a represent?
- Show that the 2-D solutions provided by the client satisfy the 2-D wave
equation and 2-D heat equation along with their respective initial
conditions. It is very important to note that both the partial
differential equation and
the initial conditions are satisfied. Explain what it means for a
solution to satisfy the equations and initial conditions for two dimensions. (Hint: You may take advantage of Mathematica while still showing
the logical steps.)
- Plot the given initial conditions (t = 0, this time for the 2-D
case!) for the wave equation (c = 1) on the
domain (x,y) ε [- Pi , Pi] x [-Pi , Pi] and the heat equation (a = 1) on the
domain (x,y) ε [-Pi , Pi] x [-Pi , Pi].
- Plot all the solutions of the 2-D wave and heat equation
at t = Pi / 8, t = 3 Pi / 8, t = 5 Pi / 8, t = 7 Pi / 8. First do this using ContourPlot (you may need to increase the number of contours for the heat equation) and then plot the same thing using Plot3D. Use the domain (x,y) ε [-Pi , Pi] x [-Pi , Pi] and take c = 1 and a = 1 . (Hint: to see the behavior of these solutions use animations!)
- Do the plots made for the 2-D solutions make sense? How does the
behavior of each of the 2-D solutions compare? How do these solutions compare with the 1D cases? Explain.
- The results of the Mathematica function ContourPlot are a topic recently discussed in calculus 3. What objects does
this function show? Give a heuristc explanation of how to obtain these
objects from the results of the Mathematica function Plot3D .
- Notice that for both 1-D and 2-D cases we needed only one initial condition for the heat equation, but two initial conditons for the wave equation. Explain why this is the case. What part of the equations dictate the number of initial conditions? Explain how many initial conditions would be needed to solve the equation
utttt = a uxx.
- Consider Airy's Equation given by
ut = -uxxx.
In what ways do you expect solutions to be similar to the solutions studied above? Do you expect solutions to be more similar to solutions of the wave or heat equation? Explain.
- Show that
u(x,t) = ei(ax + a3t)
is a solution to Airy's equation, where a is a real constant and i is the imaginary unit such that i2 = -1. (Note: you do not have to plot any solutions, just show that it satisfies the PDE.)
The following links contain
Mathematica Notebooks that
contain commands applicable
to the exercises:
Basic Plots and Derivatives in Mathematica,
Contour and 3-D plots, along with partial derivatives in Mathematica and
Animations in Mathematica. Note that you
must
download these files to use them. Just opening the link will show you
the mathematica source code, which is useless to you. So, open the file in your web-browser, save it to your computer, and then open it in Mathematica.
Organize the work you did in completing these exercises in a concise
and understandable way. "What needs to be in your report?", you might
ask. Read on.
VI. Lab Report
Your report needs to accurately and consistently describe the steps you
took in checking the solutions of the partial differential equations
and initial conditions. It should also contain the appropriate
plots and in-depth explanation of the behavior of the solutions.
This report should have the look
and feel of a technical paper, NOT a worksheet with an introduction and conclusion attached! An outline is included
below.
- Your report should begin with an introduction. This should
briefly describe what you plan to say in the body of your report. You
should also provide a brief list of the mathematical concepts that you
will use to make your arguments and perform your calculations.
- The details of your work should be described in the body of
your report. At the very least, you should discuss/include the following:
- Demonstrate that the provided solutions actually solve the
equations and initial conditions in both one- and two-dimensions (this
is similar to problems 12.3.69 and 12.3.63 in Thomas and Finney).
Explain what it means for functions to satisfy these equations. For
example, is the behavior of the solution determined by the equation?
- Provide plots of both the initial conditions and the solutions at the aforementioned t
values for both equations in one spatial dimension and in two spatial dimensions.
- Use the questions above as guidelines for the discussion
of your results. Make sure that you discuss all of the lab
exercises above! Note that you do not have to discuss the questions in
order. Instead, you should logically organize your report into sections
that make the report flow. For example, you could split the report into
one section for the wave equation and one section for the heat
equation, or a 1-D and a 2-D section, or something else that makes sense.
- One the most important parts of this lab is that you need to compare how the ContourPlot and the Plot3D
results are related. We are looking for something specific here. Explicitly,
what do the contour lines mean with respect to the 3-D plot and what
concept from calculus do they represent?
- Finally, you should summarize what you have accomplished in
a conclusion. No new information or new results
should appear in your conclusion. You should only review the highlights
of what you wrote about in the body of your paper. Briefly, what were you investigating?
What were the overall results? Do you have any suggestions to better
analyze/describe the same problem which were not addressed in your current work?
Lab updated by Sebastian Skardal, October 2009.
Lab created by Matt Reynolds, June 2007.