MA212: Assignment # 5

advertisement
MA212: Assignment # 5
Required reading:
• Textbook sections 10.1-10.3
To be turned in April 19 at the start of class.
Problems marked with ∗ require the use of maple.
1. Textbook §10.2 #’s 12, 13, 14, 22, 29, 30, 33, 36, 38, 46
2. Textbook §10.3, #’s 3, 5, 11abc
3.
∗
4.
∗
5.
∗
Rework problem 26 of section 10.1 using Maple. Find the solution using Maple’s dsolve command.
You may find a way to enter matrices into dsolve, or you may want to split the matrix back up
into individual equations.
Rework problem 30 of section 10.2 using Maple. Find the solution using Maple’s dsolve command.
You may find a way to enter matrices into dsolve, or you may want to split the matrix back up
into individual equations. Plot the three solutions on the same set of axes for t ∈ [0, 2].
In this problem, we will attempt to approximate the solution of a partial differential equation,
by using a system of ODE. Do not be scared just yet. This problem involves a lot of reading, but
not much work. The equation we will study is known as the heat equation, which in it’s simplest
2
= k ∂∂xu2 . u(x, t) is the temperature at position x at time t and k describes the heat
form is ∂u
∂t
conductivity.
The derivative of a function can be approximated using the definition.
f 0 (x) ≈
f (x + h) − f (x)
h
Don’t think too hard about this, but we can also approximate our second partial derivative.
∂ 2u
u(x + h, t) − 2u(x, t) + u(x − h, t)
≈
2
∂x
h2
Now, suppose we want to solve our PDE on the interval x ∈ [0, 1]. We can chop this up into 5
pieces at the points x = 0, 1/5, 2/5, 3/5, 4/5, 1. Now, we’ll name some new functions.
u0 (t)
u1 (t)
u2 (t)
...
u5 (t)
= u(0, t)
= u(1/5, t)
= u(2/5, t)
= u(1, t)
1
We are going to suppose that the temperature is fixed at 0 on the edges. So u0 (t) = u5 (t) = 0.
If we stick all of these ideas into the PDE then we find a system of ODE which will approximate
our PDE. Again, don’t think to hard about this. If you find it interesting, take a numerical PDE
course or come talk to me. For now, just trust me that this is all working perfectly.
u01 (t)
u02 (t)
u03 (t)
u04 (t)
=
=
=
=
25k(u2 (t) − 2u1 (t))
25k(u3 (t) − 2u2 (t) + u1 (t))
25k(u4 (t) − 2u3 (t) + u2 (t))
25k(−2u4 (t) + u3 (t))
Your job is to start with a a simple distribution of temperatures, u1 (0) = u2 (0) = u3 (0) = u4 (0) =
1, and use maple to solve the problem.
(a) Write this system of equations, including the initial conditions, in matrix form.
(b) Below is a plot that has n on the horizontal axis, and un (0) on the vertical axis. I’ve included
all values n ∈ {0, 1, 2, 3, 4, 5}. This shows you a rough picture of what the initial temperature
distribution looks like.
Now, set k=1/25 and solve the initial value problem using Maple. Make a plot that has n
on the horizontal axis, and un (1) on the vertical axis. This will show you a rough picture of
what the temperature distribution looks like at time t = 1.
Figure 1: un (0) versus n. To make this, I first loaded a plot package: with(plots). Then I used
the pointplot function: pointplot([[0,0],[1,1],[2,1],[3,1],[4,1],[5,0]], color=red, symbolsize=25). You can
easily repeat this with your values of un (1) in place of the values of un (0).
2
Download