Why a PDE needs extra conditions
Lesson 6.3.1 found many solutions of each equation. The heat equation is solved by , by , by and by any sum of these. The transport equation is solved by for every function .
An ODE has the same problem on a smaller scale. In lesson 6.1.1, has the solutions , and one number, the starting value , picks out one of them. A second-order ODE needs two numbers (lesson 6.2.2).
A PDE has a whole function's worth of freedom, like the in . So its extra conditions are functions too, each given along an edge of the region. The region is the set of points where the equation must hold.
The initial condition
An initial condition gives the whole profile at the start: for every in the region. It is the PDE version of .
On the whole line, an initial condition is enough for both of lesson 6.3.1's time-dependent equations. For the transport equation, fixes the shape, so the solution is . For the heat equation it fixes the solution too, among solutions that stay bounded (stated here without proof).
Example. Start the heat equation from . Lesson 6.3.1 found that is a solution, and at it equals . So it is the solution: at it is .
Rule: Initial condition
The profile at , given at every of the region. The equation then says how it changes as grows.
Try it
The residual of the heat equation, then the candidate at : it must equal the initial profile. The last line is its value at .
Boundary conditions
On a finite stretch , such as a rod of length , heat can flow in or out through the ends. So the problem must also say what happens there, at every time. These are boundary conditions: and , two given functions of time.
A boundary condition can give a slope instead of a value. An insulated end, through which no heat flows, has there.
Example 1. On , start from and hold both ends at 0. Then fits all three conditions: it is 0 at and for every , and at .
Each region with its conditions on its edges: a forward problem starts from the bottom edge and moves up. A backward problem starts from the top edge, the final time, and moves down.
Example 2. Now hold the ends of a rod at 20 and 80. Start it at : a straight line with a bump. The solution is
The line solves the heat equation, since its and are both 0. The bump is a solution of lesson 6.3.1's kind, with , and it is 0 at both ends. The sum solves the equation (lesson 6.3.1) and fits every condition.
| time | 0 | 0.1 | 0.25 | 0.5 |
|---|---|---|---|---|
| at the middle, | 60 | 53.73 | 50.85 | 50.07 |
The bump dies away and the rod settles on the straight line from 20 to 80, its steady state. A steady state does not change, so and the equation becomes . That ODE's solutions are straight lines, fixed by the two end values as in lesson 6.2.2.
Try it
The first line checks Example 1: the residual, the two ends and the profile at . The second does the same for Example 2.
The loop is the table: the middle of the rod settling on 50.
Which ends need a condition
The heat equation is second order in , like the ODE , so it needs a condition at each end. The transport equation is first order in , and it needs a condition at one end only: the end where the shape comes in.
Take on , a shape moving right at speed 1. Start with an empty stream, , and feed in at the left end. Whatever enters at time reaches at time , so
At : , and . Feeding in instead gives 0.7769, 0.3935 and 0: a different solution with the same initial condition. So the condition at the inflow end is needed.
At the far end of a stretch , the values arriving are already fixed by what came in. A second condition there would usually contradict them, and then there is no solution at all.
Rule: Boundary conditions
Values (or slopes) at the ends of the region, for every time. An equation of second order in , such as the heat equation, needs one at each end. The transport equation needs one only where the shape comes in.
Conditions that disagree at a corner
The initial and boundary conditions meet at the corners of the region, such as . If they disagree there, the solution inherits the clash.
Feed into the empty stream above, where . The transport equation carries a jump from 0 to 1 along the line . The heat equation instead smooths such a clash at once (module 6.4).
Try it
stream is the solution above for any inflow g, at speed 1. Each line prints a point and the solution for the two inflows.
The last line feeds in a constant 1, which clashes with the empty start: at the jump sits at .
Terminal conditions: solving backwards
Some problems fix the end instead of the start. A terminal condition gives the profile at a final time : . The task is then to find at earlier times, down to , by solving backwards.
The natural equation for this is the heat equation with the sign of flipped: , that is, . Run backwards from , it spreads and smooths just as the heat equation does forwards.
Example. On with both ends at 0, take and . The solution is : it equals at , and .
| time | 1 | 0.75 | 0.5 | 0 |
|---|---|---|---|---|
| at | 1 | 0.7788 | 0.6065 | 0.3679 |
Read the table from left to right. The profile shrinks as you go back from the final time, as the heat equation's does going forward.
Time to go
The link is exact. Measure time backwards from the end, with , the time to go. By the chain rule (lesson 2.3.3), , since falls by 1 when rises by 1.
So becomes : the heat equation in . The terminal condition at is its initial condition at . In the example, , the solution of Example 1 with for .
Rule: Terminal condition
The profile at a final time , from which the equation is solved backwards. With the time to go , a backward problem becomes a forward one, with as its initial condition.
Case study 6.3.4 meets an equation of this kind: an option's value, fixed by its payoff at expiry.
Try it
The residual of and the profile at ; then the table. The last line writes the same solution in and checks the heat equation .
Well-posed problems
A problem made of an equation, a region and its conditions is well-posed when three things hold. A solution exists; there is only one; and a small change in the conditions changes the solution only a little. The last matters because real data are measured, and measurements are never exact.
The wrong direction
The heat equation run backwards fails the third test. Suppose and the profile at is , or : two profiles that differ by at most 0.001.
Going back, the part grows by , only 1.1052 by . But the ripple came from , since sharp wiggles die fast going forward. So going back, it explodes:
| how far back, | 0.01 | 0.1 | 0.5 |
|---|---|---|---|
| ripple size, heat equation backwards | 0.0027 | 22.03 | |
| ripple size, backwards | 0.00037 |
An invisible change in the data changes the answer by 22 a tenth of a unit earlier. The same ripple in a terminal condition for shrinks instead: that problem is well-posed.
Rule: Which way an equation runs
For . Give each equation the condition at the end it runs from. The other way round, tiny errors in the data grow without limit.
Try it
The loop prints the ripple's size going back by 0.01, 0.1 and 0.5 under each equation. The last line is the growth of the part over 0.1.
Common mistakes
- The equation alone does not fix the solution. Without conditions, the heat equation has for every , and more.
- Give the condition at the end the equation runs from. Initial for , terminal for . The wrong way round is not well-posed.
- Count the ends. The heat equation needs a condition at both ends, the transport equation only at the inflow end. A condition at the outflow end too usually leaves no solution.
- Keep the sign in . Time to go falls as time rises.
- A condition holds along a whole edge. means for every , not only at .
- Check the corners. If the initial and boundary values disagree there, the solution has a jump or a corner.
Initial, boundary and terminal conditions
0 of 11 correct
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
How to type answers
- Powers with
^:x^7,2^(1/3),a^-2. - Multiply with
*or by writing side by side:3x^2,2(x+1). ln(x)is the natural log,log(x, 2)is log base 2,eis Euler's number,sqrt(x)is a square root.sin(x),cos(x)andtan(x)take radians; writepifor π andsin(x)^2for sin²x.- Your first answer to each question is saved: it counts towards your score and brings the question back for review.
- Exact answers like
ln(20)/ln(3)are best. Decimals need about 4 significant figures.
Summary card
- A PDE alone has far too many solutions. Conditions along the edges of its region, the set of where it holds, pick out one.
- Initial condition: the profile . On the whole line it fixes the solution of the heat and transport equations.
- Boundary conditions: values (or slopes) at the ends, for every time. The heat equation needs one at each end; the transport equation only at the inflow end.
- With fixed end values the heat equation settles on a steady state, where : a straight line between the end values.
- Terminal condition: the profile at a final time, solved backwards. With , , and becomes the heat equation in .
- Well-posed: a solution exists, is unique, and moves only a little when the data do. The heat equation run backwards is not.