PartA PerturbationTheory
PartA PerturbationTheory
1
W.R. Young
April 2017
1
Scripps Institution of Oceanography, University of California at San Diego, La Jolla, CA 92093–0230,
USA. [email protected]
Contents
1
6 Boundary Layers 65
6.1 Stommel’s dirt pile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2 Leading-order solution of the dirt-pile model . . . . . . . . . . . . . . . . . . . . . 67
6.3 Stommel’s problem at infinite order . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.4 A nonlinear Stommel problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
11 WKB 127
11.1 The WKB approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
11.2 Some examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
11.3 Validity of WKB and higher order terms . . . . . . . . . . . . . . . . . . . . . . 133
11.4 Eigenproblems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
11.5 Using bvp4c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
11.6 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
2
13 Initial layers 152
13.1 The over-damped oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
13.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
3
Lecture 1
def h
ǫ = ≈ 1.56 × 10−6 . (1.1)
R
(In these lectures ǫ will almost invariably denote a small dimensionless parameter and ≈ means
approximate equality.)
If d denotes the distance to the horizon then some Pythagorean geometry gives
d2 = 2Rh + h2 . (1.2)
d2 ≈ 2Rh . (1.3)
4
Is
th
is
an
i so
sce
l es
t ri
an
gle
or
ar
igh
tt
ria
ng
l e?
between from 6, 353km to 6, 384km. And of course the ocean is not flat: the actual horizon will
be perturbed by surface gravity waves and geostrophic currents. And clouds and haze obscure
the horizon. The order ǫ2 term we have neglected are probably less important than these other
complications. What is clear is that if want to improve on our first rough estimate in (1.3) we
must consider a better model than a smooth sphere (e.g., spheroidal Earth) and contend with
additional small parameters. This is a typical perturbation problem.
You may have trouble visually distinguishing this right-triangle from an isosceles triangle be-
cause the hypotenuse is very nearly equal to the long side1 .
Let’s be more general by considering right-triangles with sides
p
1, ǫ and 1 + ǫ2 .
Using the binomial theorem2 , and assuming that ǫ ≪ 1, the length of the hypotenuse is
p ǫ2
1 + ǫ2 = 1 + + ord(ǫ4 ) . (1.5)
2
So the difference between the long side and the hypotenuse is “order ǫ2 ” i.e., one part in one
hundred in figure 1.1. This small difference is hard to see. On the other hand, the small angle
in figure 1.1 is
θ = atan(ǫ) ≈ ǫ . (1.6)
You have no difficulty seeing the order ǫ small angle and the small side of the triangle: to
mistake the triangle for a line segment we’d have to make ǫ a lot less than 0.1.
1
This section is based on the first few chapters of Mathematical Understanding of Nature by V.I. Arnold.
2
It is very useful to remember that
5
Is this an ellipse
or a circle?
Figure 1.2: An ellipse with eccentricity e = 0.2; it certainly looks like a circle doesn’t it? The
point ∗ is at a focus.
As another example of the difference between ǫ and ǫ2 consider the ellipse in figure 1.2. The
eccentricity of this ellipse is e = 0.2 which is close to the eccentricity of the orbit of Mercury. I
picked Mercury because it has the most eccentric orbit of the eight planets in the solar system.
As you can see in figure 1.2, it is easy to mistake this ellipse for a circle. Kepler, analyzing
data collected by Tycho Brahe made this mistake: he thought that the orbit of Mars (e = 0.09)
was a circle with the Sun off-center. Later Kepler realized that the orbit of Mars is actually
a small-eccentricity ellipse with the Sun at a focal point. This confusion arises because the
distance of the foci from the center of an ellipse is of order e, while the difference between the
major and minor axes of an ellipse is of order e2 . Specifically, the curve in figure 1.2 is
y2
x2 + = 1, (1.7)
1 − e2
and the focus ∗ is at (x, y) = (e, 0), with e = 0.2. (I’ve summarized the main facts of elliptic
geometry, such as the definition of the focal points, in a page at the end of this lecture.)
x2 y 2
+ 2 = 1. (1.10)
a2 b
6
1
0.95
0.9
reduction factor f
0.85
0.8
0.75
0.7
0.65
0.6
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
e
Figure 1.3: The “reduction factor” f (e) in (1.17) is the solid black curve. The two-term
approximation in (1.19) is the blue dashed curve. The three and four term approximations (the
dash-dot and dotted curves) from (1.21) lie even closer to the black curve.
For the portion of the ellipse above the x-axis (i.e., y > 0) we have
r
x2 df b x
y =b 1− 2 , and =− 2q . (1.11)
| {z a } dx a 1− x2
a2
f (x)
Above we’ve used the change of variable x = av to tidy the integral so that it becomes non-
dimensional and contains only the eccentricity e. We can try to evaluate the integral analytically
by making a further substitution
dv
v = sin θ , and therefore √ = dθ . (1.15)
1 − v2
The integral becomes
Z π/2p
ℓ = 4a 1 − e2 sin2 θ dθ . (1.16)
0
As a sanity check, notice that if e = 0 the perimeter in (1.16) is 2πa.
Students of applied mathematics used to learn to recognize elliptic integrals and many other
special functions. These days students probably use mathematica to discover that the integral
7
in (1.16) is a complete elliptic integral of the second kind. Here is answer written in DLMF
notation
2
ℓ = 2πa × E(e) , (1.17)
π
| {z }
f
where f is the “reduction factor” relative to a circle with radius a. It is difficult to deny that
this exact answer is useful because both mathematica and matlab have these elliptic integrals
hardwired3 . However, if we are interested in quickly knowing the perimeter of the near-circle
in figure 1.2 then we can approximately evaluate (1.16) like this4
Z π/2
ℓ ≈ 4a 1 − 21 e2 sin2 θ dθ , (1.18)
0
= 2πa 1 − 14 e2 . (1.19)
| {z }
≈f
Applied mathematics is concerned with making precise approximations in which the error
is both understood and controllable. We should also strive to make the error smaller by some
systematic
p method. Here we can do this by using more terms in the binomial expansion of
2 2
1 − e sin θ. Let’s use four terms and indicate the form of the first neglected term:
p
1 − e2 sin2 θ = 1 − 12 e2 sin2 θ − 18 e4 sin4 θ − 16
1 6
e sin6 θ + ord e8 . (1.20)
In figure 1.3 there is a systematic improvement as we use more terms in the series.
8
To introduce the main idea of perturbation theory, let’s pretend that calculating a square root
is a big deal. We notice that if we replace π by 3 in (1.22) then the resulting quadratic equation
nicely factors and the roots are just x = 1 and x = 2. Because π is close to 3, our hope is that
the roots of (1.22) are close to 1 and 2. Perturbation theory makes this intuition precise and
systematically improves our initial approximations x ≈ 1 and x ≈ 2.
π = 3 + ǫ, (1.24)
x2 − (3 + ǫ)x + 2 = 0 , (1.25)
x = x0 + ǫx1 + ǫ2 x2 + · · · (1.26)
We are assuming that the xn ’s above do not depend on ǫ. Putting (1.26) into (1.25) we have
The notation “ord(ǫ4 )” means that we are suppressing some unnecessary information, but we
are indicating that the largest unwritten terms are all proportional to ǫ4 . We’re assuming that
the expansion (1.26) is unique so we can match up powers of ǫ in (1.28) and obtain a hierarchy
of equations for the unknown coefficients xn in (1.26).
The leading-order terms from (1.28) are
Quadratic equations have two roots and the important point is that indeed the leading order
approximation above delivers two roots: this is a regular perturbation problem. We’ll soon
see examples in which the leading approximation provides only one root: these problems are
singular perturbation problems.
Let’s take x0 = 1. The next three orders are then
x0
ǫ1 : (2x0 − 3)x1 − x0 = 0 , ⇒ x1 = = −1 , (1.30)
2x0 − 3
x1 − x21
ǫ2 : (2x0 − 3)x2 + x21 − x1 = 0 , ⇒ x2 = = 2, (1.31)
2x0 − 3
x2 (1 − 2x1 )
ǫ3 : (2x0 − 3)x3 + 2x1 x2 − x2 = 0 , ⇒ x3 = = −6 , (1.32)
2x0 − 3
The resulting perturbation expansion is
9
Exercise: Determine a few terms in the RPS of the root x0 = 2.
This example illustrates the main features of perturbation theory. When faced with a
difficult problem one should:
1. Find an easy problem that’s close to the difficult problem. It helps if the easier problem
has a simple analytic solution.
2. Quantify the difference between the two problems by introducing a small parameter ǫ.
3. Assume that the answer is in the form of a perturbation expansion, such as (1.26).
5. Solve the difficult problem by summing the series with the appropriate value of ǫ.
Step 4 above also deserves some discussion. In this step we are sequentially solving a
hierarchy of linear equations:
We can determine xn+1 because we can divide by (2x0 −3): fortunately x0 6= 3/2. This structure
occurs in other simple perturbation problems: we confront the same linear problem at every
level of the hierarchy and we have to solve this problem5 repeatedly.
Example: As a non-polynomial example consider
x2 − 1 = ǫex . (1.35)
Setting ǫ = 0 we see there are roots at x = −1 and x = +1. Let’s use a regular perturbation series (RPS)
1 +ǫx1 + ǫ2 x2 + · · ·
x = |{z} (1.36)
x0
to see how the root at x = 1 varies with ǫ. We’re going to calculate x1 and x2 .
To substitute the series (1.36) into (1.35) we first need
= e1 eǫx1 +ǫ x2 +ord(ǫ ) ,
2 2 3
e1+ǫx1 +ǫ x2
(1.37)
h 2 i
= e 1 + ǫx1 + ǫ2 x2 + 21 ǫx1 + ǫ2 x2 + ord ǫ3 , (1.38)
= e 1 + ǫx1 + ǫ2 x2 + 21 x21 + ord ǫ3 . (1.39)
Notice how we have systematically simplified the expressions above by dropping all ǫ3 terms. Substituting
the RPS into the transcendental equation (1.35), we discover that we have worked too hard in (1.39): if
we require only x1 and x2 then we could have consigned terms of order ǫ2 in (1.39) to the dust–bin. We
determine x1 and x2 from
2ǫx1 + ǫ2 2x2 + x21 = ǫe + ǫ2 ex1 + ord ǫ3 . (1.40)
10
A singular perturbation
Now consider another quadratic equation
ǫx2 + x − 1 = 0 , (1.41)
again with ǫ ≪ 1. Let’s proceed using the method that worked in the previous example: pick
the low-hanging fruit by setting ǫ = 0 and solving the simplified equation. This gives x ≈ 1.
We’re alarmed because already the problem seems very different from the previous example:
although the full problem has two solutions, the ǫ = 0 equation has only one root. We’ll return
to this example in the next lecture and figure out what happened to the missing root.
Let’s proceed to understand how the root near x = 1 changes with ǫ. Again we use an RPS:
1 +ǫx1 + ǫ2 x2 + · · ·
x = |{z} (1.42)
x0
ǫ1 : 1 + x1 = 0 , ⇒ x1 = −1 , (1.44)
2
ǫ : 2x1 + x2 = 0 , ⇒ x2 = 2 , (1.45)
3
ǫ : 2x2 + x21 + x3 = 0 , ⇒ x3 = −5 . (1.46)
To summarize
x = 1 − ǫ + 2ǫ2 − 5ǫ3 + ord ǫ4 . (1.47)
This calculation is conceptually identical to our earlier example in (1.29) through (1.33). But
the procedure is never going to help us find the missing root.
The quadratic (1.41) is a simple example of a singular perturbation problem: the problem
with non-zero ǫ has two roots, while the ǫ = 0 problem has only one. Thus the ǫ 6= 0 problem is
fundamentally different from the ǫ = 0 problem. Of course one can solve the quadratic equation
(1.41) exactly and figure out what’s happening to both roots as ǫ → 0. I suggest you do that
before next lecture.
11
Appendix: Summary of elliptic anatomy
An ellipse is a plane curve enclosing two focal points such that the sum of the distances
to the two foci is constant for every point on the ellipse. In figure (1.4) the foci are on the
x-axis at x = ±ea and ellipse is defined by
p p
(x − ea)2 + y 2 + (x + ea)2 + y 2 = 2a . (1)
| {z } | {z }
def def
= r+ = r−
If e = 0 then the ellipse becomes a circle with radius a. With some algebra you can show
that (1) is equivalent to
x2 y 2
+ 2 = 1, (2)
a2 b
where p
b = 1 − e2 a .
The lengths a and b are the semi-major and semi-minor axes respectively. If e ≪ 1 then
the difference between a and b is order e2 .
r+
r−
−a −ea +ea +a
−b
If the ellipse is a mirror and there is a light source at one of the foci then the light rays
reflecting specularly from the mirror all pass through the other focal point.
12
1.5 Problems
√ √
Problem 1.1. Because 10 is close to 9 we suspect that 10 is close to 9 = 3. (i) Define x(ǫ)
by
x(ǫ)2 = 9 + ǫ , (1.48)
and assume that x(ǫ) has an RPS like (1.26).
√ Calculate the first four terms, x0 through x3 . (ii)
Take ǫ = 1 and compare your estimate of 10 with a six decimal place computation. (iii) Now
solve (1.48) with the binomial expansion and verify that the resulting series is the same as the
RPS from part (ii). What is the radius of convergence of the series?
x5 − x + ǫ = 0 . (1.49)
If ǫ = 0 there is a root x = 1. Find the first three terms in the ǫ → 0 regular perturbation
expansion of this root.
Problem 1.4. Assume the Earth is a perfect sphere with radius R = 6, 400km and it wrapped
around the equator by a rope with length 6, 400km plus one meter. (i) Suppose the rope is
pulled to a uniform height h above the surface of the Earth — calculate h? (This is an easy
warm-up.) (ii) Suppose the rope is grabbed at a point and that point is hoisted vertically to a
height H till the rope is taut. Estimate H.
13
π /4 ℓ
Problem 1.7. Figure 1.5 shows the path followed by a tipsy sailor from a bar at the origin of
the (x, y)-plane to home at (x, y) = (ℓ, 0). The path is a sinusoid leaving the bar at an angle α;
in figure 1.5 α = π/4. How much longer is the sinusoidal path than the straight line? Answer
this question by: (i) eyeballing the curve in figure 1.5 and guessing; (ii) constructing the integral
that gives the arclength and evaluating it numerically; (iii) devising an approximation to the
arc-length integral based on α ≪ 1, and then pressing your luck by using this approximation
with α = π/4.
14
Lecture 2
ǫx2 + x − 1 = 0 . (2.1)
Setting ǫ = 0, we found x = 1 and we then proceeded to nail down this root with the regular
perturbation series (RPS) in (1.47). But a quadratic equation has two roots: we’re missing a
root. Peeking at the answer, we find
√
−1 ± 1 + 4ǫ
x= , (2.2)
2ǫ
or (
1 − ǫ + 2ǫ2 − 5ǫ3 + · · ·
x= (2.3)
−ǫ−1 − 1 + ǫ − 2ǫ2 + 5ǫ3 + · · ·
The missing root is going to infinity as ǫ → 0. Notice that the term we blithely dropped, namely
ǫx2 , is therefore ord(ǫ−1 ). Dropping a big term is a mistake.
We could have discovered the missing root by looking for two-term dominant balances in
(2.1):
2
|ǫx {z+ x} −1 = 0 . (2.4)
dominant balance
The balance above implies that x = −ǫ−1 . The balance is consistent because the neglected
term in (2.4) (the −1) is smaller than the two retained terms as ǫ → 0. Once we know that x
is varying as ǫ−1 we can rescale by defining
def
X = ǫx . (2.5)
The variable X remains finite as ǫ → 0, and substituting (2.5) into (2.1) we find that X satisfies
the rescaled equation
X2 + X − ǫ = 0 . (2.6)
Now we can find the big root via an RPS
X = X0 + ǫX1 + ǫ2 X2 + · · · (2.7)
This procedure reproduces the expansion that begins with −ǫ−1 in (2.3).
15
Notice that (2.5) is “only” a change in notation, and (2.6) is equivalent to (2.1). But
notation matters: in terms of x the problem is singular while in terms of X the problem is
regular.
Example: Find ǫ ≪ 1 expansions of the roots of
ǫx3 + x − 1 = 0 . (2.8)
x = 1 − ǫ + ord(ǫ2 ) . (2.9)
But there are two missing roots. A dominant balance between the first two terms in (2.9),
ǫx3 + x ≈ 0 , (2.10)
The solution X0 = 0 is reproducing the solution back in (2.9). Let’s focus on the other two roots, X0 = ±i.
At next order the problem is
√ 1 1
ǫ : 3X02 X1 + X1 − 1 = 0 , ⇒ X1 = =− . (2.15)
3X02 + 1 2
For good value
√ 2 3X0 X12 3
ǫ : 3X02 X2 + X2 + 3X0 X12 = 0 , ⇒ X2 = − = ± i. (2.16)
3X02 + 1 8
We write the expansion in terms of our original variable as
i 1 √ 3i
x = ±√ − ± ǫ + ord ǫ1 . (2.17)
ǫ 2 8
ǫ2 x6 − ǫx4 − x3 + 8 = 0 , as ǫ → 0. (2.18)
2.2 Iteration
Now let’s consider the method of iteration — this is an alternative to the RPS. Iteration requires
a bit of initial ingenuity. But in cases where the form of the expansion is not obvious, iteration
is essential. (One of the strengths of H is that it emphasizes the utility of iteration.)
16
Solution of a quadratic equation by iteration
We can rewrite the quadratic equation (1.25) as
(x − 1)(x − 2) = ǫx . (2.19)
We iterate by first dropping the ǫ-term on the right — this provides the first guess x(0) = 1.
At the next iteration we keep the ǫ-term with f evaluated at x(0) :
x(1) = 1 + ǫf x(0) = 1 − ǫ . (2.21)
If we drop the ǫ-term we get a first approximation x(1) = 2, and the next iterate is
ǫ ln 2
x(2) = 2 − , (2.27)
4
and again
ǫ ln 2
(3) ǫ ln 2 − 4
x =2− ǫ ln 2
. (2.28)
4− 4
17
We can develop an RPS by simplifying x(3) as
(3) ǫ ln 2 h ln 2 i
x =2− 1+ǫ ln 2 + ln 1 − ǫ + ord(ǫ3 ) , (2.29)
4 16 | {z 8 }
=−ǫ ln82 +ord(ǫ2 )
ln 2 ln 2
=2− ǫ+ (2 − ln 2) ǫ2 + ord(ǫ3 ) . (2.30)
4 64
where f (x) is some function of x. Section 1.3 of H discusses the case f (x) = x2 — with a
surfeit of testosterone we attack the general case.
We try the RPS:
x = x0 + ǫx1 + ǫ2 x2 + · · · (2.32)
We must expand f (x) with a Taylor series:
1
f x0 + ǫx1 + ǫ2 x2 + · · · = f (x0 ) + ǫx1 f ′ (x0 ) + ǫ2 x2 f ′ (x0 ) + x21 f ′′ (x0 ) + ord ǫ3 .
2
(2.33)
This is not as bad as it looks — we’ll only need the first term, f (x0 ), though that may not be
obvious at the outset.
The leading term in (2.31) is
ǫ1 : 2x − 2x −f (1) = 0 . (2.35)
| 1 {z 1}
=0
Unless f (1) happens to vanish, we’re stuck. The problem is that we assumed that the solution
has the form in (2.32), and it turns out that this assumption is wrong. The perturbation method
kindly tells us this by producing the contradiction in (2.35).
To find the correct form of the expansion we use iteration: rewrite (2.31) as
p
x = 1 ± ǫf (x) . (2.36)
18
Exercise: Go through another iteration cycle to find x(2) .
Iteration has shown us the way forward: we proceed assuming that the correct RPS is
probably
x = x0 + ǫ1/2 x1 + ǫx2 + ǫ3/2 x3 + · · · (2.39)
At leading order we find x0 = 1, and at next order
This is surprising, but it is not a contradiction: x1 is not determined at this order. We have to
endure some suspense — we go to next order and find
p
ǫ1 : 2(x0 − 1)x2 +x21 − f (x0 ) = 0 , ⇒ x1 = ± f (1) . (2.41)
| {z }
=0
The RPS has now managed to reproduce the first iterate x(1) . Going to order ǫ3/2 , we find that
x3 is undetermined and
x2 = 12 f ′ (1) . (2.42)
The solution we constructed is
p ǫ
x =1± ǫf (1) + f ′ (1) + ord ǫ3/2 . (2.43)
2
This example teaches us that a perturbation “splits” double roots. The splitting is rather
√
large: adding the order ǫ perturbation in (2.31) moves the roots apart by order ǫ ≫ ǫ.
This sensitivity to small perturbations is obvious geometrically — draw a parabola P touching
the x-axis at some point, and move P downwards by small distance. The small movement
produces two roots separated by a distance that is clearly much greater than the small vertical
displacement of P . If P moves upwards (corresponding to f (1) < 0 in the example above) then
the roots split off along the imaginary axis.
xe−x = ǫ . (2.44)
It is easy to see that if 0 < ǫ ≪ 1 there is a small solution and a big solution. It is straightforward
to find the small solution in terms of ǫ. Here we discuss the more difficult problem of finding
the big solution.
Exercise: Show that the small solution is x(ǫ) = ǫ + ǫ2 + 32 ǫ3 + ord(ǫ4 ).
To get a handle on (2.44), we take the logarithm and write the result as
x = L1 + ln x , (2.45)
where
def 1
L1 = ln . (2.46)
ǫ
19
0
10
exact
L1
L +L
1 2
L1+L2+L1/L2
2
L +L +L /L + P(L )/L
1 2 2 1 2 1
−1
10
−2
10
−3
10
0 1 2 3 4 5 6 7 8 9 10
x
Figure 2.1: Comparison of ǫ = xe−x with increasingly accurate small-ǫ approximations to the
inverse function ǫ(x).
Note if 0 < ǫ < 1 then ln ǫ < 0. To avoid confusion over signs it is best to work with the large
positive quantity L1 .
Now observe that if x → ∞ then there is a consistent two-term dominant balance in (2.45):
x ≈ L1 . This is consistent because the neglected term, namely ln x, is much less than x as
x → ∞. We can improve on this first approximation using the iterative scheme
We don’t need L3 .
1
This example is related to the Lambert W -function, also known as the omega function and the product
logarithm; try help ProductLog in mathematica and lambertw in matlab.
2
We’re using the Taylor series
ln(1 + η) = η − 21 η 2 + 13 η 3 + 14 η 4 + · · ·
20
At the third iteration a pattern starts to emerge
!
(3) L2 1 L2 2
x = L1 + ln L1 + L2 + − + ··· ,
L1 2 L1
L2 L2 1 L22
= L1 + L2 + ln 1 + + − + ··· ,
L1 L21 2 L31
2 3
L2 L2 1 L22 1 L2 L2 1 L2
= L1 + L2 + + − + ··· − 2 + + ··· +3 + ··· ···
L1 L21 2 L31 L1 L21 L1
L2 L2 − 12 L22 1 3 3 2
3 L2 − 2 L2 + · · ·
= L1 + L2 + + + + ··· (2.52)
L1 L21 L31
2.5 Convergence
Usually we can’t prove that an RPS converges. The only way of proving convergence is to have
a simple expression for the form of the n’th term. In realistic problems this is not available.
One just has to satisfied with consistency and hope for the best.
But with iteration there is a simple result. Suppose that x = x∗ is the solution of
x = f (x) . (2.54)
Start with a guess x = x0 and proceed to iterate with xn+1 = f (xn ). If an iterate xn is close
to the solution x∗ then we have
x = x∗ + ηn , with ηn ≪ 1. (2.55)
and therefore
ηn+1 = f ′ (x∗ )ηn . (2.58)
The sequence ηn will decrease exponentially if
If the condition above is satisfied, and the first guess is good enough, then the iteration converges
onto x∗ . This is a loose version of the contraction mapping theorem
21
2.6 Problems
Problem 2.1. Find two-term, ǫ ≪ 1 approximations to all roots of
x3 + 5x2 + 4x + ǫ = 0 , (2.60)
and
y3 − y2 + ǫ = 0 , (2.61)
and
ǫz 4 − z + 1 = 0 . (2.62)
Problem 2.2. Find rescalings for the roots of
and thence find two non-trivial terms in the approximation for each root using (i) iteration and
(ii) series expansion.
Problem 2.3. Develop perturbation solutions to
finding the the first three terms in the approximation for each root, x = x0 + ǫa xa + ǫ2a x2a , and
determining a along the way.
Problem 2.4. Find a three-term approximation to the real solutions of
2
ex−x = ǫx2 , as ǫ → 0 . (2.65)
Problem 2.5. Find two- or three- term approximations to all real solutions of
x2 − 1 = eǫx , as ǫ → 0 . (2.66)
Using figure 2.1 as an example, and considering the largest positive root, use matlab to compare
your approximation with the exact relation.
Problem 2.6. Find a two-term approximation to all positive real roots of x2 − 4 = ǫ ln x as
ǫ → 0.
Problem 2.7. Use perturbation theory to solve (x + 1)7 = ǫx. How rapidly do the n roots
vary from x = −1 as a function of ǫ? Give the first three terms in the expansion.
Problem 2.8. Here is a medley of algebraic perturbation problems, mostly from BO and H.
Use perturbation theory to find two-term approximations (ǫ → 0) to all roots of:
(a) x2 + x + 6ǫ = 0 , (b) x3 − ǫx − 1 = 0 ,
(c) x3 + ǫx2 − x − ǫ = 0 , (d) ǫ2 x3 + x2 + 2x + ǫ = 0 ,
(e) ǫx3 + x2 − 2x + 1 = 0 , (f) ǫx3 + x2 + (2 + ǫ)x + 1 = 0 ,
(g) ǫx3 + x2 + (2 − ǫ)x + 1 = 0 , (h) ǫx4 − x2 − x + 2 = 0 ,
(i) ǫx8 − ǫ2 x6 + x − 2 = 0 , (j) ǫx8 − ǫx6 + x − 2 = 0 ,
(k) ǫ2 x8 − ǫx6 + x − 2 = 0 , (l) x3 − x2 + ǫ = 0 .
(2.67)
22
ε=0.25
1.204
1.203
n
x
1.202
1.201
0 5 10 15 20 25 30 35 40
ε=0.35
1.027
1.026
n
x
1.025
1.024
0 5 10 15 20 25 30 35 40
ε=0.45
1
0.95
n
x
0.9
0.85
0 5 10 15 20 25 30 35 40
n=iteration number
Figure 2.2: Figure for problem 2.10. Numerical iteration of yn+1 = ln 1ǫ − ln yn . At ǫ = 0.45
the iteration diverges. In all three cases we start x0 within 0.1% of the right answer.
ǫy a = e−y . (2.68)
Note that a = −1 is the example (2.44). Use the method of iteration to find a few terms in the
ǫ → 0 asymptotic solution of (2.68) — “few” means about as many as in (2.52). Consider the
case a = +1; use matlab to compare the exact solution with increasingly accurate asymptotic
approximations (e.g., as in Figure 2.1).
Problem 2.10. Let us continue problem 2.9 by considering numerical convergence of iteration
in the special case a = 1. Figure 2.2 shows numerical iteration of
1
yn+1 = ln − ln yn . (2.69)
ǫ
With ǫ = 0.25 everything is hunky-dory. At ǫ = 0.35 the iteration is converging, but it is
painfully slow. And at ǫ = 0.45 it all goes horribly wrong. Explain this failure of iteration. To
be convincing your explanation should include a calculation of the magic value of ǫ at which
numerical iteration fails. That is, if ǫ > ǫ∗ then the iterates do not converge to the solution of
ǫy = e−y . Find ǫ∗ .
Problem 2.11. The relation
xy = ex−y (2.70)
implicitly defines y as a function of x, or vice versa. View y as a function x, and determine the
large-x behavior of this function. Calculate enough terms to guess the form of the expansion.
23
(i) Use matlab to make a graphical analysis of this equation with ǫ = 1/5 and ǫ = 1/10.
Convince yourself that as ǫ → 0 there is one root near z = 1, and second, large root that
recedes to infinity as ǫ → 0. (ii) Use an iterative method to develop an ǫ → 0 approximation
to the large solution. Calculate a few terms so that you understand the form of the expansion.
(iii) Use matlab to compare the exact answer with approximations of various orders e.g., as
in Figure 2.1. (iv) Find the dependance of the other root, near z = 1, on ǫ as ǫ → 0.
with one significant figure of accuracy. (I think you can do this without a calculator if you use
ln 2 ≈ 0.69 and ln 10 ≈ 2.30.)
24
Lecture 3
This long lecture has too much material. But a lot of it is stuff you should have learnt in school
e.g., how to solve the simple harmonic oscillator. What’s not covered in lectures is assigned as
reading.
ẋ = f (x) . (3.1)
You can check by substitution that the solution above satisfies the differential equation and the
initial condition. Suppose the initial condition that x(0) = 17π/4. Can you use the solution in
(3.3) to find limt→∞ x(t)? It’s not so easy because the inverse of tan is multivalued.
Fortunately it is much simpler to analyze (3.1) on the phase line: see Figure 3.1. With this
construction it is very easy to see that
9
x0 = π , ⇒ lim x(t) = 3π . (3.4)
4 t→∞
The solution of (3.2) moves monotonically along the x-axis and, in the case above, approaches
the fixed point at x = 3π, where ẋ = 0.
If we consider (3.1) with a moderately complicated f (x) given graphically — for example in
Figure 3.2 — then we can predict the long-time behaviour of all initial conditions with no effort
at all. The solutions either trek off to +∞, or to −∞, or evolve towards fixed points defined by
f (x) = 0. Moreover the evolution of x(t) is monotonic.
25
1
f (x)
0 ← → ← → ← → ←
−1
−2π −π 0 x π 2π 3π 4π
Figure 3.1: The arrows indicate the direction of the motion along the line produced by ẋ = sin x.
4
2
f (x)
0 ← → → ←
−2
−1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 3
x
Figure 3.2: There are three fixed points indicated by the ∗’s on the x-axis. The fixed point
at x = −1 is unstable and point at x = 2 is stable. The point at x = 1 is stable to negative
displacements and unstable to positive displacements.
In ecology the Verhulst equation (3.7) is known as the r-K model; K is the “carrying capacity”
and r is the growth rate. Yet another name for (3.7) is the “logistic equation”.
To solve (3.7) we could use separation of variables, or alternatively we might recognize a
Bernoulli equation1 . For a change of pace, let’s use the trick for solving Bernoulli equations:
1
That is, an equation of the form
dy
= a(x)y + b(x)y n .
dx
26
1.5
N/K
0.5
0
0 1 2 3 4 5 6
rt
Figure 3.3: Solutions of the logistic equation (3.7). The curves which start with small N (0) are
S-shaped (“sigmoid”). Can you show that the inflection point (N̈ = 0) is at time t∗ defined by
N (t∗ ) = K/2?
divide (3.7) by −N 2 :
d 1 r r
=− + . (3.9)
dt N N K
def
This is a linear differential equation for X = 1/N , with integrating factor ert , and solution
N0 K
N (t) = . (3.10)
(K − N0 )e−rt + N0
Above, the initial condition is N0 = N (0). This solution with various values of N0 /K produces
the “sigmoid curves” shown in Figure 3.3.
The logistic equation is notable because the exact solution is not an opaque implicit formula
like (3.3) — the solution in (3.10) exhibits N as an explicit function of t. This is one of the few
cases in which the explicit solution is useful.
Exercise: (i) Solve the logistic equation by separation of variables. (ii) Show that the population is increasing
most rapidly when N = K/2. (Hint: only a very small calculation is required in (ii).)
(The dot indicates a time derivative.) The phase plane, (x, y), is the two-dimensional analog
of the phase line. The state of the system at some time t0 is specified by giving the location
of a point (x, y) and at every point there is an arrow indicating the instantaneous direction in
which the system moves. The collection of all these arrows is a “quiver”. The set of arrows is
also called a direction field, but quiver is the relevant matlab command.
The simplest example is the harmonic oscillator
ẍ + x = 0 . (3.12)
We begin by writing this second-order equation as a system with the form in (3.11):
ẋ = y ẏ = −x . (3.13)
27
Thus at each point in the (x, y)-plane there is a velocity vector,
q = y x̂ − xŷ , (3.14)
and in a small time δt the system moves along this vector through a distance δtq to the next
point in the plane. Thus the system moves along an orbit in the phase plane; the vector q is
tangent to every point on the orbit.
The harmonic oscillator example is so simple that you should be able to draw the sketch
vector field without the aid of matlab. The orbits are just circles centered on the origin,
x2 + y 2 = 21 E , (3.15)
This linear example is too simple to illustrate the power of this technique so let’s move on.
Example: As a slightly more complicated example of phase-plane analysis we consider the Volterra equations:
ṙ = r − f r , f˙ = −f + f r . (3.16)
| {z } | {z }
u v
This is a simple “predator-prey” model in which f (t) is the population of foxes and r(t) is the population
of rabbits. In the absence of foxes, and with unlimited grass, the rabbit population grows exponentially.
The growth of the fox population requires rabbits, else foxes starve.
The state of the system is specified by giving the location of a point in the phase plane (r, f ). In this
example the arrow at the point (r, f ) is
def
q(r, f ) = (r − f r)r̂ + (−f + f r)fˆ. (3.17)
where r̂ and fˆ are unit vectors along the rabbit axis and the fox axis respectively. The collection of all
solutions is visualized as a collection of phase-plane orbits, with the vector q tangent to every point of the
orbit. Figure 3.4 shows three phase-space orbits, and the associated quiver.
We can easily locate the fixed points. There are just two:
First consider the linear stability analysis of the fixed point at the origin. We’re interested in small
displacements away from the origin, so we simply drop the nonlinear terms in (3.16) to obtain the associated
linear system
ṙ = r , f˙ = −f . (3.19)
The solution is
r = r0 et f = f0 e−t . (3.20)
The origin is an unstable fixed point: a small rabbit population grows exponentially (e.g., the invasion
of Australia by 24 rabbits released in 1859). Moreover, we can eliminate t between r and f in (3.20) to
obtain
rf = r0 f0 . (3.21)
28
4
3.5
2.5
2
f
1.5
Thus near the origin the phase space orbits are hyperbolas. This type of fixed point, with exponential-
time-time growth in one direction and exponential-in-time decay in another direction, is called a saddle
point, or an x-point.
Now turn to the fixed point at (1, 1). To look at displacements from (1, 1) we introduce new variables
(a, b) defined by
r = 1+a, f = 1 +b. (3.22)
In this simple example we can rewrite the system exactly in terms of (a, b):
ȧ = −b − ab , ḃ = a + ab . (3.23)
ȧ = −b , ḃ = a (3.24)
ä + a = 0 , or b̈ + b = 0 . (3.25)
The general solution is a linear combination of cos t and sin t, and the constants of integration are deter-
mined by the initial conditions (a0 , b0 ). This is simple, but there is an alternative based on a trick that
will come in handy later: introduce
def
z = a + ib . (3.26)
With this “complexification”, the system (3.24) is
Notice that
|z|2 = a2 + b2 = a20 + b20 . (3.28)
Thus, according to the linear approximation2 , if the system is slightly displaced from the fixed point (1, 1)
it simply orbits around at a fixed distance from (1, 1) — this type of fixed point is called a center or an
o-point.
2
In this case we have to be concerned that the neglected nonlinear terms have a long-term impact e.g., the
radius of the circle could grow slowly as a result of weak nonlinearity.
29
function foxRabbit
%phase portrait of the Volterra predator-prey system
tspan = [0 10];
aZero = [ 0.25, 0.25 ]; bZero = [ 0.5, 0.5 ]; cZero = [ 0.75, 0.75 ];
[ta, xa] = ode45(@dfr,tspan,aZero);
[tb, xb] = ode45(@dfr,tspan,bZero);
[tc, xc] = ode45(@dfr,tspan,cZero);
plot(xa(:,1), xa(:,2),xb(:,1),xb(:,2),xc(:,1),xc(:,2))
axis equal
hold on
xlabel(’$r$’,’interpreter’,’latex’,’fontsize’,20)
ylabel(’$f$’,’interpreter’,’latex’,’fontsize’,20)
axis([0 4 0 4])
% now the quiver
[R F]= meshgrid(0:0.2:4);
U = R - F.*R;
V = -F + F.*R;
quiver(R,F,U,V)
%------- nested function --------%
function dxdt = dfr(t,x)
dxdt = [ x(1) - x(1)*x(2); - x(2)+x(1)*x(2)];
end
end
outputs the solution at times determined by the internal logic of ode45 and those times are too coarsely
spaced to make a smooth plot of the solution.
To get a smooth solution curve, at closely spaced times controlled by you, rather than by ode45,
there are several modifications of the script, indicated in the code smoothFoxRabbit in the verbatim
box below figure 3.5. First, create a vector that contains the desired output times:
This creates a matlab structure, called sola in this example. The structure sola contains all the
information required to interpolate the solution between the times determined by ode45. The matlab
function deval performs that interpolation. We access the solution at the times specified in t via the
command xa = deval(sola,t). This creates a matrix xa with two columns and length(t) rows. The
first column is the dfr rabbit variable, x(1), and the second column of xa is the foxes x(2).
30
4
f2
0
0 2 4
r
4 Figure 3.5: Another version of fig-
r (t) and f (t)
Note that in the upper panel Figure 3.5 the the rotation of ordinate label created by ylabel is set to
zero. More importantly perhaps, the tolerances for ode45 are set with the matlab command odeset.
The command
options = odeset(′AbsTol′, 1e − 7,′ RelTol′, 1e − 4);
creates a matlab structure called options. ode45 will accept this structure as an optional input
argument. I must confess that I don’t understand how these tolerances work. You’ll note that if you use
the default tolerances then the phase space orbit computed by smoothFoxRabbit doesn’t close. This is
a numerical error: the orbits really are closed — see problem 3.9. When I saw this problem I decreased
the tolerances using odeset and the picture improved. This adventure shows that numerical solutions
are not the same as exact solutions.
function smoothFoxRabbit
%phase portrait of the Volterra predator-prey system
tspan = [0 20]; t = linspace(0,max(tspan),200);
options = odeset(’AbsTol’,1e-7, ’RelTol’,1e-4);
aZero = [ 0.25, 0.25 ];
sola = ode45(@dfr,tspan,aZero,options);
xa = deval(sola,t);
subplot(2,1,1)
plot(xa(1,:), xa(2,:))
axis equal
hold on
xlabel(’$r$’,’interpreter’,’latex’,’fontsize’,20)
ylabel(’$f$’,’interpreter’,’latex’,’fontsize’,20,’rotation’,0)
axis([0 4 0 4])
subplot(2,1,2)
plot(t,xa(1,:),t,xa(2,:),’g--’)
xlabel(’$t$’,’interpreter’,’latex’,’fontsize’,20)
ylabel(’$r(t)$ and $f(t)$’,’interpreter’,’latex’,’fontsize’,20)
%------- nested function --------%
function dxdt = dfr(t,x)
dxdt = [ x(1) - x(1)*x(2); - x(2)+x(1)*x(2)];
end
end
31
3.5 The linear oscillator
Consider the damped and forced oscillator equation,
d 2
1
2 mẋ + 12 kx2 = ẋf − αẋ2 . (3.31)
dt
This expresses the rate of change of energy as the difference between the rate at which the force f does
work, ẋf , and the dissipation of energy by drag −αẋ2 .
Resonance
Begin by considering an harmonically forced oscillator with no damping:
ẍ + ω 2 x = cos σt . (3.32)
The solution is
cos σt − cos ωt
x= . (3.34)
ω2 − σ2
We can check this answer by taking t → 0, and showing that
t2
x→ (3.35)
2
both by expanding the solution in (3.34) or by identifying a small-t dominant balance between two of
the three terms in (3.32).
There is a problem if the oscillator is resonantly forced i.e., if the forcing frequency σ is equal to the
natural frequency ω. Then the solution is
cos σt − cos ωt t
x(t) = lim = sin ωt . (3.36)
ω→σ ω2 − σ2 2σ
(You can use l’Hôpital’s rule to evaluate the limit.) If the oscillator is resonantly forced, then the
displacement grows linearly with time. We’ll use this basic result many times in the sequel.
Exercise: Solve the initial value problem
What happens if ω = σ?
32
Figure 3.6: A mass-spring oscillator. The
spring constant is k, and the heavy particle
x at the end of the spring has mass m so that
m the
p “natural frequency” of the oscillator is
k k/m.
β2
ν =1− + ord β 4 . (3.43)
8
The frequency shift is only important once β 2 t ∼ 1, and on that long time the amplitude of the residual
oscillation is exponentially small (∼ e−1/2β ). So we don’t worry too much about the frequency shift. A
good β ≪ 1 approximation to the exact solution in (3.42) is
Exercise: When does the approximation in (3.44) first differ in sign from the exact x(t)?
ẍ = −Ux , (3.45)
33
1
0.8
0.6
0.4
0.2
y
−0.2
−0.4
−0.6
−0.8
−1
Figure 3.7: Three solutions of the damped
−1 −0.5 0 0.5 1
x oscillator equation (3.40) with β = 0.2.
where U (x) is the potential. The linear oscillator is the special case U = ω 2 x/2.
We can obtain a good characterization of the solutions of (3.45) using conservation of energy: mul-
tiply (3.45) by ẋ and integrate to obtain
1 2
2 ẋ + U (x) = E , (3.46)
Let’s consider the mass-spring system in Figure 3.6 as an example. Suppose that the spring gets
stronger as the extension x increases. We can model this “stiff” spring by adding nonlinear terms to
Hooke’s law:
spring force = −k1 x − k3 x3 + · · · (3.48)
where the · · · indicate the possible presence of additional terms as the displacement x increases further.
If the spring is stiff then k3 > 0 i.e., the first non-Hookean term increases the restoring force above
Hooke’s law.
Note that in (3.48) are assuming that the force depends symmetrically on the displacement x i.e., the
series in (3.48) contains only odd terms. Don’t worry too much about that assumption — the problems
offer plenty of scope to investigate asymmetric restoring forces.
The equation of motion of the mass m on a non-Hookean spring is therefore
34
2 2
1 1
ẋ
ẋ
0 0
−1 −1
−2 −2
−2 −1 0 1 2 −2 −1 0 1 2
x x
Figure 3.8: The phase plane of the Duffing oscillator. Can you tell which panel corresponds to
the + sign in (3.52)? Does a low-energy solution orbit the origin in a clockwise or a counter
clockwise direction?
where ± depends on the sign of k3 . Please make sure you understand how all the coefficients have been
normalized to either 1 or −1 without loss of generality.
The energy of the Duffing oscillator is
E = 12 ẋ2 + 21 x2 ± 41 x4 . (3.52)
Figure 3.8 shows the curves of constant energy drawn with the matlab routines meshgrid and contour.
35
1.5
1
U (x)
0.5
0
−2 0 2 4 6 8 10
x
0.5
ẋ
−0.5
−1
−1 0 1 2 3 4 5 6 7 8 9 10
x
Figure 3.9: The top panel shows the Morse potential and the bottom panel shows four phase
space trajectories corresponding to E = 0.1, 0.3, 0.5 and 1.
36
3.7 Problems
Problem 3.1. (i) Find limt→∞ x(t), where x(t) is the solution of
x3
ẋ = (x − 1)2 − , x(0) = 1 .
100
(ii) Find the t → ∞ limit if the initial condition is changed to x(0) = 1.2. In both cases give a numerical
answer with two significant figures.
Problem 3.3. Back in the day, students were taught to evaluate trigonometric integrals like (3.3) with
the substitution θ = tan x′ /2. Show that dx′ / sin x′ = dθ/θ and do the integral.
mv̇ = mg − kv 2 , (3.55)
where m is the mass, g = 32.2 feet/(second)2 is gravity and k is an empirical constant related to air
resistance. (a) Obtain an analytic solution assuming that v(0) = 0. (b) Use your solution to find the
terminal velocity in terms of m, g and k. (c) Check your answer by analyzing the problem on the phase
line. (d) An experimental study with skydivers in 1942 was conducted by dropping men from 31, 400
feet to an altitude of 2, 100 feet at which point the skydivers opened their chutes. This long freefall
took 116 seconds on average and the average weight of the men plus their equipment was 261.2 pounds.
Calculate the average velocity. (e) Use the data above to estimate the terminal velocity and the drag
constant k. A straightfoward approach requires solving a transcendental equation either graphically or
numerically. But you can avoid this labor by making an approximation that the average velocity is close
to the terminal velocity. If you do make this approximation, then you should check it carefully and
identify the non-dimensional parameter that controls the validity of the approximation.
ẋ = x2 (1 − x) , x(0) = ǫ . (3.56)
(iv) Use separation of variables to find the exact solution of (3.56); make sure your solution satisfies the
initial condition. (I encourage you to do the integral with Mathematica or Maple.) (v) At large times
x(t, ǫ), is somewhere close to 1. Simplify the exact solution from (iv) to obtain an explicit (i.e., exhibit
x as a function of t) large-time solution. Make sure sure you explain how large t must be to ensure that
this approximate solution is valid. (vi) Summarize your investigation with a figure such as 3.10.
37
1
ǫ = 0.1
0.8
x ( t)
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
t
Figure 3.10: The exact solution of (3.56) (the solid curve) compared with large and small time
approximations.
ẋ = r − x − e−x . (3.59)
Sketch all the qualitatively different vector fields on the x- axis that occur as the parameter r is varied
between −∞ and +∞. Show that something interesting happens as r passes through one. Suppose
r = 1 + ǫ, with 0 < ǫ ≪ 1. Determine the location of the fixed points as a function of ǫ and decide
their stability.
√ Obtain an approximation to the differential
√ equation (3.59), valid in the limit ǫ → 0 and
x = ord( ǫ). (Make sure you explain why x = ord( ǫ) is interesting.)
Problem 3.7. Kermack & McKendrick [Proc. Roy. Soc. A 115 A, 700 (1927)] proposed a model for
the evolution of an epidemic. The population is divided into three classes:
Assume that the epidemic evolves very rapidly so that slow changes due to births, emigration, and
the ‘background death rate’, are negligible. (Kermack & McKendrick argue that bubonic plague is so
virulent that this assumption is valid.) The other model assumptions are that healthy people get sick
at a rate proportional to the product of x and y. This is plausible if healthy people and sick people
encounter each other at a rate proportional to their numbers, and if there is a constant probability of
transmission. Sick people die at a constant rate. Thus, the model is
(i) Show that N = x + y + z is constant. (ii) Use the ẋ and ż equations to express x(t) in terms of z(t).
(iii) Show that z(t) satisfies first order equation:
ż = β [N − z − x0 exp(−αz/β)]
where x0 = x(0). Use non-dimensionalization to put the equation above into the form:
uτ = a − bu − e−u ,
and show that a ≥ 1 and b > 0. (iv) Determine the number of fixed points and decide their stability. (v)
Show that if b < 1, then the death rate, ż ∝ uτ , is increasing at t = 0 and reaches its maximum at some
time 0 < t∗ < ∞. Show that the number of infectives, y(t), reaches its maximum at the same time, t∗ ,
that the death rate peaks. The term epidemic is reserved for this case in which things get worse before
they get better. (vi) Show that if b > 1 then the maximum value of the death rate is at t = 0. Thus,
there is no epidemic if b > 1. (vii) The condition that b = 1 is the threshold for the epidemic. Can you
give a biological interpretation of this condition? That is, does the dependence of b on α, β and x0 seem
‘reasonable’ ?
38
1
c ubic damping, w it h ǫ = 1
0.5
x( t )
−0.5
−1
0 20 40 60 80 100 120
t
Figure 3.11: Solution of problem 3.13. The dashed curve is the envelope predicted by multiple
scale theory and the solid curve is the ode45 solution.
Problem 3.8. How is the Kermack-McKendrick model modified if the infected people are flesh-eating
zombies?
Problem 3.9. Integrate the system (3.16) to show that the closed orbits in Figure 3.4 are given by
Consider an initial condition f (0) = r(0) = ǫ with 0 < ǫ ≪ 1. There is a boom and bust cycle: see figure
3.5. The initial condition is the bust. At some subsequent time there is a boom: the two populations
are again equal and much greater than one. Estimate the size of the populations at the boom.
Problem 3.10. As a model of competition (for grass) between rabbits and sheep consider the au-
tonomous system
ṙ = r(3 − r − 2s) , and ṡ = s(2 − r − s) . (3.61)
In the absence of one species, the population of the other species is governed by a logistic model. The
competition is interesting because rabbits reproduce faster than sheep. But sheep can gently nudge
rabbits out of the way, so the negative sheep-feedback is stronger on the rabbits than vice versa. Find
the four fixed points of this system and analyze their stability. Compute some solutions and draw a
phase-space figure analogous to Figure 3.4.
Problem 3.11. The red army, with strength R(t), fights the green army, with strength G(t). The
conflict starts from an initial condition G(0) = 2R(0) and proceeds according to
Ṙ = −G , Ġ = −3R . (3.62)
The war stops when one army is extinct. Which army wins, and how many soldiers are left at this time?
(You can solve this problem without solving a differential equation.)
ẋ = −x + y 2 , ẏ = x − 2y + y 2 . (3.63)
Use matlab to compute a few orbits visualize the direction field. Locate the fixed points and analyze
their stability. Sketch the orbits near the fixed points. Show that x = y is an orbit and that |x − y| → 0
as t → ∞ for all other orbits.
39
Problem 3.13. Consider the nonlinearly damped oscillator
Assuming that ǫ ≪ 1, use the energy equation and the method of averaging to determine the slow
evolution of the amplitude a in the approximate solution (??). Take ǫ = 1 and use ode45 to compare a
numerical solution of the cubically damped oscillator with the method of averaging (see Figure 3.11).
Problem 3.14. A theoretically inclined vandal wants to break a steam radiator away from its foun-
dation. She steadily applies a force of F = 100Newtons and discovers that the top of the radiator is
displaced by 2cm. Unfortunately this is only one tenth of the displacement required. But the vandal
can apply an unsteady force f (t) according to the schedule
The mass of the radiator is 50 kilograms and the foundation resists movement with a force proportional
to displacement. At what frequency and for how long must the vandal exert the force above to succeed?
ẍ + x − 2x2 + x3 = 0 , (3.65)
Problem 3.16. The top panel in figure 3.13 shows a potential and the bottom panel shows four constant
energy curves in the phase plane. Match the curves in the bottom panel to the indicated energy levels.
40
(a) (b) (c)
1 1 1
0 0 0
x
−1 −1 −1
0 1 2 0 1 2 0 1 2
x x x
0.2
0
U (x)
−0.2
−0.4
−6 −4 −2 0 2 4 6
x
2
E = [ − 0. 4, − 0. 2, 0. 0495, 0. 205]
1
ẋ
−1
−2
−6 −4 −2 0 2 4 6
x
41
Lecture 4
where g0 = 9.8m s−2 , R = 6, 400kilometers and z is the altitude. The particle stays aloft longer than
2u/g0 because gravity is weaker up there.
Let’s use perturbation theory to calculate the correction to the time aloft due to the small decrease in
the force of gravity. But first, before the perturbation expansion, we begin with a complete formulation
of the problem. We must solve the second-order autonomous differential equation
d2 z g0
=− , (4.1)
dt2 (1 + z/R)2
d2 z̄ 1
+ = 0, (4.5)
dt̄2 (1 + ǫz̄)2
42
where
def u2
ǫ = . (4.6)
Rg0
We must also non-dimensionalize the initial conditions in (4.2):
dz̄
t̄ = 0 : z̄ = 0 and = 1. (4.7)
dt̄
At this point we have done nothing more than change notation. The original problem was specified by
three parameters, g0 , u and u. The non-dimensional problem is specified by a single parameter ǫ, which
might be large, small, or in between. If we’re interested in balls and bullets fired from the surface of the
Earth then ǫ ≪ 1.
OK, so assuming that ǫ ≪ 1 we try a regular perturbation expansion on (4.5). We also drop all
the bars that decorate the non-dimensional variables: we can restore the dimensions at the end of the
calculation and it is just too onerous to keep writing all those little bars. The regular perturbation
expansion is
z(t) = z0 (t) + ǫz1 (t) + ǫ2 z2 (t) + ord ǫ3 . (4.8)
We use the binomial theorem
n(n − 1) 2
(1 + x)n = 1 + nx + x + ord x3 , (4.9)
2
with n = −2 to expand the nonlinear term:
(1 + ǫz)−2 = 1 − 2ǫz + 3ǫz 2 + ord ǫ3 . (4.10)
So matching up equal powers of ǫ in (4.5) (and denoting time derivatives by dots) we obtain the first
three terms in perturbation hierarchy:
Above we have the first three terms in a hierarchy of linear equations of the form
t2 t3 t4
z0 (t) = t − , and z1 (t) = − . (4.14)
2 3 12
To obtain z2 (t) we integrate
11t3 11t4
z̈2 = −3t2 + − , (4.15)
3 12
to obtain
t4 11t5 11t6
z2 (t) = − + − . (4.16)
4 60 360
43
Thus the expanded solution is
4
t2 t3 t4 2 t 11t5 11t6
z(t) = t − + ǫ − +ǫ − + − + ord ǫ3 . (4.17)
2 3 12 4 60 360
We assume that the time aloft, τ (ǫ), also has a perturbation expansion
τ (ǫ) = τ0 + ǫτ1 + ǫ2 τ2 + ord ǫ3 . (4.18)
The terms in this expansion are determined by solving:
z0 τ0 + ǫτ1 + ǫ2 τ2 + ǫz1 (τ0 + ǫτ1 ) + ǫ2 z2 (τ0 ) = ord ǫ3 . (4.19)
We have ruthlessly ditched all terms of order ǫ3 into the garbage heap on the right of (4.19). The left
side is a polynomial of order τ 6 so there are six roots. One of these roots is τ = 0 and another root is
close to τ = 2. The other four roots are artificial creatures of the perturbation expansion and should be
ignored — if we want the time aloft then we focus on the root near τ = 2 by taking τ0 = 2 in (4.18).
Expanding the zn ’s in a Taylor series about τ0 = 2, we have:
z0 (2) + (ǫτ1 + ǫ2 τ2 )ż0 (2) + 12 (ǫτ1 )2 z̈0 (2) + ǫz1 (2) + ǫ2 τ1 ż1 (2) + ǫ2 z2 (2) = ord ǫ3 . (4.20)
Now we can match up powers of ǫ:
z0 (2) = 0 ,
τ1 ż0 (2) + z1 (2) = 0 ,
τ2 ż0 (2) + 12 τ12 z̈0 (2) + τ1 ż1 (2) + z2 (2) = 0 .
Solving1 these equations, one finds
4 4
τ = 2 + ǫ + ǫ2 + ord(ǫ3 ) .
3 5
The Taylor series above is another procedure for generating the expansion of a regularly perturbed root
of a polynomial.
However the answer is not presentable in polite company. In this example, the RPS back in (4.17) is
definitely superior to iteration.
1
Some intermediate results ż0 (2) = −1, z1 (2) = 4/3, ż1 (2) = 4/3 and z2 (2) = −4/45.
44
4.2 Boundary value problems: belligerent drunks
Imagine a continuum of drunks random-walking along a stretch of sidewalk, the x-axis, that lies between
bars at x = 0 and x = ℓ. When a drunk collides with another drunk they have a certain probability
of mutual destruction: a fight breaks out that may result in the death of one or both participants. We
desire the density of drunks on the stretch of sidewalk between x = 0 and x = ℓ. The mathematical
description of this problem is based on the density (drunks per meter) u(x, t), which is governed by the
partial differential equation
ut = κuxx − µu2 , (4.25)
with boundary conditions at the bars
We’re modeling the bars using a Dirichlet boundary condition — there is constant density at each bar
and drunks spill out onto the sidewalk. The parameter µ models the lethality of the interaction between
pairs of drunks.
Exercise: How would the formulation change if the drunks are not belligerent? They peacefully ignore each
other. But instead, drunks have a constant probability per unit time of dropping dead. How does the
formulation of the continuum model change? (In this case you might prefer to think of u(x, t) as the
concentration of a radioactive element, rather than drunken walkers.)
and
u2 = u20 + α2u0 u1 + α2 2u0 u2 + u21 + · · · (4.33)
The leading-order problem is
45
1
0.95
0.9
u
0.85
0.8
0.75 α = 0.5
0.7
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x
Figure 4.1: Comparison of the perturbation solution for u(x, 0.5) with numerical solution obtained by
the matlab routine bvp4c; the bvp4c solution is the black solid curve. The approximation 1 + αu1 is
green dashed, the three-term expansion is red solid, the four-term expansion is blue dash-dot and the
five term expansion in (4.44) is cayan solid.
The solution is
u1 (x) = − 21 (1 − x2 ) . (4.37)
At second order
u2xx = 2u0 u1 = − 1 − x2 , with u2 (±1) = 0 . (4.38)
The solution is
x4 x2 5
u2 (x) =
− + 1
= 12 1 − x2 5 − x2 . (4.39)
12 2 12
For those with obsessive-compulsive tendencies it is always tempting to calculate more terms: the
next term is
u3xx = 2u0 u2 + u21 , with u3 (±1) = 0 , (4.40)
with solution
1
u3 = − 72 1 − x2 31 − 8x2 + x4 . (4.41)
And another
u4xx = 2u0 u3 + 2u1 u2 , with u4 (±1) = 0 , (4.42)
with solution
u4 (x) = 1
504 1 − x2 251 − 71x2 + 13x4 − x6 . (4.43)
I solved the boundary value problems in (4.40) and (4.42) with the mathematica routine DSolve.
Figure 4.1 compares the perturbation solution at α = 0.5 with a numerical solution obtained using the
matlab routine bvp4c. Even with 5 terms the agreement is only so so — we need more terms. Using
the five-term perturbation series above at x = 0, the concentration at the center of the domain is
46
1
s
0.9
11 term
0.95
0.8
0.9
0.7
3 terms
0.85
c
c
0.6
2
te
rm
0.5 0.8
s
0.4
6
0.75
te
rm
0.3
s
0.7
0 5 10 0 0.5 1
α α
Figure 4.2: In both panels the solid black curve is c(α) defined implicitly by (4.49); the integral is
evaluated with the matlab routine integral. In the left panel the implicit solution is compared with
the α → ∞ approximation in (4.53). In the right panel the implicit solution is compared to the series
in (4.57).
Following our discussion of energy conservation for nonlinear oscillators, we multiplying the equation by
ux and integrate to obtain
1 2
u = α3 u3 + constant .
2 x
(4.46)
def
Let c(α) = u(0, α) be the unknown concentration at the center of the domain, where ux (0, α) = 0.
Evaluating the equation above at x = 0 we see that the constant of integration is −αc3 /3. Next, take the
square root, separate the variables and integrate from x′ = 0 to x > 0 to obtain
Z u r
du′ 2α
√ = x. (4.47)
c u′3 − c3 3
(Notice we take the positive square root because if x > 0 then ux > 0.) Evaluating (4.47) at x = 1 we
obtain Z 1 r
du′ 2α
√ = . (4.48)
c u′3 − c3 3
Tidy up by changing variables to v = u′ /c:
r Z c−1
2αc dv
= √ . (4.49)
3 1 v3 − 1
The expression in (4.49) is convenient for numerical work: we can graph the relation between c and α by
specifying c in the range 0 < c < 1 and evaluating α by numerical quadrature (see figure 4.2). Note it is
not necessary to use fzero.
The form in (4.49) is useful in the limit α → ∞ and c → 0: an asymptotic approximation to c is obtained
47
by
r Z ∞ Z ∞
2αc dv dv
= √ − √ , (4.50)
3 1 v 3 −1
c −1 v 3 −1
Z ∞
√ Γ (7/6) dv
≈2 π − 3/2
, (4.51)
Γ (2/3) c −1 v
√ Γ (7/6) √
=2 π −2 c . (4.52)
Γ (2/3)
| {z }
=2.42865
The left panel of figure 4.2 compares this approximation with the result from numerical evaluation of the
integral in (4.49).
Note I have written ∼ in (4.52) — this is unjustified because I haven’t displayed the asymptotic sequence
used to construct the approximation, nor indicated how one might obtain more terms. On the other hand,
the large-α comparison with the “exact” solution is splendid — careful justification of the approximation
(4.53) seems pointless.
One can also use (4.49) to reproduce and extend the α → 0 approximation in (4.44). Changing variables
to w = v − 1: Z f
√ dw −1/2
2αc = 1 + w + 13 w2 , (4.54)
0 w
def
where f = c−1 − 1 ≪ 1. Using mathematica
Z f
√ dw w 5w2
2αc = 1− + + ··· , (4.55)
0 w 2 24
f 3/2 f 5/2
= 2f 1/2 − + +··· (4.56)
3 12
Squaring the expression above and using InverseSeries to express c in terms of α one eventually arrives
at
α 5α2 31 α3 251 α4 5599 α5 43615 α6 10657285 α7
c=1− + − + − + −
2 12 72 504 9072 54432 9906624
25157603 α8 4452284365 α9 241448268505 α10
+ − + + O α11 . (4.57)
16982784 2139830784 81313569792
The coefficients are growing slowly — this series may have a non-zero radius of convergence. The right
panel of figure 4.2 compares partial sums of (4.57) to the exact solution. This example is frustrating: the
function c(α) is only slightly bent in the range 0 ≤ α ≤ 1. Yet the series (4.57) is ineffective beyond about
α = 0.5. This may be a job for Padé summation.
Boundary layers
First, consider the boundary value problem (4.31) with α = ǫ−1 ≫ 1. In terms of ǫ, the problem is
48
The leading order is
0 = u20 , with BCs u0 (±1) = 1 . (4.60)
Immediately we see that there is no solution to the leading-order problem.
What’s gone wrong? Let’s consider a linear problem with the same issues:
has no solution. The advantage of a linear example is that we can exhibit the exact solution:
√
cosh(x/ ǫ)
v= √ , (4.63)
cosh(1/ ǫ)
see figure 4.3(a). The exact solution has boundary layers near x = −1 and x = +1. In these regions
v varies rapidly so that the term ǫvxx in (4.61) is not small relative to v. Note that the leading order
interior solution, v0 = 0 is a good approximation to the correct solution outside the boundary layers. In
this interior region the exact solution is exponentially small e.g.,
1 √
v(0, ǫ) = √ ∼ 2e−1/ ǫ , as ǫ → 0. (4.64)
cosh(1/ ǫ)
Rapid oscillations
Another linear problem that defeats a regular perturbation expansion is
In this case the solution is rapidly varying throughout the domain. The term ǫwxx is never smaller than
w.
Secular errors
Let’s consider a more subtle problem:
49
(a) ǫ = 0.004 (b) ǫ = 0.004
1 1
w(x, ǫ)
v(x, ǫ)
0.5 0
0 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
(c) ǫ = 0.05
x x
1
x(t)
-1
0 10 20 30 40 50 60 70 80 90
t
(d) ǫ = 0.05
2
x(t)
-2
0 10 20 30 40 50 60 70 80 90
t
50
In this case it looks like the RPS
with solution
x0 = cos t . (4.72)
In fact, this RPS does work for some time — see figure 4.3(c). But eventually the exact solution (4.69)
and the leading-order approximation in (4.72) have different signs. That’s a bad error if x0 (t) is a clock.
Maybe we can improve the approximation by calculating the next term? The order ǫ1 problem is
I hope you recognize a resonantly forced oscillator when you see it: the solution of (4.73) is
x1 = − 21 t sin t . (4.75)
This first-order “correction” makes matters worse — see figure 4.3(d). The RPS in (4.76) is “disordered”
once ǫt = ord(1): we don’t expect an RPS to work if the higher order terms are larger than the earlier
terms. Clearly there is a problem with direct perturbative solution of an elementary problem.
In this example the term ǫx is small relative to the other two terms in differential equation at all
time. Yet the small error slowly accumulates over long times ∼ ǫ−1 . Astronomers call this a secular
error2. We did not face secular errors in the projectile problem because we were solving the differential
equation only for the time aloft, which was always much less than 1/ǫ.
2
From Latin saecula, meaning a long period of time. Saecula saeculorum is translated literally as “in a century
of centuries”, or more poetically as “forever and ever”, or “world without end”.
51
4.4 Problems
Problem 4.1. (i) Consider the projectile problem with linear drag:
d2 z dz
+µ = −g0 , (4.77)
dt2 dt
and the initial conditions z(0) = 0 and dz/dt = u. Find the solution with no drag, µ = 0, and calculate
the time aloft, τ . (ii) Suppose that the drag is small — make this precise by non-dimensionalizing
the equation of motion and exhibiting the relevant small parameter ǫ. (iii) Use a regular perturbation
expansion to determine the first correction to τ associated with non-zero drag. (iv) Integrate the non-
dimensional differential equation exactly and obtain a transcendental equation for τ (ǫ). Asymptotically
solve this transcendental equation approximately in the limits ǫ → 0 and ǫ → ∞. Make sure the ǫ → 0
solution agrees with the earlier RPS.
d2 z dz dz
+ν = −g0 , (4.78)
dt2 dt dt
and the initial conditions z(0) = 0 and dz/dt = u. (i) Explain why the absolute value |ż| in (4.78)
is necessary if this term is to model air resistance. (ii) What are the dimensions of the coefficient ν?
Nondimensionalize the problem so there is only one control parameter. (iii) Suppose that ν is small.
Use a regular perturbation expansion to determine the first correction to the time aloft. (iv) Solve the
nonlinear problem exactly and obtain a transcendental equation for the time aloft. (This is complicated.)
Problem 4.3. In this problem we use energy conservation to obtain a solution to the projectile problem
which is superior to (4.17). (i) From the non-dimensional equation of motion (4.5), show that
1 2 1 1 1 1
2 ż −
ǫ 1 + ǫz
= 2 −
ǫ
. (4.79)
(ii) Find the maximum height reached by the projectile, zmax , in terms of ǫ. (iii) Show that the time
aloft is given exactly by
Z 1s
1 + aξ def ǫ
τ = 2zmax dξ , with a(ǫ) = . (4.80)
0 1 − ξ 2 − ǫ
(iv) Evaluate the integral above exactly. (e) Use mathematica or some other tool to obtain the ǫ ≪ 1
expansions
4 a a2 a3 a4 a5 a6 7
τ= 1+ − + − + − + ord a . (4.81)
2−ǫ 3 15 35 63 99 143
and
4ǫ 4ǫ2 16ǫ3 16ǫ4 32ǫ5 32ǫ6
τ =2+ + + + + + + ord ǫ7 . (4.82)
3 5 35 63 231 429
Which series is superior at ǫ = 0.5?
52
1.5
0.5
0
0 5 10 15 20 25
Figure 4.4: Numerical solution of (4.85) with various initial conditions. In this illustration
K1 /K0 = 0.1 and ω/r = 2. At large time all initial conditions convergence to a periodic
solution that lags the carrying capacity.
Problem 4.5. Consider the logistic equation with a periodically varying carrying capacity:
N
Ṅ = rN 1 − , with K = K0 + K1 cos ωt . (4.85)
K
The initial condition is N (0) = N0 . (i) Based on the K1 = 0 solution, non-dimensionalize this problem.
Show that there are three control parameters. (ii) Suppose that K1 is a perturbation i.e., K1 /K0 ≪ 1.
The numerical solution in Figure 4.4 shows that eventually the initial condition is “forgotten” and all
solutions converge to a periodic oscillation about the mean carrying capacity K0 . Use perturbation
theory to determine the amplitude and phase of the long-term oscillation.
Following the discussion in section 4.2, compute three terms in the RPS.
Problem 4.7. Let’s make a small change to the formulation of the belligerent-drunks example in (4.25)
and (4.26). Suppose that we model the bars using a Neumann boundary condition. This means that
the flux of drunks, rather than the concentration, is prescribed at x = 0 and ℓ: the boundary condition
in (4.26) is changed to
κux (0, t) = −F , and κux (ℓ, t) = F , (4.87)
where F , with dimensions drunks per second, is the flux entering the domain from the bars. Try to
repeat all calculations in section 4.2, including the analog of the β ≪ 1 perturbation expansion. You’ll
find that it is not straightforward and that a certain amount of ingenuity is required to understand the
weakly interacting limit with fixed-flux boundary conditions.
Problem 4.8. First read the section entitled Boundary layers. Inspired by the example in that
section, find an approximate solution of the boundary value problem:
4
10−12 vxx = ex v , with BCs v(±1) = 1 . (4.88)
If you can do this, you’ll be on on your way to understanding boundary layer theory.
ẍ + β ẋ + x = 0 , (4.89)
53
(i) Supposing that β > 2, solve the problem exactly. (ii) Show that if β ≫ 1 then the long-time
behaviour of your exact solution is
x ∝ e−t/β , (4.91)
i.e., the displacement very slowly decays to zero. (iii) Motivated by this exact solution, “rescale” the
problem (and the initial condition) by defining the slow time
def t
τ = , (4.92)
β
and X(τ ) =?x(t). Show that with a suitable choice of ?, the rescaled problem is
Make sure you give the definition of X(τ ) and ǫ ≪ 1 in terms of the parameter β ≫ 1 and the original
variable x(t). (iv) Try to solve the rescaled problem (4.93) using an RPS
Discuss the miserable failure of this approach by analyzing the dependence of the exact solution from
part (i) on β. That is, simplify the exact solution to deduce a useful β → ∞ approximation, and explain
why the RPS (4.94) cannot provide this useful approximation.
Problem 4.10. Consider a medium −ℓ < x < ℓ in which the temperature θ(x, t) is determined by
with boundary conditions θ(±ℓ, t) = 0. The right hand side is a heat source due to an exothermic
chemical reaction. The simple form in (4.95) is obtained by linearizing the Arrhenius law. The medium
is cooled by the cold walls at x = ±ℓ. (i) Put the problem into the non-dimensional form
Your answer should include a definition of the dimensionless control parameter ǫ in terms of κ, α, β
and ℓ. (ii) Assuming that ǫ ≪ 1, calculate the steady solution Θ(X, ǫ) using a regular perturbation
expansion. Obtain two or three non-zero terms and check your answer by showing that the “central
temperature” is
def
C(ǫ) = Θ(0, ǫ) , (4.97)
2 3
ǫ 5ǫ 47ǫ
= + + + ord ǫ4 . (4.98)
2 24 360
(iii) Develop an approximate solution with iteration. (iv) Integrate the steady version of (4.96) exactly
and deduce that: r
−C/2 −1
p
−C
ǫ
e tanh 1−e = . (4.99)
| {z } 2
def
= F (C)
(Use mathematica to do the integral.) Plot the function F (C) and show that there is no steady solution
if ǫ > 0.878. (v) Based on the graph of F (C), if ǫ < 0.878 then there are two solutions. There is the
“cold solution”, calculated perturbatively in (4.98), and there is a second “hot solution” with a large
central temperature. Find an asymptotic expression for the hot central temperature as ǫ → 0.
54
Lecture 5
Let’s consider some perturbation problems presented by partial differential equations — a main novelty
is perturbation of geometry.
Above T is the temperature (K), c is the heat capacity (J/K kg), ρ is the density (kg/m3 ) and and κ is
the conductivity. Assuming that c, ρ and κ are all constant, (5.1) is rewritten as the diffusion equation
Tt = κ∇2 T , (5.3)
def
where κ = κ/ρc is the thermal diffusivity and ∇2 is the laplacian operator.
55
Now suppose that the slab is slightly deformed so that the thickness is no longer uniform. Let’s
suppose that the solid slab is now the region
− ∞ < x < ∞, h(x) < y < H , (5.7)
where the constant H is now the mean thickness. There is a corrugated lower boundary at z = h(x)
with
h = hmax cos kx . (5.8)
We assume that there is a gap between the hill tops and below the flat lid: hmax < H.
In steady state we must solve Laplace’s equation Txx + Tzz = 0 with Dirichlet boundary conditions
T (x, h(x)) = T0 , T (x, H) = T0 + ∆T . (5.9)
If h(x) = 0 then we recover the simple solution in (5.5).
Start by scaling using the non-dimensional variables
T − T0
def
T̄ = , and (x̄, z̄) = k(x, z) . (5.10)
∆T
Dropping the decoration, the non-dimensional problem is
Txx + Tzz = 0 , (5.11)
with boundary conditions
T (x, ǫ cos x) = 0 , and T (x, β) = 1 . (5.12)
The two non-dimensional parameters above are
def def
ǫ = khmax , and β = kH . (5.13)
Obviously hmax is less than H and therefore ǫ < β.
56
1
0.8
0.6
z 0.4
0.2
-0.2
-0.4
ǫ = 1/3 and β = 1
-3 -2 -1 0 1 2 3
x
Using hi to denote an average over the x, the averaged flux through the slab is
1 2 coth β
hTz (x, β)i = 1+ǫ , (5.23)
β 2β
| {z }
def
=χ
where χ is an enhancement factor due to the corrugations. In dimensional variables the heat flux through
the slab is κ∆T χ/H (W m−2 ).
Is it physically intuitive that these corrugations increase the flux of heat through the slab? One
can argue that the places where the slab is thin (above the hills) are short circuits. This suspicion
is confirmed in figure 5.1 which shows that the temperature gradient is increased over the hills and
decreased over the valleys. But this modulation is the order ǫ term in (5.22), which is proportional to
cos x and therefore integrates to zero. The flux enhancement χ in (5.23) is order ǫ2 — the big gradients
over the hills more than compensate for the small gradients over the valleys. This effect is subtle and I
don’t have a totally satisfactory physical explanation.
We should also calculate the heat content of the slab
Z π Z β
1
Q(x) = T (x, z) dzdx . (5.24)
2π −π ǫ cos x
57
%% contour plot of the corrugated-slab temperature
clc
epsn = 1/3; beta = 1;
xx= linspace(-pi,pi);zz = linspace(-epsn,beta);
[X,Z] = meshgrid(xx,zz);
S1 = sinh(beta - Z)/(beta*sinh(beta));
S2 = sinh(2*(beta - Z))/(2*beta*sinh(2*beta));
T = Z/beta - epsn*cos(X).*S1 - 0.5*epsn^2*(coth(beta)/beta)...
*((beta-Z)/beta + 2*beta*cos(2*X).*S2);
figure(1)
contour(X,Z,T,20)
xlabel(’$x$’,’interpreter’,’latex’,’fontsize’,16)
ylabel(’$z$’,’interpreter’,’latex’,’fontsize’,16)
hold on
% use "area", rather than "fill"
height = epsn*cos(xx);
area(xx,height,-1.25*epsn)
text(-3,-0.37,’$\epsilon = 1/3$ and $\beta=1$’,...
’interpreter’,’latex’,’fontsize’,16)
Matlab code that produced figure 5.1 is above. The command “area” is very handy.
β = ǫα , (5.27)
58
where α > 1 and consider the limit ǫ → 0 with α fixed. The thickness-in-z of the slab is now of order ǫ
everywhere so it makes sense to “rescale” the vertical coordinate
def z
z = , ⇒ ∂z = ǫ−1 ∂ζ . (5.28)
ǫ
The re-scaled problem is
ǫ2 Txx + Tζζ = 0 , (5.29)
with boundary conditions
T (x, cos x) = 0 , and T (x, α) = 1 . (5.30)
Now look for a regular perturbation solution
∇2 φ = 4πGρχ , (5.38)
where (
1, inside the mass;
χ= (5.39)
0, outside the mass.
Solving the Poisson equation (5.38), we obtain the well known spherically symmetric solution
( 2 2
GM 3r̄2r̄−r2 , inside the sphere;
φ=− r̄
(5.40)
r̄ r , outside the sphere .
59
Notice that φ and φr are continuous at r = a; the second derivative is discontinuous at the surface of
the sphere
3g
φrr (r̄+ ) − φrr (r̄− ) = − , (5.41)
r̄
where the gravitational acceleration at the surface is
GM def
g = . (5.42)
r̄2
The liquid mass is in equilibrium because ∇φ is normal to the surface of the sphere. Equivalently, the
surface of the sphere is an equipotential surface.
60
Perturbative solution
Scale analysis identifies a single dimensionless parameter
Ω2 4π Ω2 r̄
ǫ= = . (5.54)
ρG 3 g
“Slow rotation” means that ǫ ≪ 1. Instead of non-dimensionalizing the problem and expanding in ǫ, we
live dangerously by expanding in terms of the dimensional parameter Ω2 :
s = r̄ + Ω2 s1 (θ) + ord Ω4 , (5.55)
and
GM
φ=− +Ω2 φ1 + ord Ω4 . (5.56)
| {zr }
φ0
Noting that φ1r (r̄+ ) − φ1r (r̄− ) = −5βP2 /r̄, the normal derivative condition in (5.62) gives
5β = −3gr̄α . (5.67)
61
Solving for α and β one obtains
5 r̄ r̄2
α=− and β= . (5.68)
6g 2
5 r̄2 Ω2
s = r̄ − P2 (cos θ) . (5.69)
6 g
5 r̄2 Ω2
req = r̄ + . (5.71)
12 g
Thus the “flattening” is
req − rpol 5 r̄Ω2
= . (5.72)
r̄ 4 g
The external potential is
r̄2 g Ω2 r̄5
φ=− + P2 (cos θ) 3 . (5.73)
r 2r
62
5.5 Problems
Problem 5.1. Consider the partial differential equation
κ (Cxx + Czz ) − µC = 0 (5.74)
in the region above z = h(x), with h(x) = hmax cos kx. The boundary conditions are C(x, hmax cos kx) =
C∗ and C(x, z) → 0 as z → ∞. (i) Describe a physical situation governed by this boundary value prob-
lem. (ii) Solve the problem with hmax = 0. (iii) Based on your exact solution, non-dimensionalize the
problem with non-zero hmax and determine the non-dimensional control parameters. (iv) Use perturba-
tion theory to find the first effects of small non-zero hmax on the “inventory”
Z ∞ Z 2π/k
def k
A = C(x, z) dx dz . (5.75)
2π h(x) 0
(I think you’ll have to go to second order in hmax .)
Problem 5.2. Consider the diffusion problem
ψxx + ψyy = −e−y (5.76)
in the “corrugated half-plane” defined by
− ∞ < x < ∞, and ǫ cos kx < y . (5.77)
At the wavy boundary:
ψ(x, ǫ cos kx) = 0 . (5.78)
The condition at infinity is
lim ψ(x, y) = A(ǫ, k) , (5.79)
y→∞
where A(ǫ, k) is an unknown function. (i) Solve the problem with ǫ = 0 and show that A(0, k) = 1. (ii)
Use a perturbation expansion (ǫ ≪ 1) to determine the first non-zero correction to A = 1.
Problem 5.3. Consider 2D potential flow (no vorticity) around an cylindrical object whose cross section
in the (x, y)-plane is a slightly distorted circle
r = a 1 − ǫ sin2 θ . (5.80)
Using a stream function ψ(x, y), with u = −ψy and v = ψx , the mathematical problem is
∇2 ψ = 0 , (5.81)
where
∇2 = ∂x2 + ∂y2 = ∂r2 + r−1 ∂r + r−2 ∂θ2 (5.82)
is the laplacian operator; boundary conditions are ψ = 0 on the surface of the body and ψ → −U y at
great distances from the body. (i) Review the standard solution for potential flow around a circular
cylinder i.e., the case ǫ = 0. (This solution is in all fluid mechanics textbooks; above I’m using cylindrical
coordinates r and θ that feature prominently in those textbooks.) (ii) Non-dimensionalize the problem
and identify all non-dimensional control parameters. (iii) Use the boundary perturbation method to
find the first effects of small distortion, ǫ ≪ 1. Visualize your solution.
Problem 5.4. Consider Laplace’s equation,
φxx + φyy = 0 , (5.83)
in a domain which is a periodic-in-x channel with walls at y = ±(1 + ǫ cos kx). The boundary condition
on the walls is
(∇φ + ı̂) · n̂ = 0 , (5.84)
where n̂ is the outward normal and ı̂ is the unit vector in the x-direction. Obtain two terms in the
expansion of ZZ
def
J(ǫ) = φx dxdy . (5.85)
63
k = 2 an d ǫ = 0. 3
0.5
y
−0.5
−1
0 1 2 3 4 5 6
kx
−0.6
−0.8
y
−1
−1.2
0 1 2 3 4 5 6
kx
Figure 5.2: My solution to problem 5.5 with k = 2 and ǫ = 0.3. The lower panel is an expanded
view of the lower boundary. Some errors in the boundary condition T = 0 are evident near
kx = 0 and 2π. At this largish value of ǫ another term wouldn’t hurt.
Problem 5.5. Consider a uniformly heated 2D metal ribbon of width 2h(x). The ribbon is cooled by
fixing T (x, h(x)) = 0 at the two boundaries. Thus the steady state temperature is determined by
64
Lecture 6
Boundary Layers
Notice that the advective term, chx , does not contribute to the budget above — advection is moving
dirt but because h = 0 at the boundaries advection is not directly contributing to the fall of dirt over
the edges.
65
s
z = h(x,t)
x
-c
x=0 x=a
1
ch(x)/sℓ
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x/ℓ
Figure 6.2: The solution in (6.7). The solid curve is ǫ = 0.1, the dashed curve is ǫ = 0.025 and
the dash-dot curve is ǫ = 0.005.
66
then the solution in (6.4) is
1 − e−x/ǫ
h(x, ǫ) = − x. (6.7)
1 − e−1/ǫ
This solution is shown in figure 6.2. We can consider two different limiting processes
1. The outer limit: ǫ → 0, with x fixed. Under this limit, the exact solution in (6.7) is h → 1 − x.
The outer limit produces a good approximation to the exact h(x, ǫ), except close to x = 0 where
the boundary condition is not satisfied.
def
2. The inner limit: ǫ → 0 with X = x/ǫ fixed. Under this limit the exact solution in (6.7) is
h → 1 − e−X . The inner limit produces a good approximation to the solution within the boundary
layer. This is a small region in which x is order ǫ. It is vital to understand that the term ǫhxx is
leading order within the boundary layer, and enables the solution to satisfy the boundary condition
at x = 0.
Thus the function in (6.7) has two different asymptotic expansions. Each expansion is limited by non-
uniformity as ǫ → 0.
We’re assuming that as ǫ → 0 with fixed x — the outer limit — that the solution has the structure in
(6.17). Note that in the outer limit the hn ’s in (6.10) are independent of ǫ.
Exercise: Consider the special case s = 1, with the exact solution in (6.7). Does the outer limit of that exact
solution agree with the assumption in (6.10)?
Looking at the exact solution we know that the correct choice satisfies the BC at x = 1. We proceed
with this inner solution and return later to show why the alternative ends in tears.
67
The inner expansion, and a quick-and-dirty matching argument
Now we can also define
x
def d 1 d
X = , so that = . (6.13)
δ dx δ dX
δ is the boundary layer thickness — we’re pretending that δ is unknown. Using the inner variable X,
the problem (6.9) becomes is
ǫδ −2 hXX + δ −1 hX = −s(δX) . (6.14)
| {z }
two term balance
68
Why can’t we have a boundary layer at x = 1?
Now we return to (6.12) and discuss what happens if we make the incorrect choice
Z x
?
h0 (x) = − s(x′ ) dx′ . (6.24)
0
def x−1 d 1 d
X = , so that = . (6.25)
δ dx δ dX
The dominant balance argument convinces us that δ = ǫ, and using (6.17) we find exactly the same
leading-order solution as before:
x−1
H0 = A0 1 − e−X , except that now X= . (6.26)
δ
H0 (X) above satisfies the BC at X = 0, which is the same as x = 1. But now when we attempt to match
the outer solution in (6.24) it all goes horribly wrong: we take the limit X → −∞ and the exponential
explodes. It is impossible to match the outer solution (6.24) with the inner solution in (6.26).
ǫhxx + hx = −s . (6.27)
We assume that the source s(x) has the Taylor series expansion around x = 0:
and around x = 1:
s(x) = s1 + (x − 1)s′1 + 12 (x − 1)2 s′′1 + · · · (6.29)
Notice that hn (1) = 0. It is clear how this series continues to higher order. We can assemble the first
three terms of the outer solution as
Z 1 Z x
′ ′
h= s(x ) dx − s(x′ ) dx′ + ǫ [s(x) − s1 ] + ǫ2 [s′1 − sx (x)] + O(ǫ3 ) . (6.34)
0 0
69
Exact solution at ε = 1, 1/10, 1/100
y/max(y)
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
The limit ε −−−> 0 is singular
1
0.5 ε =+1/20
0
ε =−1/20
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.2
exact with ε =1/4
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Matching
In the matching region X ≫ 1 and we simplify the boundary layer solution by neglecting all the
exponentially small terms involving e−X . This gives
h ∼ A0 + ǫA1 − ǫs0 (X − 1) + ǫ2 A2 − ǫ2 s′0 12 X 2 − X + 1 +O(ǫ3 ) . (6.40)
|{z} | {z } | {z }
H0 ǫH1 ǫ2 H2
We rewrite the outer solution in (6.31) through (6.33) in terms of X = x/ǫ and take the inner limit,
keeping terms of order ǫ2 :
Z 1
h∼ s(x′ ) dx′ − ǫs0 X − 21 ǫ2 s′0 X 2 +ǫ [s0 + ǫXs′0 − s1 ] +ǫ2 [s′1 − s′0 ] +O(ǫ3 ) . (6.41)
0 | {z } | {z }
| {z } h2 h2
h0
70
The inner limit of h0 (x) produces terms of all order in ǫ — above we’ve explicitly written only terms up
to ord(ǫ2 ).
A shot-gun marriage between these different expansions (6.40) and (6.41) of the same function h(x, ǫ)
implies that
Z 1
A0 = s(x′ ) dx′ , A1 = s0 − s1 , A2 = s′1 − s′0 . (6.42)
0
All the other terms in (6.40) and (6.41) match. Notice that terms from h0 match terms from H1 and
H2 , and from H3 if we continue to higher order. It is interesting that the boundary layer constants A1
and A2 involve properties s1 and s′1 of the source at x = 1.
H = 1 − e−X − ǫ |{z}
X . (6.43)
| {z }
H0 H1
h=1−x . (6.44)
| {z }
h0
No matter how many terms we calculate, we will never satisfy the x = 0 boundary condition.
After re-scaling, the boundary layer problem is
The expansion
H = H0 (X) + ǫH1 (X) + · · · (6.51)
then leads to
71
Before matching the solution of the boundary-layer problem is
H = A0 1 − e−X − ǫe−a X + ǫA1 1 − e−X + ǫ2 e−a a X − 12 X 2 + ǫ2 A2 1 − e−X + ord(ǫ3 ) . (6.55)
1 − e−a
h= − e−a x − 12 e−a ax2 −ǫ(1 − e−a ) + ǫae−a x + ǫ2 a(1 − e−a ) +ord() . (6.56)
| a {z } | {z }
h2
h0
The underlined terms already match, and matching the others gives
1 − e−a
A0 = , A1 = , A2 = (6.58)
a
Unfortunately it is not clear that this example is simpler than the general case.....
Where the pile is deeper because there is more height for diffusion to move dirt around.
If we assume that the boundary layer is at x = 0 then easy calculations show that the leading-order
interior solution is
h0 = 1 − x , (6.60)
and that the series continues as
h = 1 + ǫ + 2ǫ2 + · · · (1 − x) . (6.61)
This perturbation series indicates that there is a simple exact solution that satisfies the x = 1 boundary
condition:
h = A(ǫ) (1 − x) , where ǫA2 − A + 1 = 0 . (6.62)
This is pleasant, but it does not help with the boundary condition at x = 0.
Introducing the boundary layer variable
def
X = x/ǫ , (6.63)
which integrates to
H0 H0X + H0 = C . (6.66)
This leading-order solution must satisfy both the X = 0 boundary condition and the matching condition
72
1
0.8
H 0( X )
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4
X = x/ǫ
Figure 6.4: The boundary-layer solution in (6.72) of the nonlinear Stommel problem in (6.59).
then we conclude that C = 0. But C = 0 in (6.66) quickly leads to H0 = −X. This satisfies the
boundary condition at x = 0, but not the matching condition. We are forced to consider that the limit
above is non-zero. In that case we can determine the constant C in (6.66) by matching to the interior.
Thus C = 1 and
1
H0X = −1. (6.69)
H0
We solve (6.69) via separation of variables
H0 dH0
= dX , (6.70)
1 − H0
integrating to
1
− H0 + ln= X + A. (6.71)
1 − H0
Applying the boundary condition at X = 0 shows that A = 0, and thus H0 (X) is determined implicitly
by
H0 = 1 − e−X−H0 . (6.72)
This implicit solution is shown in figure 6.4. As X → ∞ we use iteration to obtain the large-X behaviour
of the boundary layer solution
H0 (X) ∼ 1 − e−X−1 + e−2X−2 + · · · as X → ∞ . (6.73)
This demonstrates matching to the leading-order interior solution.
Might we find another solution of (6.59) with a boundary layer at x = 1? The answer is yes: (6.59)
has both the reflection symmetry
h → −h , and x → −x , (6.74)
and the translation symmetry
x → x + a. (6.75)
Thus we can define x1 = x − 1/2 so that the boundary conditions are applied at x1 = ±1/2. The
reflection symmetry then implies that if h(x1 ) is a solution then so is −h(−x1 ). With this trickery the
solution we’ve just described is transformed into a perfectly acceptable solution but with a boundary
layer at the other end of the domain.
Exercise: assume that the boundary layer is at x = 1, so that the leading-order outer solution is now h0 = −x.
Construct the boundary-layer solution using the inner variable X = (x − 1)/ǫ — you’ll be able to satisfy
both the x = 1 boundary condition and match onto the inner limit of the outer solution. Notice that this
solution has h(x) ≤ 0.
73
Reformulation of the nonlinear diffusion model
As a solution of the dirt-pile model the second solution above makes no sense: dirt piles can’t have
negative height. And the physical intuition that put the boundary layer at x = 0 can’t be wrong simply
because we use a more complicated model of diffusion. The problem is that the nonlinear diffusion
equation in (6.59) should be
ǫ 12 |h|h xx + hx = −1 , h(0) = h(1) = 0 . (6.76)
In other words, the diffusivity should vary with |h|, not h. Back in (6.59), our translation of the physical
problem into mathematics was faulty. Changing h to |h| in destroys the symmetry in (6.74).
Now let’s use the correct model in (6.76) and show that the boundary layer cannot be at x = 1. If
we try to put the boundary layer at x = 1 then the leading-order interior solution is
h0 = −x . (6.77)
Above we have assumed that H0 (X) < 0 so that |H0 | = −H0 . The differential equation in (6.82) must
be solved with boundary and matching conditions
The second condition above is matching onto the inner limit of the outer solution. We can integrate
(6.82) and apply the matching condition to obtain
dH0 H0 + 1
= . (6.81)
dX H0
Now if −1 < H0 < 0 then the equation above implies that
dH0
< 0. (6.82)
dX
The sign in (6.82) is not consistent with a solution that increases monotonically from H0 (−∞) = −1 to
H0 (0) = 1. Moreover if we integrate (6.81) with separation of variables we obtain an implicit solution
But as X → −∞ we do not get a match — the boundary layer cannot be at x = 1. Thus we cannot
construct a solution of the |h|-model in (6.76) with a boundary layer at x = 1
74
ǫ = 0.05
1
h(x)
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
6.5 Problems
Problem 6.1. (i) Find a leading order uniformly valid solution of
(ii) Solve the BVP above exactly and compare the exact solution to the boundary layer approximation
with ǫ = 0.1.
(iii) There is a boundary layer at x = π. “Rescale” the equation using X above as the independent
variable and denote the solution in the boundary layer by H(X). Find the first three terms in the regular
perturbation expansion of the boundary-layer equation:
H = H0 (X) + ǫH1 (X) + ǫ2 H2 (X) + O ǫ3 .
(iv) The Hn ’s above will each contain an unknown constant. Determine the three constants by matching
to the interior solution. (v) Construct a uniformly valid solution, up to an including terms of order ǫ2 .
You can check your algebra by comparing your boundary layer solution with the expansion of the exact
solution from part (i). (vi) With ǫ = 0.2 and 0.5, use matlab to compare the exact solution from part
(i) with the approximation in part (v).
Problem 6.3. Find a leading-order boundary layer solution to the forced Burgers equation
ǫhxx + 21 h2 x = −1 , h(0) = h(1) = 0 .
Use bvp4c to solve this problem numerically, and compare your leading order solution to the numerical
solution: see figure 6.5.
75
Problem 6.4. The result of problem 6.3 is disappointing: even though ǫ = 0.05 seems rather small, the
approximation in Figure 6.5 is only so-so. Calculate the next correction and compare the new improved
solution with the bvp4c solution. (The numerical solution seems to have finite slope at x = 1, while the
leading-order outer solution has infinite slope as x → 1: perhaps there a higher-order boundary layer at
x = 1 is required to heal this singularity?)
Problem 6.5. Use boundary layer theory to find leading order solution of
hx = ǫ 13 h3 xx + 1 , (6.84)
on the domain 0 < x < 1 with boundary conditions h(0) = h(1) = 0. You can check your answer by
showing that h = 1/2 at x ≈ 1 − 0.057ǫ.
76
Lecture 7
The speed is zero at x = 0, so we expect that dirt will start to pile up. If the source is uniform then the
steady-state problem is
√
ǫhxx + xh x = −1 , with BCs h(0) = h(1) = 0. (7.4)
Exercise: Show that a particle starting at x = 1 and moving with ẋ = −xβ , with β < 1, reaches x = 0 in a
finite time. What happens if β ≥ 1?
77
A dominant balance between the first two terms is achieved with ǫ = δ 3/2 , or
δ = ǫ2/3 . (7.8)
We’ve satisfied the boundary condition at x = 0, and we must determine the remaining constant of
integration A0 by matching to the interior solution.
To match the interior, we need the asymptotic expansion of (7.13) as X → ∞: this can be obtained
by following our earlier discussion of Dawson’s integral:
A0
H0 (X) ∼ √ , as X → ∞, (7.14)
X
ǫ1/3 A0
= 1/2 . (7.15)
x
An alternative, and more efficient, derivation of (7.15) is to write (7.12) as
A0 H0X
H0 = 1/2
− 1/2 (7.16)
X X
and proceed iteratively starting with H0 ∼ A0 X −1/2 as X → ∞.
On the other hand the inner expansion of the outer solution in (7.5) is
1
h= + O x1/2 , ǫx−2 . (7.17)
x1/2
We almost have a match — it seems we should take A0 = ǫ−1/3 in (7.15) so that both functions are
equal to x−1/2 in the matching region. But remember that we assumed that H0 (x) is independent of ǫ,
so A0 cannot depend on ǫ. Our expansion has failed.
Exercise: How would you gear so that the term ǫx−2 in (7.15) is asymptotically negligible relative to x−1/2 in
the matching region?
Fortunately there is a simple cure: the correct definition of the boundary layer solution — which
replaces (7.9) — is
h = ǫ−1/3 H(X, ǫ) . (7.18)
In retrospect perhaps the rescaling in (7.18) is obvious — the interior RPS in (7.5) is becoming disordered
as x → 0. The problem is acute once the second term in the expansion is comparable to the first term,
which happens once
x−1/2 ∼ ǫx−2 or x ∼ ǫ2/3 = δ . (7.19)
78
O ( ǫ) unif
1.5 e xac t
h(x) 1
0.5
ǫ = 0.05
0
0 0.2 0.4 0.6 0.8 1
x
Figure 7.1: Comparison of (7.23) with the exact solution of (7.4).
This the boundary layer scale, and as we enter this region the interior solution is of order x−1/2 ∼ ǫ−1/3
— this is why the rescaling in (7.18) is required. If we’d been smart we would have made this argument
immediately after (7.5) and avoided the mis-steps in (7.9) and (7.10).
Using the rescaled variable in (7.15), the boundary layer equation that replaces (7.10) is
√
HXX + XH = −ǫ2/3 . (7.20)
X
This satisfies the x = 0 boundary condition and also matches the x−1/2 from the interior.
We can now construct a leading-order uniformly valid solution as
Z X
3/2 3/2
huni (x, ǫ) = ǫ−1/3 e−2X /3 e2t /3 dt − x1/2 . (7.23)
0
Figure 7.1 compares the uniformly valid approximation (7.23) with an exact solution of (7.4).
R1
Exercise: evaluate the integral 0
h(x, ǫ) dx to leading order as ǫ → 0.
79
Later, to perform the match, we will need the inner limit of this outer solution. So in preparation for
that, as x → 0,
h0 + ǫh1 + ǫ2 h2 = (e2 − 1) − (e2 + 1)x + 12 (e2 − 1)x2
+ ǫ(1 − e)2 − ǫx2(e2 − e)
+ ǫ2 2(e2 − e) + ord(x3 , ǫx2 , ǫ2 x) . (7.29)
Turning to the boundary layer, we use the inner variable X = x/ǫ so that the rescaled differential
equation is
hXX + eǫX h X = −2ǫe2ǫX . (7.30)
We substitute the inner expansion
h = H0 (X) + ǫH1 (X) + ǫ2 H2 (X) + · · · (7.31)
into the differential equation and collect powers of ǫ. The first three orders of the boundary-layer problem
are
H0XX + H0X = 0 , (7.32)
H1XX + [H1 + XH0 ]X = −2 , (7.33)
H2XX + H2 + XH1 + 21 X 2 H0 X = −4X . (7.34)
Note that it is necessary to expand the exponentials within the boundary layer, otherwise we cannot
ensure that the Hn ’s do not depend on ǫ.
The solution for H0 that satisfies the boundary condition at x = 0, and also matches the first term
on the right of (7.29), is
H0 = (e2 − 1) 1 − e−X . (7.35)
The solution for H1 that satisfies the boundary condition at x = 0 is
H1 = A1 (1 − e−X ) + (e2 + 1) 1 − X − e−X + 12 (e2 − 1)X 2 e−X . (7.36)
The constant A1 is determined by matching to the interior solution. We can do this by taking the limit
as X → ∞ in the boundary layer solution H0 + ǫH1 . Effectively this means that all terms involving
e−X are exponentially small and therefore negligible in the matching. To help with pattern recognition
we rewrite the outer limit of the boundary-layer solution in terms of the outer variable x. Thus, in the
matching region where X ≫ 1 and x ≪ 1, the boundary-layer solution in (7.35) and (7.36) is:
H0 + ǫH1 → (e2 − 1) + ǫA1 + ǫ(1 + e2 ) − (1 + e2 )x . (7.37)
To match the first term on the second line of (7.29) with (7.37) we require
ǫA1 + ǫ(1 + e2 ) = ǫ(1 − e)2 , ⇒ A1 = −2e . (7.38)
2
The final term in (7.37), namely −(1 + e )x, matches against a term on the first line of (7.29). That’s
interesting, because −(1 + e2 )x comes from H1 and matches against h0 .
There are many remaining ummatched terms in (7.29) e..g, 12 (e2 − 1)x2 on the first line. This term
will match against terms from H2 i.e., it will require an infinite number of terms in the boundary layer
expansion just to match terms arising from the expansion of the leading-order interior solution.
Now we construct a uniformly valid approximation using the recipe
uniform = outer + inner − match . (7.39)
This gives
huni = e2−x − ex − (e2 − 1)e−X
+ ǫ 1 − 2e1−x + e2−2x + e−X 1 2 2
2 X (e − 1) − (e − 1)2 . (7.40)
This construction satisfies the x = 0 boundary condition exactly. But there is an exponentially small
embarrassment at x = 1. Figure 7.2 compares the numerical solution of (7.24) with the approximation
in (7.40). At ǫ = 0.2 the two-term approximation is significantly better than just the leading-order term.
We don’t get line-width agreement — the ǫ2 term would help.
80
3
ǫ = 0.2 bvp4c
two terms
one term
h2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
Figure 7.2: Comparison of the one and two term uniform approximations in (7.40) with the
numerical solution of (7.24).
81
function StommelBL
% Solution of epsilon h_{xx} +(exp(x) h)_x = - 2 \exp(2 x)
epsilon = 0.2;
solinit = bvpinit(linspace(0 , 1 , 10) , @guess);
sol = bvp4c(@odez,@bcs,solinit);
% My fine mesh
xx = linspace(0,1,100); hh = deval(sol,xx);
figure; subplot(2,1,1)
plot(xx , hh(1,:),’k’)
hold on
xlabel(’$x$’,’interpreter’,’latex’,’fontsize’,16)
ylabel(’$h$’,’interpreter’,’latex’,’fontsize’,16,’rotation’,0)
axis([0 1 0 3.5])
% The BL solution
XX = xx/epsilon; EE =exp(-XX);
hZero = exp(2-xx) - exp(xx) - (exp(2) - 1).*EE;
hOne = 1 - 2*exp(1-xx) + exp(2-2*xx)...
+ EE.*( 0.5*XX.^2*(exp(2) - 1) - (exp(1) - 1)^2);
plot(xx, hZero+epsilon*hOne,’-.r’ , xx,hZero,’--g’)
legend(’bvp4c’,’two terms’ , ’one term’)
text(0.02,3.2,’$\epsilon =0.2$’,’interpreter’,’latex’,’fontsize’,16)
%% Inline functions
%The differential equations
function dhdx = odez(x,h)
dhdx = [h(2)/epsilon ; ...
- exp(x).*h(2)/epsilon - exp(x).*h(1) - 2*exp(2*x)];
end
82
7.2 A second-order BVP with a boundary layer
At the risk of repetition, let’s discuss another elementary example of boundary layer theory, focussing
on intuitive concepts and on finding the leading-order uniformly valid solution. We use the BVP
with BCs
y(0) = p , y(1) = q , (7.42)
as our model.
we have satisfied the boundary condition at x = 1. We return later to discuss why this is the correct
choice if a(x) > 0. (If a(x) < 0 the boundary layer is at x = 1 and the outer solution should satisfy the
boundary condition at x = 0.)
Unless we’re very lucky, (7.45) will not satisfy the boundary condition at x = 0. Let’s try to fix this
problem by building a boundary layer at x = 0. Begin by introducing a boundary layer coordinate
def x
X = , (7.46)
ǫ
and writing
y(x, ǫ) = Y (X, ǫ) . (7.47)
Then “re-scale” the differential equation (7.41) using the boundary-layer variables:
Terms in the Taylor series (7.49) will impact the higher orders.
83
The solution of (7.51) that satisfies the boundary condition at X = 0 is
Y0 = p + A0 1 − e−a(0)X , (7.53)
where A0 is a constant of integration. We are assuming that a(0) > 0 so that the exponential in (7.53)
decays to zero as X → ∞. This is why the boundary layer must be at x = 0. The constant A0 can then
be determined by demanding that in the outer solution (7.45) agrees with the inner solution (7.53) in
the matching region where X ≫ 1 and x ≪ 1. This requirement determines A0 :
Z 1
b(v)
p + A0 = q exp dv . (7.54)
0 a(v)
The outer solution above doesn’t satisfy either boundary condition: we need boundary layers at x = −1,
and at x = +1.
Turning to the boundary layer at x = −1 we introduce
def x+1 √
X = √ , and y(x, ǫ) = Y (X, ǫ) . (7.61)
ǫ
The re-scaled differential equation is
√
YXX − Y = f −1 + ǫX , (7.62)
84
We quickly set the constant of integration B0 to zero — the alternative would prevent matching with the
interior solution. Then the other constant of integration A0 is determined so that the boundary condition
at X = 0 is satisfied:
Y0 = f (−1) 1 − e−X . (7.66)
The boundary condition at x = +1 is satisfied with an analogous construction using the coordinate
def √
X = (x − 1)/ ǫ. One finds
Y0 = f (1) 1 − eX . (7.67)
Notice that the outer limit of this boundary layer is obtained by taking X → −∞.
Finally we can construct a uniformly valid solutions via
√ √
y uni (x) = f (x) − f (−1)e−(x+1)/ ǫ
− f (+1)e(x−1)/ ǫ
. (7.68)
Example:
ǫy ′′ + y = f (x) , y(0) = y(1) = 0 , (7.69)
If we solve the simple case with f (x) = 1 exactly we quickly see that this is not a boundary layer problem.
This belongs in the WKB lecture.
Example: Find the leading order BL approximation to
1
ǫu′′ − u = − √ , with BCs u(±1) = 0 . (7.70)
1 − x2
The leading-order outer solution is
1
u0 = √
. (7.71)
1 − x2
Obviously this singular solution
√ doesn’t satisfy the boundary conditions. We suspect that there are
boundary layers of thickness ǫ at x = ±1. Notice that the interior solution (7.71) is ∼ ǫ−1/4 as x moves
√
into this BL. Moreover, considering the BL at x = −1, we use X = (1 + x)/ ǫ as the boundary layer
coordinate, so that
1 1
√ = p √ . (7.72)
1 − x2 ǫ1/4 X(2 − ǫX)
Hence we try a boundary-layer expansion with the form
√
u(x, ǫ) = ǫ−1/4 U0 (X) + ǫU1 (X) + ord(ǫ) . (7.73)
A main point of this example is that it is necessary to include the factor ǫ−1/4 above.
The leading-order term in the boundary layer expansion is then
1
U0′′ − U0 = − √ , (7.74)
X
which we solve using variation of parameters
Z X v Z X −v
e e
U0 (X) = 21 e−X √ dv − 21 eX √ dv +P eX + Qe−X . (7.75)
0 v 0 v
| {z } | {z }
√ √ √
∼eX / X ∼ π−(e−X / X)
P + Q = 0. (7.76)
To match the outer solution as X → ∞, we must use the X → ∞ asymptotic expansion of the integrals
in (7.75), indicated via the underbrace.
√ We determine P so that the exponentially growing terms are
eliminated, which requires that P = π/2. Thus the boundary layer solution is
Z X
√ sinh(X − v)
U0 (X) = π sinh X − √ dv . (7.77)
0 v
(Must check this, and then construct the uniformly valid solution!)
85
Example: Find the leading order BL approximation to
where
ǫf ′′ + xf ′ + x2 f = 0 , with BCs f (0) = 1 , f (1) = 0 , (7.80)
and
ǫg ′′ + xg ′ + x2 g = 0 , with BCs g(0) = 0 , g(1) = 1 , (7.81)
The outer solution of the g-problem is
2
g = e(1−x )/2
+ ǫg1 + · · · (7.82)
To satisfy the X = 0 boundary condition we take P = 0, and to match the outer solution we require
Z ∞
2 √
Q e−v /2 dv = e . (7.87)
0
Now turn to the f -problem. The outer solution is fn (x) = 0 at all orders. The solution of the leading-order
boundary-layer problem is Z ∞
1 2
F0 (X) = √ e−v /2 dv . (7.90)
2π X
This is a stand-alone boundary layer.
Example: Let’s analyze the higher-order terms in the BL solution of our earlier example
86
√
Assuming that ǫX is small in the matching region, we expand the outer solution:
√ 1
y(x) = f (1) + ǫXf ′ (1) + ǫ 12 X 2 + 1 f ′′ (1) + ǫ3/2 X + X 3 f ′′′ (1)
6
1 1
+ ǫ2 1 + X 2 + X 4 f ′′′′ (1) + ord ǫ5/2 . (7.94)
2 24
We hope that the outer expansion of the inner solution at x = 1 will match the series above.
The rescaled inner problem is
√
YXX − Y = −f (1 + ǫX) , (7.95)
√ 1
= −f (1) − ǫXf ′ (1) − ǫ X 2 f ′′ (1) + ord(ǫ3/2 ) . (7.96)
2
The RPS is √
Y = f (1) 1 − eX + ǫY1 (X) + ǫY2 (X) + ǫ3/2 Y3 (X)ord(ǫ2 ) , (7.97)
with
Notice how the inner limit of the leading-order outer solution, y0 (x) = f (x), produces terms at all orders
in the matching region. In order to match all of y0 (x) one requires all the Yn (X)’s.
7.4 Problems
Problem 7.1. Find the leading-order uniformly valid boundary-layer solution to the Stommel problem
using boundary layer theory. (The case a = 1/2 was discussed in the lecture.) How thick is the boundary
layer at x = 0, and how large is the solution in the boundary layer? Check your reasoning by constructing
the leading-order uniformly valid solution when a = −1, a = 1 and a = 2.
87
Problem 7.5. Considering the slow-down example (7.4), find the next term in the boundary-layer
solution of this problem. Make sure you explain how the term ǫx−2 in the outer expansion is matched
as x → 0.
Problem 7.6. Assuming that a(x) < 0, construct the uniformly valid leading-order approximation to
the solution of
ǫy ′′ + ay ′ + by = 0 , with BCs y ′ (0) = p , y ′ (1) = q . (7.108)
(Consider using linear superposition by first taking (p, q) = (1, 0), and then (p, q) = (0, 1).)
(i) Find the rescaling for the boundary layer near x = 0, and obtain the leading order inner approx-
imation. Then find the leading-order outer approximation and match to determine all constants of
integration. (ii) Repeat for
√
ǫy ′′ − xy ′ + y = 0 , with BCs y(0) = p , y(1) = q . (7.110)
posed on 0 < x < 1 with boundary conditions y(0; ǫ) = 2 and y(1; ǫ) = 1/3.
y′ 1
ǫy ′′ − − = 0, with BCs y(0, ǫ) = y(1; ǫ) = 3 . (7.113)
1 + 2x y
Problem 7.11. In an earlier problem you were asked to construct a leading order, uniformly valid
solution of
ǫy ′′ − (1 + 3x2 )y = x , with BCs y(0, ǫ) = y(1; ǫ) = 1 . (7.114)
Now construct the uniformly valid two-term boundary layer approximation.
Find two terms in the outer expansion of y(x) and m(x), applying only boundary conditions at x = 1.
Next find two terms in the inner approximation at x = 0, applying the boundary condition at x = 0.
Determine the constants of integration by matching. Calculate m(0) correct to order ǫ.
88
Lecture 8
A reasonable goal is to produce the good approximation (8.4). The RPS will not be successful and this
failure will drive us towards the method of multiple time a scales, also know as “two timing”.
The leading-order problem is
The solution is
x0 = sin t . (8.7)
The first-order problem is
d2 x1 dx1
+ x1 = − cos t , with IC x̄1 (0) = 0 , (0) = 0 . (8.8)
dt2 dt
This is a resonantly forced oscillator equation, with solution
t
x1 = − sin t . (8.9)
2
89
1
0.5
x ( t)
0
−0.5
β = 0.2
−1
0 5 10 15 20 25 30 35 40
t
Figure 8.1: Comparison of the exact solution in (8.3) (the solid black curve), with the two-term RPS
in (8.10) (the blue dotted curve) and the two-time approximation in (??) (the dashed red curve). It is
difficult to distinguish the two-time approximation from the exact result.
βt β2 2
x(t, β) = sin t − sin t + t sin t + sin t − t cos t + O(β 3 ) . (8.11)
2 8
Calculating more terms in the RPS will not move us closer to the useful approximation in (8.4): instead
we’ll grind out the useless approximation in (8.11). In this example the small term in (8.1) is small
relative to the other terms at all times. Yet the small error slowly accumulates over long times ∼ β −1 .
This is a secular error.
Two-timing
Looking at the good approximation in (8.4) we are inspired to introduce a slow time:
def
s = βt . (8.12)
At leading order
90
Notice that the “constant of integration” is actually a function of the slow time s. We determine the
evolution of this function A(s) at next order1 .
At next order
Again we have a resonantly forced oscillator. but this time we can prevent the secular growth of x1 on
the fast time scale by requiring that
2As + A = 0 . (8.20)
Thus the leading-order solution is
The constant of integration A0 is determined to satisfy the initial conditions. This requires
Averaging
mẍ + k1 x + k3 x3 = 0 , (8.24)
ẍ + x + ǫx3 = 0 , (8.26)
immediately provides a phase-plane visualization of the solution and shows that the oscillations are
bounded.
Exercise: Show that in (8.26), ǫ = k3 x20 /k1 .
Exercise: Derive (8.28).
1
We could alternatively write the general solution of the leading order problem as
x0 = R cos(t + φ) , (8.17)
where the amplitude R and the phase φ are as yet undetermined functions of s. I think the complex notation in
(8.16) is a little simpler.
91
The naive RPS
x = x0 (t) + ǫx1 (t) + · · · (8.29)
leads to
ẍ0 + x0 = 0 , ⇒ x0 = cos t , (8.30)
and at next order
The x1 -oscillator problem is resonantly forced and the solution will grow secularly, with x1 ∝ t sin t.
Thus the RPS fails once t ∼ ǫ−1 .
Two-timing
Instead of an RPS we use the two-time expansion
To prevent the secular growth of x1 we must remove the resonant terms, e±it on the right of (8.39) —
this prescription determines the evolution of the slow time:
Polar coordinates
To solve (8.40) it is best to transform to polar coordinates
92
Qu a d rati c osci l l ator p h ase p l an e, ǫ = 1
2
1.5
0.5
0
u
−0.5
−1
−1.5
−2
−3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
x
The energy of this nonlinear oscillator is constant and thus r is constant, r(s) = r0 . The phase θ(s)
therefore evolves as θ = θ0 + 3r02 s/2.
The reconstituted solution is
x = r0 exp i 1 + 23 ǫr02 t + iθ0 + c.c. + ord(ǫ) . (8.44)
ν = 1 + 23 ǫr02 , (8.47)
depends on the amplitude r0 and the sign of ǫ. If the spring is stiff (i.e., k3 > 0) then ǫ is positive and
bigger oscillations have higher frequency.
Exercise: Now investigate nonlinear damping
3
d2 x dx
+ǫ +x = 0. (8.48)
dt2 dt
93
and the curves of constant energy in the phase plane are shown in Figure 8.2.
Following our experience with the Duffing oscillator we try the two-time expansion
2
(∂t + ǫ∂s ) (x0 (s, t) + ǫx1 (s, t) + · · · ) + (x0 (s, t) + ǫx1 (s, t) + · · · )
+ ǫ (x0 (s, t) + ǫx1 (s, t) + · · · )2 = 0 . (8.51)
Elimination of the resonant terms e±it requires simply As = 0, and then the solution of the remaining
equation is
x1 = 31 A2 e2it − 2|A|2 + 31 A∗2 e−2it . (8.54)
This is why the quadratic oscillator is not used as an introductory example: there is no secular forcing
at order ǫ.
To see the effects of nonlinearity in the quadratic oscillator, we must press on to higher orders, and
use a slower slow time:
s = ǫ2 t . (8.55)
Thus we revise (8.51) to
2
∂t + ǫ2 ∂s (x0 (s, t) + ǫx1 (s, t) + · · · ) + (x0 (s, t) + ǫx1 (s, t) + · · · )
|{z}
NB
The solutions at the first two orders are the same as (8.52) and (8.54). At order ǫ2 we have
94
In these variables, ν → 1 and α → 1 in the barred equations. Thus, the non-dimensional equation of
motion is
ẍ + e−x 1 − e−x = 0 . (8.63)
If we’re interested in small oscillations around the minimum of the potential at x = 0, then the small
parameter is supplied by an initial condition such as
x(0) = ǫ , and ẋ(0) = 0 . (8.64)
We rescale with
x = ǫX , (8.65)
so that the equation is
ǫẌ + e−ǫX 1 − e−ǫX = 0 , (8.66)
or
3 7
Ẍ + X − ǫ X 2 + ǫ2 X 3 = ord ǫ3 . (8.67)
2 6
The multiple time scale expansion is now
X = X0 (s, t) + ǫX1 (s, t) + ǫ2 X2 (s, t) + · · · (8.68)
2
with slow time s = ǫ t.
The main point of this example is that it is necessary to proceed to order ǫ2 , and therefore to retain the
term 7ǫ2 X 3 /6, to obtain the amplitude equation. One finds
iAs = (8.69)
95
Exercise: many of our examples have time reversal symmetry i.e., the equation is invariant under t → −t. For
example, the nonlinear oscillator (with no damping) is invariant under t → −t. Show that this implies
that p and q in (8.70) must be pure imaginary.
Can any of these four frequencies equal ω and resonantly force x1 ? Yes:
ω = −ω ± σ ⇒ ω = ± 12 σ . (8.83)
Taking ω = 21 σ and eliminating the resonant terms we obtain the amplitude equation
implying that
σ 2 Ass − 41 A = 0 (8.85)
Thus A will grow exponentially ∼ es/σ2 = eǫt/2σ . This is parametric subharmonic instability: the natural
frequency of the oscillator, ω is one-half is a subharmonic of the forcing frequency σ.
Example: What happens if ω is not exactly equal to one half?
We investigate this by introducing a slight de-tuning:
d2 x 1
+ 4
+ ǫβ + ǫ cos t̄ x = 0 . (8.86)
dt̄2
q
1
Above we have non-dimensionalized time via t̄ = σt. The natural frequency is now 4
+ ǫβ. Proceeding
as before, we find the amplitude equation
As = iβA + 21 iA∗ , ⇒ Ass + β 2 − 14 A = 0 . (8.87)
1
If |β| ≥ 2
then the de-tuning quenches the parametric subharmonic instability.
96
8.6 The resonantly forced Duffing oscillator
The linear oscillator
First consider the forced linear oscillator
f2 1
|X|2 = . (8.91)
4 (ω 2 − σ 2 )2 + µ2 σ 2
We view |X|2 as a function of the forcing frequency σ and notice there is a maximum at σ = ω i.e.,
when the oscillator is resonantly forced. The maximum response, namely
f
max |X| = , (8.92)
∀σ 2µσ
is limited by the damping µ. In the neighbourhood of this peak, where ω ≈ σ, the amplitude in (8.91)
can approximated by the Lorentzian
f2 1
|X|2 ≈ . (8.93)
4σ 4(ω − σ)2 + µ2
2
We’re interested in the weakly damped and nearly resonant problem. That is µ/ω is small and σ is close
to ω. Inspired by the linear solution we define non-dimensional variables
d d
t̄ = σt , and therefore =σ , (8.95)
dt dt̄
and the amplitude scaling
f
x= x̄ . (8.96)
µσ
(Note particularly the definition of the non-dimensional displacement x̄ in (8.96). Naively we might
have balanced the restoring force ω 2 x against the forcing and introduced the non-dimensional displace-
ment
2
def ω x µ
x̂ = = x̄ . (8.97)
f σ
This is not the most convenient scaling for analysis of the near-resonant excitation of a weakly damped
oscillator. As an exercise you can try to repeat the following calculations using this alternative scaling
— you’ll encounter a problem right at leading order.)
97
γ = 10 γ=5 γ=0
0.25
0.2
amplitude |A|2
0.15
0.1
0.05
Notice how we have used the exact solution of the linear problem to make a non-obvious definition
of the non-dimensional amplitude in (8.96). Even in the linear case — η = 0 in (8.94) — one might not
guess that the forcing should be scaled so that it appears at order ǫ in (8.101). In (8.101) we can now
take the distinguished limit ǫ → 0 with β and γ fixed and use two-timing to understand the different
effects of nonlinearity and de-tuning on a resonantly forced oscillator.
Exercise: Suppose one naively balances the restoring force ω 2 x against the forcing f cos σt in (8.94) and there-
fore introduces the non-dimensional displacement
def ω2 ω2
x̂ = x= x̄ . (8.102)
f µσ
Find the x̂-version of (8.101) and explain why it is not suitable for the two time expansion.
98
with slow time s = ǫt. The leading-order balance is
∂t2 + 1 x0 = 0 . (8.104)
Note that because of our amplitude scaling in (8.96) the forcing does not appear at this order. The
familiar leading order solution is therefore
At order ǫ1 we have
∂t2 + 1 x1 + 2x0st + x0t + βx0 + γx30 = 12 eit + 21 e−it . (8.106)
Eliminating the resonant terms we obtain the amplitude equation
Notice that the scaled problem (8.101) has three non-dimensional parameters, ǫ, β and γ. But in
the amplitude equation (8.107) only β and γ appear. (Of course ǫ is hidden in the definition of the
slow time s.) These perturbation expansions are called reductive because they reduce the number of
non-dimensional parameters by taking a distinguished limit.
Figure 8.4 is constructed by specifying |A|2 and then calculating β from (8.109). There are “multiple
solutions” i.e., for the same detuning β there as many as three solutions for |B|2 . The middle branch
is unstable — the system ends up on either the lower or upper branch, depending on initial conditions.
Figure 8.4 illustrates the two different attracting solutions.
Example: Show that the multiple equilibria found in the numerical solution in figure 8.4 agree with the pre-
dictons of (8.108).
We have to bite the bullet and solve the cubic equation
Q3 + · · · (8.110)
def
where Q = |B|2 .
99
8
6
E ( t)
4
0
0 50 100 150 200 250 300
t
Figure 8.4: Energy E = (ẋ2 + ω 2 x2 )/2 + βx4 /4 as a function of time for five ode45 solutions of the
forced Duffing equation (8.94) differing only in initial conditions. There is a high energy attractor that
collects two of the solutions, and a low energy attractor that gets the other three solutions. The matlab
code is below. Note how the differential equation is defined in the nested function oscill so that the
parameters om, mu defined in the main function ForcedDuffing are passed.
function ForcedDuffing
% Multiple solutions of the forced Duffing equation
% Slightly different initial conditions fall on different limit cycles
tspan = [0 300]; om =1; mu =0.05; beta = 0.1; f = 0.25;
sig = 1.2*om; yinit = [0 1 1.0188 1.0189 2];
for n=1:1:length(yinit)
yZero=[yinit(n) 0];
[t,y] = ode45(@oscill,tspan,yZero);
%Use the energy E as an index of amplitude
E = 0.5*( om*om* y(:,1).^2 + 0.5*beta*y(:,1).^4 + y(:,2).^2 );
subplot(2,1,1) plot(t,E(:))
xlabel(’$t$’,’interpreter’,’latex’,’fontsize’,16)
ylabel(’$E(t)$’,’interpreter’,’latex’,’fontsize’,16)
hold on
end
%------------- nested function --------------------%
function dydt = oscill(t,y)
dydt = zeros(2,1);
dydt(1) = y(2);
dydt(2) = - mu*y(2) - om^2*y(1) - beta*y(1)^3 + f*cos( sig*t );
end
end
100
8.7 Problems
Problem 8.1. In an early lecture we compared the exact solution of the initial value problem
with an approximation based on a regular perturbation expansion — see the discussion surrounding
(4.68). Redo this problem with a two-time expansion. Compare your answer with the exact solution
and explain the limitations of the two-time expansion.
(i) Show that a RPS fails once t ∼ ǫ−1 . (ii) Use the two-timing method to obtain the solution on the
long time scale.
d2 u du
+ u = 2 + 2ǫu2 , with ICs u(0) = (0) = 0 . (8.113)
dt2 dt
(i) Supposing that ǫ ≪ 1, use the method of multiple time scales (s = ǫt) to obtain an approximate
solution valid on times of order ǫ−1 . (ii) Consider
d2 v dv
+v = u, with ICs v(0) = (0) = 0 , (8.114)
dt2 dt
where u(t, ǫ) on the right is the solution from part (i). Find a leading-order approximation to v(t, ǫ),
valid on the long time scale t ∼ ǫ−1 .
d2 w dw
+ w = 2 cos(ǫt) + 2ǫw2 , with ICs w(0) = (0) = 0 . (8.115)
dt2 dt
Supposing that ǫ ≪ 1, use the method of multiple time scales (s = ǫt) to obtain an approximate solution
valid on times of order ǫ−1 .
d2 x 2 dx
+ x = eǫ t + ǫe−ǫt x2 , with ICs x(0) = (0) = 0 , (8.116)
dt2 dt
valid on the time scale t ∼ ǫ−1 ≪ ǫ−2 .
Problem 8.6. Consider an oscillator parametrically forced at its natural frequency. The model is:
d2 x
+ (1 + ǫ cos t) x = 0 ; (8.117)
dt2
show that x(t) will grow exponentially, and calculate the growth-rate. (Following the discussion of
parametric instability in the lecture, you won’t find resonance at order ǫ1 . So go to higher order.) Study
the effect of slightly detuning the frequency: 1 → 1 + ǫ? β. How large must β be to prevent exponential
growth?
101
Problem 8.7. (a) Use multiple scales to derive a set of amplitude equations for the two coupled, linear
oscillators:
ẍ + 2ǫαẋ + (1 + kǫ)x = 2ǫµ(x − y) ,
ÿ + 2ǫβ ẏ + (1 − kǫ)y = 2ǫµ(y − x) . (8.118)
(b) Consider the special case α = β = k = 0. Solve both the amplitude equations and the exact equation
with the initial condition x(0) = 1, y(0) = ẏ(0) = ẋ(0) = 0. Show that both methods give
x(t) ≈ cos [(1 − ǫµ)t] cos(ǫµt) . (8.119)
Problem 8.8. Consider two nonlinearly coupled oscillators:
ẍ + 4x = ǫy 2 , ÿ + y = −ǫαxy , (8.120)
where ǫ ≪ 1. (a) Show that the nonlinearly coupled oscillators in (1) have an energy conservation law.
(b) The multiple scale method begins with
x(t) = A(s)e2it + c.c. , y(t) = B(s)eit + c.c. , (8.121)
def
where s = ǫt is the “slow time” and A and B are “amplitudes”. Find the coupled evolution equations for
A and B using the method of multiple scales. (c) Show that the amplitude equations have a conservation
law
|B|2 − 2α|A|2 = E , (8.122)
and use this result to show that
4Ass − αEA − 2α2 |A|2 A = 0 . (8.123)
Obtain the analogous equation for B(s). (d) Describe the solutions of (8.123) in qualitative terms. Does
the sign of α have a qualitative impact on the solution?
Problem 8.9. The equation of motion of a pendulum with length ℓ in a gravitational field g is
def g
θ̈ + ω 2 sin θ = 0 , with ω2 = . (8.124)
ℓ
Suppose that the maximum displacement is θmax = φ. (a) Show that the period P of the oscillation is
√ Z φ dθ
ωP = 2 2 √ .
0 cos θ − cos φ
(b) Suppose that φ ≪ 1. By approximating the integral above, obtain the coefficient of φ2 in the
expansion:
ωP = 2π 1+?φ2 + O(φ3 )
(c) Check this result by re-derving it via a multiple scale expansion applied to (8.124). (d) A grandfather
clock swings to a maximum angle φ = 5◦ from the vertical. How many seconds does the clock lose or
gain each day if the clock is adjusted to keep perfect time when the swing is φ = 2◦ ?
Problem 8.10. (H) Find a leading order approximation to the general solution x(t, ǫ) and y(t, ǫ) of the
system
d2 x dx dy
+ 2ǫy +x=0 and = 21 ǫ ln x2 , (8.125)
dt2 dt dt
which is valid for t = ord(ǫ−1 ). You can quote the result
Z 2π
1
ln cos2 θ dθ = − ln 4 . (8.126)
2π 0
Problem 8.11. (H) Find the leading order approximation, valid for times of order ǫ−1 , to the solution
x(t, ǫ) and y(t, ǫ) of the system
ẍ + ǫy ẋ + x = y 2 , and ẏ = ǫ(1 + x − y − y 2 ) , (8.127)
with initial conditions x = 1, ẋ = 0 and y = 0.
102
Lecture 9
This average is a low-pass filter: hi removes variability with frequencies greater than ω.
The numerical solution n(t) exhibits two time scales: fast wiggles with small amplitude superposed
on a slower evolution that looks like a Lotka-Volterra solution. Although the carrying capacity is varying
rapidly, the population n(t) hardly reacts to these fast, large-amplitude fluctuations. e.g., clouds blowing
overhead lead to modulations in sunlight on the scale of minutes. But plants don’t die when the sun is
momentarily obscured by a cloud.
It is important that the fast wiggles in n(t) have small amplitude so that
hni ≈ n , (9.4)
and
dn dhni
≈ . (9.5)
dt dt
Thus averaging (9.1)
dhni n
= n 1− . (9.6)
dt 1 + κ cos ωt
103
0.8
0.6
N (t)
The average of the reciprocal carrying capacity is calculated by invoking a favourite textbook example
of the residue theorem Z 2π
1 dτ 1
=√ . (9.8)
2π 0 1 + κ cos τ 1 − κ2
Putting it all together, (9.6) becomes
dhni hni
≈ hni 1 − √ . (9.9)
dt 1 − κ2
Thus, the long time limit is p
lim hni → 1 − κ2 . (9.10)
t→∞
Method 2: two-timing
Define a fast time
t def
,
τ = ωt = (9.11)
ǫ
and assume that the solution has the multiple time scale expansion
g = hni . (9.15)
This definition has the implication that g(t) does not satisfy the initial condition on n(t) i.e., g(0) 6= n(0).
(See the discussion of the “guiding center” in section 9.3.)
At next order
dg g
ǫ1 : ∂τ n1 + = g 1− . (9.16)
dt 1 + κ cos τ
104
Using (9.8), we average the equation above over the fast time scale to obtain
dg g
=g 1− √ . (9.17)
dt 1 − κ2
This confirms the earlier heuristic average.
To determine the fluctuations about this average g(t) we can subtract (9.17) from (9.16) to obtain
1 1
∂τ n1 = √ − g2 . (9.18)
1 − κ2 1 + κ cos τ
To perform the integration and obtain n1 (τ ) one can invoke the Fourier series
∞ √ !n
1 1 2 X 1 − κ2 − 1
√ − = −√ cos nτ . (9.19)
1 − κ2 1 + κ cos τ 1 − κ2 n=1 κ
This may be more than we need to know. The main point is that the fast fluctuations about the mean
solution g(t) scale with ω −1 i.e., faster fluctuations in the carrying capacity induce smaller variations in
population.
With enough assumptions regarding the smoothness of f , there exists an ǫ0 > 0 and a function u(x, t, ǫ)
such that if |ǫ| < ǫ0 then the change of variables
x = y + ǫu(x, t, ǫ) , (9.22)
105
10
6
x( t )
4
0
0 10 20 30 40 50 60
t
The position of the particle over many periods follows by iteration of this map. That is
We don’t have to worry about secular errors because F is determined by solving the differential period
over a finite time 0 < t < 2π. The second period is just the same as the first.
106
Method 2: two-timing
To analyze this problem with multiple scale theory we introduce
def
s = ǫ2 t . (9.34)
Why ǫ2 above? Because we tried ǫ1 and found that there were no secular terms on this time scale.
Exercise: Assume that s = ǫt and repeat the following calculation. Does it work?
With the slow time s, the dressed-up problem is
ǫ2 xs + xt = ǫ cos(x − t) . (9.35)
We now go to town with the RPS:
x = x0 (s, t) + ǫx1 (s, t) + ǫ2 x2 (s, t) + · · · (9.36)
Notice that
cos(x − t) = cos(x0 − t)− sin(x0 − t) ǫx1 (s, t) + ǫ2 x2 (s, t) + · · ·
2
− cos(x0 − t) ǫx1 (s, t) + ǫ2 x2 (s, t) + · · · + · · · (9.37)
We cannot assume that x0 is smaller than one, so must keep cos(x0 − t) and sin(x0 − t). We are assuming
the higher order xn ’s are bounded, and since ǫ ≪ 1 we can expand the sinusoids as above.
At leading order, ǫ0 :
x0t = 0 , ⇒ x0 = f (s) . (9.38)
The function f (s) is the slow drift. At next order, ǫ1 :
x1t = cos(f − t) ⇒ x1 = sin f − sin(f − t) . (9.39)
We determined the constant of integration above so that x1 is zero initially i.e., we are saying that f (0)
is equal to the initial position of the particle.
At ǫ2
fs + x2t = − sin(f − t) [sin f − sin(f − t)] . (9.40)
| {z }
=x1
Averaging over the fast time t we obtain
1
fs = sin2 (f − t) = . (9.41)
2
Thus the average position of the particle is
s ǫ2
f= + a = t + a. (9.42)
2 2
The prediction is that the averaged velocity in figure 9.2 is (0.3)2 /2 = 0.045. You can check this by
noting that the final time is 20π.
Subtracting (9.41) from (9.40) we have the remaining oscillatory terms:
x2t = − sin(f − t) sin f − sin(2f − 2t) . (9.43)
Integrating and applying the initial condition we have
1 1
x2 = − cos(f − t) sin f + 4 cos(2f − 2t) + cos f sin f − 4 cos 2f . (9.44)
This is bounded and all is well.
The solution we’ve constructed consists of a slow drift and a rapid oscillation about this slowly
evolving mean position. Note however that the mean position of the particle is
hxi = f + ǫ sin f +ǫ2 12 sin 2f − 14 cos 2f +ord(ǫ2 ) (9.45)
|{z } | {z }
hx1 i hx2 i
In other words, the mean position is not the same as the leading-order term.
107
Method 3: two-timing and the “guiding center”
In this variant we use the two-timing but insist that the leading-order term is the mean position of the
particle. This means that the leading-order solution no longer satisfies the initial condition, and that
constants of integration at higher orders are determined by insisting that
∀n ≥ 1 : hxn i = 0 . (9.46)
OK, let’s do it, starting with the scaled two-time equation in (9.35). The leading order is
The function g(s) is the “guiding center” — it’s different from f (s) in the previous method.
At next order, ǫ1 :
x1t = cos(g − t) ⇒ x1 = − sin(g − t) . (9.48)
This is not the same as the first-order term in (9.39): in (9.48) we have determined the constant of
integration so that hx1 i = 0.
At order ǫ2 we have
gs + x2t = sin2 (g − t) = 12 − 21 cos(2g − 2t) . (9.49)
The average of (9.49) is the motion of the guiding center:
1 ǫ2
gs = 2 ⇒ g= t + g(0) . (9.50)
2
The oscillatory part of the solution, with zero time average, is
1
x2 = 4 sin(2g − 2t) . (9.51)
108
where
def ω def aων
ǫ = , and α = . (9.57)
ν g
To investigate the stability of ϕ = π we introduce θ = π − ϕ so that
d 1
= ∂τ + ∂t , (9.60)
dt ǫ
and use the two-time expansion
θ = θ0 (t, τ ) + ǫθ1 (t, τ ) + · · · (9.61)
The expanded equation of motion is
∂τ + 2ǫ∂t ∂τ + ǫ2 ∂t2 θ0 + ǫθ1 + ǫ2 θ2 − ǫ2 θ0 − ǫα cos τ (θ0 + ǫθ1 ) = ord ǫ3 . (9.62)
At order ǫ0 we have
∂τ2 θ0 = 0 , ⇒ θ0 = S(t) . (9.63)
Above, at leading order, the leading order displacement is a function of only the slow time t. At next
order ǫ1 :
∂τ2 θ1 + 2 ∂t ∂τ S −αS cos τ = 0 , ⇒ θ1 = −αS cos τ . (9.64)
| {z }
=0
2
At order ǫ :
∂τ2 θ2 + 2 ∂t ∂τ θ1 +∂t2 S − S − α cos τ θ1 = 0 . (9.65)
| {z } | {z }
αSt sin τ −α2 S cos2 τ
9.5 Problems
Problem 9.1. Consider the nonlinear inverted pendulum
d2 θ α t
2
− 1 + cos sin θ = 0 . (9.67)
dt ǫ ǫ
Apply the two-time method to this nonlinear equation and find the effective potential resulting from
averaging the rapid oscillations. Calculate the phase-plane orbits in the effective potential.
109
1.5
0.5
0
y
Problem 9.3. As a generalization of problem 9.2, investigate Stokes drift in the two-dimensional in-
compressible velocity field with streamfunction
and velocity
dx dy
= −ψy , = ψx . (9.70)
dt dt
Obtain an expression for the streamfunction of the Stokes flow.
110
4
x ( t) and ẋ( t)
2
−2
−4
−40 −30 −20 −10 0 10 20 30 40
t
A ( t ) ,E ( t ) and ω ( t )
5
ǫ = 0.25
4 Figure 9.4: Solution of (9.71)
3
and (9.72) with ode45. In
the lower panel the red dashed
2
curve is ω(t), the black curve
1 is the energy E(t) and the al-
0 most constant action is the blue
−40 −30 −20 −10 0 10 20 30 40
t dashed curve.
ẍ + ω 2 x = 0 . (9.71)
def
Use the method of averaging to show that the action A = E/ω is approximately constant. Test this
result with ode45 using the frequency
and the initial condition x(−40) = 0 and ẋ(−40) = 1 e.g., see Figure 9.4. Use several values of ǫ to test
action conservation e.g., try to break the constant-action approximation with large ǫ.
111
2
-1
-2
ǫ = 0.05
0 20 40 60 80 100 120
t
Figure 9.5: Numerical solution of (9.73).
d2 x dx dy
2
+ 2ǫy +x = 0, = 12 ǫx2 , (9.73)
dt dt dt
begins with
x = A(s)eit + A∗ (s)e−it + ǫx1 (t, s) + · · · , y = B(s) + ǫy1 (t, s) + · · · (9.74)
where s = ǫt is the slow time. (i) Find coupled evolution equations for A(s) and B(s). (ii) Figure 9.5
shows a numercial solution of (9.73) with the initial conditions
dx
x(0) = 2 , (0) = 0 , y(0) = 0 . (9.75)
dt
Explain why limt→∞ y = 1.
112
Lecture 10
Eigenvalue problems
where p(x), q(x) and r(x) are real functions. The associated boundary value problem is posed on
a < x < b with BCs which we write as
First we prove that λ ≥ 0. The differential equation is an Euler equation which can be solved with φ = xν .
Thus we find that q
ν2 − ν + λ = 0 , or ν = 21 ± 14 − λ . (10.7)
We have to consider two cases: (a) λ < 1/4 and (b) λ > 1/4. In case (a) we have two real ν’s, but there
is no way to combine these into a solution that satisfies the boundary conditions. So we turn to case (b),
for which q
λ = 12 ± i λ − 41 (10.8)
113
2
1
φ n( x )
and q q
xν = x1/2 cos λ− 1
4
ln x ± i sin λ− 1
4
ln x (10.9)
We can linearly combine the two solutions above to obtain a solution satisfying the BC at x = 1
q
φ = x1/2 sin λ − 41 ln x (10.10)
It is certainly reassuring to know that λ1/3 in the equation above is a real positive number. The construc-
tion above satisfies both the differential equation and the boundary condition at x = 0. The boundary
condition at x = ℓ produces the eigenrelation
Ai (−η) Bi (−η)
= , (10.16)
Ai(0) Bi(0)
def
where η = ℓλ1/3 . If you look at the graphs of the Airy and Bairy function in the upper panel of Figure
10.2 then you can anticipate that this eigenrelation has an infinite number of solutions. The first five are
and the lower panel of Figure 10.2 shows the corresponding eigenfunctions. Again, notice that the n’th
eigenfunction has n − 1 interior zeros.
Lφ = λwφ , (10.18)
114
2
Ai r y f u n c t i on s
1
−1
−2
0 1 2 3 4 5 6 7 8 9 10
ℓ/λ 1/3
2
Figure 10.2: The upper panel shows
1
the two Airy functions on the right
φ n ( x)
Moreover limn→∞ λn = ∞.
2. The zeroth eigenfunction (also known as the gravest mode, or the ground state) has no interior
zeroes. Eigenfunction φn+1 (x) has one more interior zero than φn (x).
3. Eigenfunctions with different eigenvalues are orthogonal with respect to the weight function w:
Z b
φm (x)φn (x)w(x) dx = ξn δmn . (10.21)
a
with Z b
fn = ξn−1 φn (x)f (x)w(x) dx . (10.23)
a
1
Square integrable means with respect to the weight function. That is
Z b
f 2 wdx < ∞ .
a
115
5. Considering the truncated sum
N
X
fˆN (x) = fn φn (x) , (10.24)
n=1
as an approximation to the target function f (x), we define the error in fˆN (x) as
Z " N
#2
b X
def
e(f1 , f2 , · · · fN ) = f− fn φn w dx . (10.25)
a n=1
If we adjust f1 through fN to minimize the error e then we recover the expression for fn in (10.23).
Moreover
lim e = 0 . (10.26)
N →∞
and therefore Z Z
b b b
uLv dx − vLu dx = p(vu′ − v ′ u) a . (10.29)
a a
ψt = ψxx + 1 , (10.30)
For obvious reasons there are no steady solutions to this partial differential equation: the BVP
116
has no solutions. To see this mathematically, integrate the differential equation in (10.32) from x = 0
to x = 1:
1
− [ψx ]0 = 1 . (10.33)
| {z }
=0
The contradiction tells us not to bother looking for a steady solution to (10.30). Instead, we should
solve the diffusion equation (10.30) with the ansatz ψ = t + ψ̂(x, t), where ψ̂ is required to satisfy the
initial conditions.
Exercise: show that limt→∞ ψ̂ = 0 .
In other examples, the non-existence of solutions is less obvious. Consider the example
If we multiply the differential equation by sin x and integrate from x = 0 to π then, with some IP, we
quickly obtain Z π Z π
′′
sin x (y + y) dx = sin x ln x dx = 0.641182 . (10.35)
|0 {z } 0
=0
Again, the contradiction tells us that there is no point in looking for a solution.
We can write (10.34) using fancy operator notation as
1 def d2
Ly = ln , where L = − − 1. (10.36)
x dx2
Now let’s do the calculation using some Sturm-Liouville machinery: Multiply by sin x, integrate over the
interval, use the identity (10.28) and use the fact that sin x and y are zero on both boundaries. Thus
again we obtain the contradiction
Z Z π
y |L sin
{z }x dx = sin x ln x dx (10.37)
0
=0
It’s the same calculation as before. You should get used to seeing that
Z Z
uLvdx = vLudx . (10.38)
If you use the identity above be sure to check that the boundary conditions imply that all the terms
falling outside the integral are zero! Go back to (10.28) and see what’s required for that to happen.....
More generally we might confront
where f (x) is some function. If we multiply the differential equation by sin x and integrate from x = 0
to π we have Z π
sin xf (x) dx = 0 . (10.40)
0
In order for a solution of (10.39) to exist, the solvability condition in (10.40) must be satisfied. And
if (10.40) is satisfied then (10.39) has an infinity of solutions: if y(x) is a solution of (10.39) then
y(x) + a sin x is also a solution for every value of the constant a.
To understand what’s going on here, we turn to the eigenfunction expansion method.
117
10.4 The eigenfunction expansion method
Suppose that somehow we have solved the eigenvalue problem
Lφ = λwφ , (10.41)
with BCs φn (a) = φn (b) = 0. This means we possess the full spectrum λn and φn (x) with n = 0, 1 · · ·
The solution of the boundary value problem
Ly = f , (10.42)
Multiply (10.42) by φm (x) and integrate over the interval. Using the identity in (10.28), and the
boundary conditions, the left hand side of (10.42) produces
Z b Z b
φm Ly dx = yLφm dx ,
a a
Z b
= λm yφm w dx ,
a
= λm ξm ym . (10.44)
Thus Rb
a φm f dx
ym = (10.45)
λm ξm
This is OK provided that all the eigenvalues are non-zero. If there is a zero eigenvalue then this problem
has no solution.
Example: Solve
y ′′ = ln x (10.46)
with y(0) = y(π) = 0. In this example the weight function is w(x) = 1 and
d2
L=− , φn = sin nx , λn = n2 , (10.47)
dx2
with n = 1, 2 · · · There are no zero modes, and therefore there is no problem with existence of the
solution. The expansion coefficients are
Z π
2
yn = − 2 sin nx ln x dx . (10.48)
πn 0
Evaluating the integral in (10.48) numerically, we find that the first six terms in the series solution are
118
0.1
0
−0.1
y( x )
−0.2
−0.3
−0.4
−0.5
0 0.5 1 1.5 2 2.5 3
x
Figure 10.3: Comparison of the exact solution (10.50) (the solid curve) with truncations of the
series (10.49). The two-term truncation is the green dashed curve, the four-term truncation is
the red dash-dot curve and the six term truncation is the dotted cyan curve.
119
Exercise: Show that the BVP
y ′′ = ln x , with BCs y ′ (0) = y ′ (π) = 0 , (10.61)
has no solution. Determine a so that the related BVP
y ′′ = ln x + a , with BCs y ′ (0) = y ′ (π) = 0 , (10.62)
has a solution. Find the most general solution of this problem by direct integration, and by the eigen-
function expansion method.
We compute the change in the eigenfrequencies induced by the small non-uniformity in density.
Using nondimensional variables, the eigenproblem is
Although it is not strictly necessary, it helps to normalize the perturbed eigenfunction so that
Z π
ψ 2 dx = 1 . (10.67)
0
Lψ0 = 0 , (10.69)
Lψ1 = (λ1 + λ0 b) ψ0 , (10.70)
Lψ2 = (λ2 + λ1 b) ψ0 + (λ1 + λ0 b) ψ1 . (10.71)
Above,
def d2
L = − − λ0 , (10.72)
dx2 |{z}
=m2
120
with f (0) = f (π) = 0. For a solution to exist, the right hand side must be orthogonal to ψ0 = sm . Thus
to ensure that (10.70) and (10.71) have solutions, one requires
Z
2
λ1 = −m bs2m dx , (10.74)
Z Z
λ2 = −λ1 bs2m dx − m2 bsm ψ1 dx , (10.75)
and so on. (All integrals are from 0 to π.) Notice how the expansion of the eigenvalue is obtained by
enforcing the solvability condition order by order.
The first-order shift in the m’th eigenvalue is given by (10.74). If the density in the middle of the
string is increased then the eigenfrequency is decreased.
Exercise: At one point in the calculation above (10.68) was used to simplify an expression. Where was that?
where the sum over n above does not include the singular term, n = m, and
Z π
def
Jmn = bsm sn dx . (10.78)
0
Above f (x, t) is an externally imposed force (in addition to gravity g). If the string is stretched between
two supports at x = 0 and ℓ then the BCs are
121
where the static solution ηs (x) is determined by solving
ρg
ηsxx = (10.84)
T
with ηs = 0 at the boundaries.
Exercise: Show that if ρ is constant
ρg
ηs (x) = − x(ℓ − x) . (10.85)
2T
Thus the disturbance, u(x, t), satisfies
T φxx + ω 2 ρφ = 0 , (10.88)
After we solve (10.88) we possess a set of complete orthogonal functions, φn (x) each with a corre-
sponding eigenfrequency. The orthogonality condition is
Z ℓ
φp φq ρ dx = βp δpq , (10.90)
0
Evolution equations for the modal amplitudes follow via projection of the equation (10.86) onto the
modes i.e., multiply (10.86) by φn (x) and integrate from x = 0 to x = ℓ. After some integration by parts
one finds Z ℓ
d2 ûn 2 −1
+ ωn ûn = βn φn (x)f (x, t)dx . (10.93)
dt 0
If we also represent the forcing f as
∞
X Z ℓ
f (x, t) = ρ(x) fˆ(t)φm (x) , with βn fˆn (t) = φn (x)f (x, t) dx , (10.94)
m=0 0
122
then we have
d2 ûn
+ ωn2 ûn = fˆn . (10.95)
dt2
Each modal amplitude, ûn (t), satisfies a forced harmonic oscillator equation.
We declare victory after reducing the partial differential equation (10.86) to a big set of uncoupled
ordinary differential equations in (10.95). This victory is contingent on solving the eigenproblem (10.88)
and understanding basic properties of SL problems such as the orthogonality condition in (10.90)
Example: In some problems the tension T is non-uniform and the wave equation is then
ρutt − (T ux )x = f . (10.96)
A nice example is a dangling chain of length ℓ suspended from the point x = 0, with x positive downwards.
The tension is then Z ℓ
T (x) = ρg ρ(x′ ) dx′ (10.97)
x
The BCs η(0) = 0 and ηx (ℓ) = 0.
10.7 Problems
Problem 10.1. (i) Transform
a(x)y ′′ + b(x)y ′ + c(x)y + d(x)Ey(x) = 0 , (10.98)
with boundary conditions y(α) = y(β) = 0, into the Sturm-Liouville form
′
[p(x)y ′ ] + [q(x) + Ew(x)] y = 0 . (10.99)
Hint: multiply by an integrating factor I(x); determine I(x) by matching up terms. Your answer should
include clear expressions for [p, q, w] in terms of [a, b, c, d]. (ii) Write Bessel’s equation
y ′′ + x−1 y ′ + E − ν 2 x−2 y = 0 (10.100)
in Sturm-Liouville form. (iii) Prove that the eigenfunctions yn (x) associated with (10.99) satisfy
Z β
(En − Em ) yn (x)ym (x)w(x) dx = 0 . (10.101)
α
Thus if Em 6= En then the eigenfunctions are orthogonal with respect to the weight function r(x).
Problem 10.2. Consider the eigenvalue problem
y ′′ = −λy , with BCs: y(0) = 0 , y ′ (1) = y(1) . (10.102)
(i) Prove that all the eigenvalues are real. (ii) Find the transcendental equation whose solutions de-
termine the eigenvalues λn . (iii) Find an explicit expression for the smallest eigenvalue λ0 and the
associated eigenfunction y0 (x). (iv) Show that the eigenfunctions are orthogonal with respect to an
appropriately defined inner product. (v) Attempt to solve the inhomogeneous boundary value problem
y ′′ = a(x), with BCs: y(0) = 0 , y ′ (1) = y(1) , (10.103)
via an expansion using the eigenmodes. Show that this expansion fails because the problem has no
solution for an arbitrary a(x). (iv) Find the solvability condition on a(x) which ensures that the problem
(10.103) does have a solution, and then obtain the solution using a modal expansion.
Problem 10.3. Consider the eigenproblem
− φ′′ = λx−2+ǫ φ , with BCs φ(1) = φ(ℓ) = 0 . (10.104)
In the lecture we solved the ǫ = 0 problem and showed that the smallest eigenvalue is
π
λ1 = 41 + . (10.105)
ln ℓ
Find the change in λ1 induced by the perturbation ǫ ≪ 1.
123
Problem 10.4. There is a special value of α for which the boundary value problem
has a solution. Find the special value of α and in that case solve the boundary value problem by: (i)
expansion using a set of eigenfunctions; (ii) explicit solution using a combination of homogeneous and
particular solutions. (iii) Use matlab to compare the explicit solution with a three-term truncation of
the series solution.
where a(x) > 0 for 0 ≤ x ≤ 1. (i) Verify that y(x) = 1 and λ = 0 is an eigensolution. (ii) Show
that λ = 0 is the smallest eigenvalue. (iii) Now consider the perturbed problem in which the boundary
condition at x = 1 is changed to
ǫy(1) + y ′ (1) = 0 ,
where ǫ is a positive real number. With 0 < ǫ ≪ 1, use perturbation theory to determine the O(ǫ) shift
of the λ = 0 eigenvalue. (iii) Obtain the O(ǫ2 ) term in the expansion of the λ = 0 eigenvalue.
(ii) Show that λ = 0 is the smallest eigenvalue. (iii) Now consider the perturbed problem in which the
boundary condition at x = 1 is changed to
ǫy(1) + y ′ (1) = 0 ,
where ǫ is a positive real number. With 0 < ǫ ≪ 1, use perturbation theory to determine the O(ǫ) shift
of the λ = 0 eigenvalue. (iii) Obtain the O(ǫ2 ) term in the expansion of the λ = 0 eigenvalue.
has the solution λ = 1 and y = a sin x. Use perturbation theory (ǫ ≪ 1) to investigate the dependence
of the eigenvalue λ on a and ǫ.
with initial condition u(x, t) = f (x). (i) If you use separation of variables then it is easy to anticipate that
you’ll find a Sturm-Liouville eigenproblem with sinusoidal solutions. Sketch the first two eigenfunctions
before doing this algebra. Explain why you are motivated to nondimensionalize so that 0 ≤ x ≤ π/2.
(ii) With ℓ → π/2 and κ → 1, work out the Sturm-Liouville algebra and find the eigenfunctions and
eigenvalues. (iii) With f (x) = 1 find the solution as a Fourier series and use matlab to visualize the
answer.
Problem 10.9. A rod occupies 1 ≤ x ≤ 2 and the thermal conductivity depends on x so that diffusion
equation is
ut = (x2 ux )x .
The boundary and initial conditions are
124
(i) The total amount of heat in the rod is
Z 2
H(t) = u(x, t) dx .
1
Find the eigenvalue which is associated with the n’th eigenfunction. (iv) Use modal orthogonality to
find the series expansion of the initial value problem.
with a perturbation expansion in ǫ; f (x) is some O(1) function. Hint: solve the problem exactly in
the special case f (x) = 1 to infer the form of the perturbation expansion. Is this a regular or singular
problem?
find the ordinary differential equations satisfied by the amplitudes un (t). (ii) Your answer to (i) will
involve the integral Z
2 π sin nx
hn ≡ p dx ,
π 0 x(π − x)
which you probably can’t evaluate off-the-cuff. However you should deduce that hn is zero if n is even
and Z
4 π/2 sin nx
hn ≡ p dx , if n is odd.
π 0 x(π − x)
Find a leading-order n → ∞ asymptotic approximation of hn . (iii) I believe that un ∼ n−q as n → ∞.
Find q.
Problem 10.12. Find the eigenfunction expansion of f (t) = 1 − e−αx in 0 < x < π in terms of the
eigenfunctions defined by
125
Problem 10.13. Solve the eigenproblem
3+λ
(xu′ )′ + u = 0, with BCs y(1) = y(2) = 0 . (10.112)
x
Use these eigenfunctions to solve the inhomogeneous probem
3+λ
(xy ′ )′ + y = sin x with BCs y(1) = y(2) = 0 . (10.113)
x
Problem 10.14. Use an eigenfunction expansion to solve
d2 g
= δ(x − x′ ) , with BCs g(0, x′ ) = g(1, x′ ) = 0 , (10.114)
dx2
on the interval 0 < x < 1 for the Green’s function g(x, x′ ). You can also solve this problem using the
patching method. Remark: considering the inhomogeneous BVP on the interval 0 < x < 1 for y(x):
we now have two different solution methods: Green’s functions and eigenfunction expansions. The
eigenfunction solution of (10.114) is the connection between these two methods. Can you extend this to
the general SL problem
The domain is the π × π square, 0 < (x, y) < π, with the Dirichlet boundary condition u = 0. The
two-dimensional Lagrange identity for the operator ∇2 (aka L) is a well-known vector identity. Use this
to prove that the eigenfunctions are orthogonal. Use Galerkin projection and an eigenfunction expansion
to solve the inhomogeneous problem
126
Lecture 11
WKB
or equivalently Z x Z x
E 1 p F 1 p
y≈ cos q(t) dt + 1/4 sin q(t) dt . (11.3)
q 1/4 ǫ q ǫ
The constructions above are most convenient if q(x) > 0 so that the solution of (11.1) is oscillatory. But
WKB also works if q(x) < 0 and in that case the approximation is
Z x Z
A 1 p B 1 xp
y ≈ 1/4 exp |q(t)| dt + 1/4 exp − |q(t)| dt . (11.4)
|q| ǫ |q| ǫ
We have not specified the lower limits of the integrals in (11.1) through (11.4). Different choices amount
to altering the constants A, B et cetera.
The approximations in (11.2) through (11.4) fail in the neighbourhood of x∗ where q(x∗ ) = 0. The
point x∗ is called a turning point. We’ll need a different approximation in the vicinity of a turning point.
But everywhere else WKB provides a spectacular ǫ → 0 approximation.
Exercise: Check the special cases q = 1 and q = −1 and commit the WKB approximation to memory.
127
We’ve “nonlinearized” the linear equation (11.1). The advantage is that (11.6) can be solved using a
regular perturbation series
s = s0 (x) + ǫs1 (x) + ǫ2 s2 (x) + · · · (11.7)
The first four terms in this “WKB hierarchy” are
s′2
0 = q, (11.8)
′′ ′ ′
is0 − 2s0 s1 = 0 , (11.9)
is′′1 − 2s′0 s′2 − s′2
1 = 0, (11.10)
is′′2 − 2s′0 s′3 − 2s′1 s′2 = 0. (11.11)
Linearly combining the two solutions above we obtain (11.2) and (11.3). BO refer to the two term
approximation above as physical optics (PO).
ǫs′′0
→0 as ǫ → 0. (11.16)
s′0 2
Suppose that q(x) has a simple zero at x∗ i.e. q ∝ x − x∗ . Then s′0 ∝ (x − x∗ )1/2 and s′′0 ∝ (x − x∗ )−1/2 .
The condition in (11.16) is therefore
ǫ
→0 as ǫ → 0. (11.17)
(x − x∗ )3/2
So, in order to apply the PO approximation, we must ensure that x is at distance greater than ǫ2/3 from
the turning point at x∗ .
Exercise: Suppose that q ∝ (x − x∗ )m . Show that validity of PO requires that x − x∗ ≫ ǫ2/(m+2) .
In physical problems involving wave propagation through a spatially inhomogeneous medium (e.g.,
sound in the ocean) x has the dimensions of length and
√
def q
k = (11.18)
ǫ
is a spatially varying wavenumber with dimensions (length)−1 . Notice that the argument of the sinusoidal
functions in (11.3), namely Z x
k(t) dt , (11.19)
128
is dimensionless. Suppose the wavenumber k(x) changes over a length ℓ and k(x) has a typical order of
magnitude K. This means that waves have a typical wavelength 2π/K. The medium is slowly changing
if
def 1
ǫ = ≪1 (11.20)
Kℓ
i.e., if the length of the waves is much less than the scale ℓ over which medium varies. Another way to
look at this is to rewrite the condition for the validity of PO in (11.16) as
d 1
≪ 1. (11.21)
dx k
It is easy remember (11.21) because the left hand side of (11.21) is dimensionless and the inequality says
that the rate of change of the local wavelength with distance x is much less than one. We return to this
perspective on WKB in the problems.
We’ll examine the validity of the WKB approximation in much more detail below. But first we
develop some confidence in the approximation by comparing WKB solutions with numerical solutions.
129
0.3
ǫ=1
0.2
y and yW KB
0.1
-0.1
-0.2
-0.3
0 2 4 6 8 10 12 14 16 18 20
x
0.5
ǫ=2
y and yW KB
-0.5
0 2 4 6 8 10 12 14 16 18 20
x
Figure 11.1: Comparison of the WKB approximation (green dashed) in (11.28) with a matlab
integration (solid blue) of the initial value problem (11.22) and (11.23). The upper panel shows
ǫ = 1 and the lower panel ǫ = 2. We use β = 399 so that the wavenumber varies by a factor of
20 between x = 0 and ∞.
Example: Solve the differential (11.23) exactly and compare yWKB to a numerical solution of the initial value
problem.
We observe that the exact solution of
d2 w
2
+ λ2 e2z − ν 2 w = 0 , is w = J±ν (λez ) . (11.29)
dz
(For example, entry 9.1.54 on page 362 of AS.) If ν is not an integer then the ±ν in (11.29) provides a
linearly independent pair. Changing variables to x = −2z, the w equation becomes
d2 w 1 2 −x
2
+ λ e − ν2 w = 0 . (11.30)
dx 4
Comparing this with (11.23), we see that λ2 /4 = 8/ǫ2 and −ν 2 /4 = 1/ǫ2 . Thus
√
4 2
J±2i/ǫ (11.31)
ǫ ex
is a linearly independent pair of solutions to (11.23). For matlab enthusiasts this is a pyrrhic victory:
unfortunately the matlab Bessel function does not include complex orders. So instead we make the
comparison using ode45: see Figure 11.1.
130
25
20
exp(2x/ǫ)y(x)
15
10
0
0 0.5 1 1.5 2 2.5 3 3.5 4
x
√
The e-folding scale varies from 1 + β/ǫ near x = 0 to 1/ǫ as x → ∞. Using results from the Bessel
factoid collection at the end of this lecture, the exact solution is
√
I2/ǫ [ζ(x)] def 2 β
y= , where ζ(x) = x/2 , (11.34)
I2/ǫ [ζ(0)] ǫe
where s0 (x) is given in (11.25). Figure 11.2 compares the exact and approximate solutions.
There is also a simple boundary-layer type approximation:
The cosine is eliminated by the requirement that y(1) = 0. We’ve included the factor ǫ−1 because when
we take the derivative of (11.39) we have
′ A 1/8 1 4 5/4
y = x cos x − 1 + ord(1) . (11.40)
ǫ ǫ5
131
1
0.5
y(x)
0
-0.5
-1
0 5 10 15 20 25 30 35 40 45 50
x
1
0.5
0
y(x)
-0.5
-1
-1.5
-2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x
Figure 11.3: Comparison of the WKB approximation (black dashed) in (11.41) with a matlab
integration (solid blue) of the initial value problem (11.3) (shooting both ways starting at
x = 1). The upper panel shows close agreement over a large interval and the lower panel shows
failure of the WKB approximation close to the turning point at x = 0.
When we take the derivative we only differentiate the cosine and not the amplitude x−1/8 — the derivative
of the amplitude factor is order ǫ smaller. Requiring that y ′ (1) = 1 we see that A = ǫ = 1. Thus the
WKB approximation is
4 5/4
W KB −1/8
y (x) = x sin x −1 . (11.41)
5
Figure 11.3 shows that this is an excellent approximation to the solution to the initial value problem —
unless we get too close to the turning point at x = 0.
Why does the WKB approximation work when there is no ǫ? Suppose we’re interested in the
solutions of (11.37) with x large. If we introduce
def
X = δx (11.42)
ǫ = δ 5/4 . (11.44)
Thus we expect that the PO approximation (11.41) is asymptotic as x → ∞.
Now consider the more general equation
y ′′ + xa y = 0 . (11.45)
Is the WKB approximation valid as x → ∞? The problems invite you to explore this issue in detail
e.g., by examining the higher order corrections to the physical optics approximation. But the re-scaling
argument shows very quickly that WKB is valid provided that a > −2.
Exercise: Show that as x → ∞ the WKB approximation applies to (11.45) provided that a > −2.
132
10
5 ode45
y, yW KB & ypert
WKB
0 ypert1
ypert2
-5
-10
-15
-20
-25
0 5 10 15 20 25 30 35 40 45 50
x
Failure of WKB
Consider
y ′′ + x−3 y = 0 , with ICs y(0) = 1 and y ′ (1) = 0 . (11.46)
Notice that the condition for the validity of PO in (11.16) is strongly violated:
s′′0 3x1/2
′2 = → ∞, as x → ∞. (11.47)
s0 2
133
These formulas are equivalent to
Z x ′′
1
s2 = ± q −1/4 q −1/4 dt (11.53)
2
and ′′
1
is3 = − q −1/2 q −1/4 . (11.54)
4
Let’s apply these formulas to Airy’s equation
y ′′ = xy (11.55)
with x → ∞.
Example: Consider
ǫ2 y ′′ − x−1 y = 0 . (11.56)
How small must ǫ be in order for the physical optics approximation to within 5% when x ≥ 1?
Example: Consider
y ′′ + kx−α y = 0 , y(1) = 0 , y ′ (1) = 1 . (11.57)
Is WKB valid as x → ∞?
With k = 1, I found
2 1− α2 α α(α − 4) α2 −1
s0 = ± x −1 , and s1 = ln x , and s2 = x − 1 . (11.58)
2−α 4 16(α − 2)
The calculation of s2 should be checked (and should do general k). But the tentative conclusion is that
WKB works if α < 2. Note α = 2 is a special case with an elementary solution.
11.4 Eigenproblems
Consider the problem of determining the eigenfrequencies of a vibrating string with non-uniform mass
density ρ(x) and uniform tension T :
ρ
φxx + ω 2 φ = 0. (11.59)
T
|{z}
def
= σ2
The wave speed is σ −1 — let’s follow our friend the seismologists and refer to the inverse wave speed
σ as the “slowness”. The ends of the string at x = 0 and ℓ are “clamped” i.e., we have the Dirichlet
boundary conditions
φ(0) = φ(ℓ) = 0 . (11.60)
The eigenfrequencies are ordered
0 < ω1 < ω2 < · · · (11.61)
and we know that ωn → ∞ as n → ∞. To find an approximation to these large eigenvalues, we say that
ωn = ǫ−1 and rewrite the differential equation as
ǫ2 φxx + σ 2 φ = 0 . (11.62)
where a is a normalization constant. The construction above secures the boundary condition at x = 0.
The other boundary condition at x = 1 provides the eigenfrequency
nπ
ωnP O = R ℓ . (11.64)
0
σ(x) dx
134
3
2.5
percent error e
2
1.5
0.5
0
1 1.5 2 2.5 3 3.5 4 4.5 5
Mode Number
1.5
0.5
y5 (x)
-0.5
-1
-1.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
Figure 11.5: Upper panel shows the percentage error in (11.69). The lower panel compares the
fifth eiegnfunction determined by bvp4c (the blue solid curve) with the WKB eigenfunction
(the black dashed curve).
def ω 2 − (3πn/4)2
e = 100 , (11.70)
ω2
with ω determined numerically using bvp4c. The error is less than 3% even for the first mode.
135
20
15
10
e
5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Mo d e Nu mb e r
0.5
y 5( x )
−0.5
1 1.5 2 2.5 3 3.5 4 4.5 5
x
Figure 11.6: Solution with L = 5. Notice there are five interior zeros.
Example: Let’s use the WKB approximation to estimate the eigenvalues of the Sturm-Liouville eigenproblem
y ′′ + λ x + x−1 y = 0 , with BCs y ′ (1) = 0 , y(L) = 0 . (11.71)
| {z }
w(x)
The eigenvalues are function of the parameter L. The physical optics approximation is
Z Lp
y = w−1/4 sin λ1/2 w(x′ ) dx′ , (11.72)
|x {z }
phase
Notice how the phase in (11.72) has been constructed so that the boundary condition at x = L is already
satisfied. To apply the derivative boundary condition at x = 1 we have from (11.73)
p 1
λWKB
n J(L) = π n + , n = 0, 1, · · · (11.74)
2
where Z L p
def
J(L) = x + x−1 dx . (11.75)
1
In Figure 11.6 we take L = 5 and compare the WKB eigenvalue with those obtained from the matlab
routine bvp4c. It is not easy to analytically evaluate J(L), so instead we calculate J(L) using quad. Figure
11.6 shows the relative percentage error,
λbvp4c − λWKB
e ≡ 100 × , (11.76)
λbvp4c
as a function of n = 0, 2, · · · 5. The WKB approximation has about 18% error for λ0 , but the higher
eigenvalues are accurate.
Example: Compute the next WKB correction to the n = 0 eigenvalue and compare both (11.74) and the
improved eigenvalue to the numerical solution for 1 ≤ L ≤ 10.
136
An eigenproblem with a turning point
Let’s apply the WKB approximation to estimate the large eigenvalues of the Sturm-Liouville eigenprob-
lem π
φ′′ + λ sin x φ = 0 , φ(0) = φ = 0. (11.77)
2
There is a turning point at x = 0 so the WKB approximation does not apply close to the boundary.
Hope is eternal and we begin by ignoring the turning point and constructing a physical optics
approximation:
√ Z x√
φhope = (sin x)−1/4 sin λ sin v dv . (11.78)
0
The construction above satisfies the boundary condition at x = 0 and then the other boundary condition
at π/2 determines our hopeful approximation to the eigenvalue. To ensure that φhope (π/2) = 0, the
argument of the sin must be nπ and thus the approximate eigenvalue is
nπ 2
λhope
n = , n = 1, 2,··· (11.79)
J
In the expression above the integral of the phase function is
Z π/2√ r
def 2 2 3
J = sin v dv = Γ = 1.19814 · · · (11.80)
0 π 4
We’ll see later that the approximation in (11.79) is not very accurate — we can’t ignore the turning
point and hope for the best. Instead we use a combination of WKB and asymptotic matching to account
for the turning point and obtain a better approximation to the eigenvalues.
The outer solution — use WKB: we apply the WKB approximation where it is guaranteed to work.
This is in the outer region defined by λ1/3 x ≫ 1. The construction that satisfies the boundary condition
at x = π/2 is !
√ Z π/2√
φW KB = (sin x)−1/4 sin λ sin t dt . (11.81)
x
To perform the match we will need the “inner limit” of the approximation above. In the region where
λ−1/3 ≪ x ≪ 1 (11.82)
the WKB approximation is valid and we can simplify the phase function in (11.81):
Z x√
W KB −1/4
√
φ = (sin x) sin λJ − sin v dv , (11.83)
0
√ √
∼ x−1/4 sin λJ − 32 λx3/2 + ord x7/2 . (11.84)
The inner solution: close to x = 0 — specifically in the region where xλ1/3 is order unity — we can
approximate the differential equation by
φxx + λ x + ord(x3 ) φ = 0 . (11.85)
ΦXX + XΦ = 0 . (11.87)
137
Matching: To take the outer limit of the inner solution in (11.88) we look up the relevant asymptotic
expansions2 of the Airy functions. Then we write the outer limit of (11.88) as
2Q 1 h √3 2 3/2 π 1 2 3/2 π i
Φ∼ √ 2 sin X + − 2 cos X + , (11.89)
3πAi(0) X 1/4 |{z} 3 4 |{z} 3 4
π π
cos 6 sin 6
2Q 1 2 3/2 π
= √ sin X + . (11.90)
3πAi(0) X 1/4 3 12
We now match the phase in (11.84) with that in (11.90). this requires
√ π
λJ − nπ = , (11.91)
12
or 2
(12n − 1)π
λWKB = , n = 1, 2,3··· (11.92)
12J
Notice that with n = 1 the hopeful approximation in (11.80) is about 18% larger than the correct WKB-
Airy approximation in (11.92). The numerical comparison below shows that (11.92) is good even for
n = 1:
λbvp4c 5.7414 25.2094 58.4349 105.4114 166.1422 240.6232
λWKB 5.7771 25.2568 58.4341 105.4673 166.1456 240.6793
Note that numerical results above fluctuate in the final decimal place as I change the resolution and the
initial guess in bvp4c.
2
Airy factoids used here are
1 2 1 2
as t → −∞: Ai(t) ∼ √ sin (−t)3/2 + π
4
, and Bi(t) ∼ √ cos (−t)3/2 + π
4
.
π(−t)1/4 3 π(−t)1/4 3
And
Bi(0) 1
Ai(0) = √ = 2/3 = 0.355028 .
3 3 Γ(2/3)
138
11.5 Using bvp4c
In this section I discuss the matlab solution of (11.71)
y ′′ + λ x + x−1 y = 0 , with BCs y ′ (1) = 0 , y(L) = 0 .
| {z }
w(x)
To use bvp4c we let y1 (x) = y(x) and write the eigenproblem as the first-order system
y1′ = y2 , (11.93)
y2′ = −λ x + x −1
y1 , (11.94)
2
y3′ = x+x −1
y1 . (11.95)
This Sturm-Liouville boundary value problem always has a trivial solution viz., y(x) = 0 and λ arbitrary.
We realize that this is trivial, but perhaps bvp4c isn’t that smart. So with (11.95) we force bvp4c to
look for a nontrivial solution by adding an extra equation with the boundary conditions
We also have y2 (1) = 0 and y1 (L) = 0, so there are four boundary conditions on a third-order problem.
This is OK because we also have the unknown parameter λ. The addition of y3 (x) also ensures that
bvp4c returns a normalized solution:
Z L
y 2 x + x−1 dx = 1 . (11.97)
1
An alternative that avoids the introduction of y3 (x) is to use y1 (1) = 1 as a normalization, and as an
additional boundary condition. However the normalization in (11.97) is standard.
In summary, the system for [y1 , y2 , y3 ] now only has nontrivial solutions at special values of the
eigenvalue λ.
The matlab function billzWKBeig, with neither input nor output arguments, solves the eigenprob-
lem with L = 5. The code is written as an argumentless function so that three nested functions can be
embedded. This is particularly convenient for passing the parameter L — avoid global variables. Notice
that all functions are concluded with end. In this relatively simple application of bvp4c there are only
three arguments:
1. a function odez that evaluates the right of (11.93) through (11.95);
2. a function bcz for evaluating the residual error in the boundary conditions;
3. a matlab structure solinit that provides a guess for the mesh and the solution on this mesh.
solinit is set-up with the utility function bvpinit, which calls the nested function initz. bvp4c
returns a matlab structure that I’ve imaginatively called sol. In this structure, sol.x contains the
mesh and sol.y contains the solution on that mesh. bvp4c uses the smallest number of mesh points
it can. So, if you want to make a smooth plot of the solution, as in the lower panel of Figure 11.6,
then you need the solution on a finer mesh, called xx in this example. Fortunately sol contains all the
information needed to compute the smooth solution on the fine mesh, which is done with the auxiliary
function deval.
139
function billzWKBeig
L = 5; J = quad(@(x)sqrt(x+x.^(-1)),1,L);
%The first 6 eigenvalues; n = 0 is the ground state.
nEig = [0 1 2 3 4 5]; lamWKB = (nEig+0.5).^2*(pi/J)^2;
lamNum = zeros(1,length(lamWKB));
for N = 1:1:length(nEig)
lamGuess = lamWKB(N);
x = linspace(1,L,10);
solinit = bvpinit(x,@initz,lamGuess);
sol = bvp4c(@odez,@bcz,solinit);
lambda = sol.parameters;
lamNum(N) = lambda;
end
%% BCs applied
function res = bcz(ya, yb, lambda)
res = [ ya(2) ; yb(1); ya(3) ; yb(3) - 1];
%Four BCs: solve three first-order
%equations and also determine lambda.
end
140
Bessel factoids
Denote any solution of Bessel’s equation
d2 y dy
z2 2
+x + (z 2 − ν 2 )y = 0
dz dz
by Cν (z). For example, Cν = Jν or Yν , or a linear combination of Jν and Yν . Then
d2 y dy
z2 +x − (z 2 + ν 2 )y = 0
dz 2 dz
by Zν (z). For example, Zν = Kν or Iν , or a linear combination of Kν and Iν . Then λ2 in the
differential equations above can be replaced by −λ2 if Cν is replaced by Zν . For example
141
11.6 Problems
Problem 11.1. Consider the IVP
Estimate the position and magnitude of the first positive maximum of y(t). Compare the WKB approx-
imation with a numerical solution on the interval 0 < t ≤ 1.
How can we apply the WKB approximation to this equation? Compare the physical optics approximation
to a numerical solution with the initial conditions y(0) = 1 and y ′ (0) = 0.
Problem 11.4. Find an approximation to the large eigenvalues of the Sturm-Liouville problem
φ′′ + λe2x φ = 0 , posed on 0 < x < 1, with BCs: φ(0) = 0 , φ′ (1) = 0 . (11.101)
Problem 11.5. Substitute the WKB ansatz y = eS/ǫ into the fourth- order differential equation
d4 y
ǫ4 + Qy = 0 , (11.102)
dx4
and obtain a nonlinear equation for S. Using the expansion S = S0 + ǫS1 + ǫ2 S2 + · · · find S0 and S1
in terms of Q. (Consider both signs of Q.)
d2 y dy
r2 +r + (r2 − ν 2 )y = 0 (11.103)
dr2 dr
into Schrödinger form
d2 Y ν 2 − 41
+ 1 − Y = 0. (11.104)
dr2 r2
Consider r = R/ǫ with ǫ → 0 and R fixed. Obtain the physical optics approximation to (11.104) in this
limit. Compare your answer to Bessel-function asymptotics in some convenient reference.
posed on the semi-infinite interval x > 1. Solve the differential equation using the PO approximation
and assess the accuracy of the large-x PO approximation by considering the third term in the WKB
expansion. Find the exact solution in terms of Bessel functions. Use matlab to compare the Bessel
function solution with the WKB approximation.
142
0.3
0.2
0.1
-0.1
-0.2
0 0.5 1 1.5 2 2.5 3
Problem 11.8. The top panel of figure 11.7 shows the solution to one of the four initial value problems:
(a) Which yn (x) is shown in figure 11.7? (b) Use the WKB approximation to estimate the value of ǫ
used in figure 11.7.
Compute the first five eigenvalues with bvp5c and compare the numerical estimate with your approxi-
mation.
Problem 11.10. Use the exponential substitution y = exp(S/ǫ) to construct a WKB approximation to
the differential equation
′
ǫ2 (py ′ ) + qy = 0 . (11.107)
Above p(x) and q(x) are coefficient functions, independent of the small parameter ǫ.
The weight function, w(x) above, is positive for 0 ≤ x ≤ 1. (i) Show that the eigenvalues λn are real
and positive. (ii) Show that eigenfunctions with distinct eigenvalues are orthogonal
Z 1
(λn − λm ) φn φm w dx = 0 . (11.109)
0
(iii) With w = 1, find the first five eigenvalues and plot the first five eigenfunctions. You should obtain
transcendental equation for λ, and then solve that equation with matlab. (iv) Next, with non-constant
w(x), use the WKB approximation to obtain a formula for λn . (v) Consider
w = (a + x)2 . (11.110)
Take a = 1 and use bvp4c to calculate the first five eigenvalues and compare λW KB with λbvp4c . (vi) Is
the WKB approximation better or worse if a increases?
143
Problem 11.12. Consider the Sturm-Liouville problem
(wy ′ )′ + λy = 0 , (11.111)
Assume that w(x) increases monotonically with w(0) = 0 and w(1) = 1 e.g., w(x) = sin πx/2. Further,
suppose that if x ≪ 1 then
w2 2 w3 3
w(x) = w1 x + x + x + ··· . (11.113)
2 6
There is a regular singular point at x = 0, and thus we require only that y(0) is not infinite.
Show that the transformation y = w−1/2 Y puts the equation into the Schrödinger form
λ w′′ w′2
Y ′′ + − + Y = 0. (11.114)
w 2w 4w2
Use the WKB method and matching to find an approximation for the large eigenvalues (λ = ǫ−2 ≫ 1)
in terms of the wn ’s and the constant Z 1
dx
q≡ p . (11.115)
0 w(x)
Some useful information from DLMF: The solution of
2
a 1 − ν2
u′′ + + u=0 (11.116)
4z 4z 2
is √ √ √ √
u(z) = A zJν (a z) + B zYν (a z) , (11.117)
where Jν and Yν are Bessel functions. You will need to look up basic properties of Bessel functions.
y ′′ + p2 y = 0 , (11.118)
Unfortunately this doesn’t work: Y (x) is not an exact solution of (11.118) unless p is constant. Instead,
show that Y satisfies
Y ′′ + p2 ∓ ip′ Y = 0 . (11.120)
(ii) Compare (11.120) with (11.118), and explain why Y (x) is an approximate solution of (11.118) if
d 1
≪ 1. (11.121)
dx p
(iii) Prove that if y1 and y2 are two linearly independent solutions of (11.118) then the Wronskian
144
10
6
y( x )
0
−2 0 2 4 6 8 10 12
x
Figure 11.8: Figure for the problem 11.14 showing a comparison of the exact solution (the
solid black curve) with the asymptotic expansions as x → −∞ (the dot-dash blue curve) and
(11.126) as x → +∞ (the dashed red curve).
is equal to 2ip. This suggests that if we modify the amplitude of Y (x) like this:
Z x Z x
1 1
Y3 ≡ √ exp +i p(t) dt and Y4 ≡ √ exp −i p(t) dt , (11.124)
p 0 p 0
then we might have a better approximation. (v) Show that the Wronskian of Y3 and Y4 is a constant.
(vi) Find a Schrödinger equation satisfied by Y3 and Y4 and discuss the circumstances in which this
equation is close to (11.118).
y = sin x , E = 1. (11.128)
(i) Suppose |η| ≪ 1. Find the O(η) shift in the eigenvalue using perturbation theory. If you’re energetic,
calculate the O(η 2 ) term for good measure (optional). (ii) In equation (10.1.31) of BO, there is a WKB
approximation to the eigenvalue E(η). Take n = 1, and expand this formula for E up to and including
terms of order η 2 ; compare this with your answer to part (i). (iii) Use bvp4c in MATLAB to calculate
E(η), with 0 < η < 2, numerically. Compare the WKB approximation in (10.1.31) with your numerical
answer by plotting Ebvp4c (η) and EWKB (η) in the same figure.
(a) Using bvp4c, compute the first two eigenvalues, λ1 and λ2 , as a functions of a in the range −3/4 <
a < 3. (b) Estimate λ1 (a) and λ2 (a) using the WKB approximation. (c) Assuming |a| ≪ 1 use
145
bvp4c
1 WKB
0.8
E
0.6
0.4
0.2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
η
10
percentage error
−5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
η
perturbation theory to compute the first two nonzero terms in the expansion of λ1 (a) and λ2 (a) about
a = 0. Compare these approximations with the WKB solution — do they agree? (d) Compare the
WKB approximation to those from bvp4c by plotting the various results for λn (a)/n2 on the interval
−3/4 < a < 3.
Remark: If a = −1 the differential equation has a turning point at x = π/2. This requires special
analysis — so we’re staying well away from this ticklish situation by taking a > −3/4.
146
Eigenvalues for y’’ + λ(1 + a sin x)2 y = 0.
4
First eigenvalue
Second eigenvalue
3.5 WKB
2.5
2
λ / nEig
1.5
0.5
0
−0.5 0 0.5 1 1.5 2 2.5 3
a
147
Lecture 12
y ′′ + ay ′ + by = 0 , (12.1)
in which a(x) has an internal zero. Suppose that we re-define the coordinate so that the domain is
−1 ≤ x ≤ 1 and the boundary conditions in (7.42) are
Further, suppose that a(x) has a simple zero at x = 0. The differential equation
αx
ǫy ′′ + y + βy = 0 , (12.3)
1 + x2
is a typical example — figure 12.1 shows some bvp4c solutions.
Case 1: α > 0
Let’s consider (12.3) with α > 0 and boundary conditions
This example will reveal all the main features of the general case. Our earlier arguments indicate that
boundary layers not possible at either end of the domain. Thus there is a left interior solution, u(x),
satisfying the boundary condition at x = −1:
y = u0 + ǫu1 + · · · (12.5)
There is also a right interior solution v(x), satisfying the boundary condition at x = +1:
y = v0 + ǫv1 + · · · (12.7)
In this case, with the homogeneous x = +1 boundary conditions in (12.4), the right interior solution is
zero at all orders
vn = 0 . (12.8)
148
3
( α , β , ν ) = ( 1, 0. 25, − 0. 75)
y2
1
0
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
10
( α , β , ν ) = ( 1, 0. 5, − 0. 5)
y 5
0
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
40 ( α , β , ν ) = ( 1, 0. 75, − 0. 25)
y
20
0
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
Figure 12.1: Internal boundary layer solution of (12.3) with p = 1 and q = 0, and ǫ = 0.05
(green dotted) and 0.005 (red dashed) and 0.0005 (solid black).
149
We need a boundary layer at x = 0 to heal the x → 0 singularity in (12.6) and to connect the right
interior solution to the left interior solution. A distinguished-limit shows that the correct boundary-layer
coordinate is
def x
X = √ . (12.9)
ǫ
We must also re-scale the solution:
y = ǫ−β/2α Y (X) . (12.10)
−β/2α
√
The scaling above is indicated because the interior solution in (12.6) is order ǫ once x ∼ ǫ.
Without much work we have now determined the boundary layer thickness and the amplitude of the
solution within the boundary layer. This is valuable information in interpreting the numerical solution
in figure 12.1 — we now understand how the vertical axis must be rescaled if we reduce ǫ further.
Using the boundary-layer variables, the BL equation is
αX
YXX + YX + βY = 0 . (12.11)
1 + ǫX 2
We solve (12.11) with the RPS
Y = Y0 (X) + ǫY1 (X) + · · · (12.12)
Leading order is the three-term balance
Y0XX + αXY0X + βY0 = 0 , (12.13)
with matching conditions
Y0 → |X|−β/α eβ/2α , as X → −∞, (12.14)
Y0 → 0 , as X → +∞. (12.15)
We have to solve (12.13) exactly. When confronted with a second-order differential equation it is
always a good idea to remove the first derivative term with the standard multiplicative substitution. In
this case the substitution 2
Y0 = W e−αX /4 (12.16)
into (12.13) results in
WXX + β − 12 α − 14 α2 X 2 W = 0 . (12.17)
def √
Then, with Z = αX, we obtain the parabolic cylinder equation
β 1 2
WZZ + − 1 −4Z W = 0 , (12.18)
|α {z }
1
ν+ 2
of order
def β
ν = −1. (12.19)
α
Provided that
β
6= 1, 2, 3, · · · (12.20)
α
the general solution of (12.13) is
2 √ √
Y0 = e−αX /4
ADν αX + BDν − αX . (12.21)
We return to the exceptional case, in which ν = 0, 1, 2 · · · , later.
To take the outer limits, X → ±∞, of the internal boundary layer solution in (12.21) we look up the
asymptotic expansion of the parabolic cylinder functions e.g., in the appendix of BO, or in the DLMF:
2
Dν (t) ∼ tν e−t /4
, as t → ∞, (12.22)
√
2π −ν−1 t2 /4
Dν (−t) ∼ Γ(−ν) t e , as t → ∞. (12.23)
150
( α, β ) = ( −1, 0.5)
0.8
0.6
y 0.4 0. 1
0.2
0. 02
0
−0.2
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
Figure 12.2: Solutions of (12.3) with α = −1 < 0 and ǫ = 0.1 (solid blue) and 0.02 (dashed
black). There are boundary layers at x = ±1. The interior solution is zero to all orders in ǫ.
There is no internal boundary layer at x = 0.
Matching in the right-hand outer limit, X → +∞, implies that B = 0. Matching in the left-hand
outer limit X → −∞ requires that
(ν+1)/2 Γ(−ν)
A = (αe) √ . (12.24)
2π
Case 2: α < 0
There is no internal boundary layer. Instead there are boundary layers at both x = 1 and x = −1. —
see figure 12.2
151
Lecture 13
Initial layers
152
0.08 O ( ǫ) unif
O ( ǫ 2 ) unif
0.06 e xac t
x(t) 0.04
0.02 ǫ = 0.10
0
0 0.5 1 1.5 2
t
Figure 13.1: Comparison of (13.15) with the exact solution of (13.1).
13.2 Problems
Problem 13.1. Use boundary-layer theory to construct a leading-order solution of the IVP
ǫxtt + xt + x = te−t , with x(0) = ẋ(0) = 0 , as ǫ → 0. (13.18)
Problem 13.2. Find the leading order ǫ → 0 solution of
u̇ = v , ǫv̇ = −v − u2 , (13.19)
for t > 0 with initial conditions u(0) = 1 and v(0) = 0.
Problem 13.3. Find the leading order ǫ → 0 solution of
ǫü + (1 + t)u̇ + u = 1 , (13.20)
for t > 0 with initial conditions u(0) = 1 and u̇(0) = −ǫ−1 .
153
Problem 13.4. A function y(t, x) satisfies the integro-differential equation
where Z ∞
def
Y (t) = y(t, x)e−βx dx , (13.22)
0
with β > 1. The initial condition is y(0, x) = a(x). (This is the Grodsky model for insulin release.)
Use boundary layer theory to find the composite solution on the interval 0 < t < ∞. Compare this
approximate solution with the exact solution of the model. To assist communication, use the notation
where s(t) is the concentration of the substrate and c(t) is the concentration of the catalyst. The initial
conditions are
s(0) = 1 , c(0) = 0 . (13.25)
def
Find the first term in the: (i) outer solution; (ii) the “initial layer” (τ = t/ǫ); (iii) the composite
expansion.
154
Lecture 14
At leading order
x2 − 1
u0xx = 1 , ⇒ u0 = . (14.4)
2
We’ve applied only two of the four boundary conditions above.
Before worrying about higher order terms in (14.3), let’s turn to the boundary layer at x = −1. We
assume that the solution is an even function of x so the boundary layer at x = +1 can be constructed
by symmetry.
If we look for a dominant balance with X = (x + 1)/δ we find that δ = ǫ. Thus we consider a
boundary layer rescaling
def x+1
u(x, ǫ) = U (X, ǫ) , where X = . (14.5)
ǫ
The boundary layer problem is then
155
Thus we have the hierarchy
and so on.
The general solution of (14.9) is
U1 = A1 + B1 X + C1 e−X + D1 eX . (14.12)
|{z}
=0
Above we’ve anticipated that D0 = 0 to remove the exponentially growing solution. Then applying the
boundary conditions at X = 0 we find
U1 = A1 1 − X − e−X . (14.13)
To match (14.13) against the term −ǫX in the interior solution in (14.7) we take
A1 = 1 . (14.14)
Now we can construct a leading-order solution that is uniformly valid in the region near x = −1:
x2 − 1
uuni (x) = + ǫ 1 − e−(x+1)/ǫ . (14.15)
2
The derivative is
uunix (x) = x + e−(x+1)/ǫ , (14.16)
which is indeed zero at x = −1.
X2
U2 (X) = + A2 1 − X − e−X . (14.17)
2
Above, we’ve satisfied both boundary conditions at X = 0. We’ve also matched the term ǫ2 X 2 /2 in
(14.7). To summarize, our boundary layer solution is
X2
1 −X − e−X + ǫ2
U (X) = ǫ |{z} + ǫ2 A2 1 − X − e−X + ord(ǫ3 ) . (14.18)
2
orphan
But we have unfinished business: we have not matched the orphan above with any term in the leading-
order outer solution u0 (x).
To take care of the orphan we must go to next order in the interior expansion:
x2 − 1
u(x, ǫ) = + ǫu1 (x) + ord ǫ2 . (14.19)
2
Thus
u1xx = 0 , ⇒ u1 (x) = P1 + Q1 x (14.20)
|{z} |{z}
=1 =0
We take Q1 = 0 because the solution is even, and P1 = 1 to take care of the orphan. The solution u1 (x)
does not satisfy any of the four boundary conditions. To summarize, the outer solution is
x2 − 1
u(x, ǫ) = + ǫ + ord(ǫ2 ) . (14.21)
2
156
The ord(ǫ) term above was accidently included in the uniform solution (14.16): in the outer region the
expansion of (14.15) already agrees with all terms in (14.21).
Because u0xxxx = 0, there are now no more non-zero terms in the outer region i.e., u2 = 0, and
therefore A2 = 0 in (14.18). Moreover, all terms U3 , U4 etcetera are also zero. Thus we have constructed
an infinite-order asymptotic expansion. Using symmetry we can construct a uniformly valid solution
throughout the whole domain
x2 − 1
uuni(x) = + ǫ 1 − e−(x+1)/ǫ − e(x−1)/ǫ . (14.22)
2
14.2 Problems
Problem 14.1. Solve (14.1) exactly and use matlab to compare the exact solution with the asymptotic
solution in (14.22).
Problem 14.2. Find two terms in ǫ in the outer region and match to the inner solution at both
boundaries for
ǫ2 u′′′′ − u′′ = eax . (14.23)
The domain is −1 ≤ x ≤ 1 with BCs
Problem 14.3. Find two terms in ǫ in the outer region and match to the inner solution at both
boundaries for
ǫ2 u′′′′ − u′′ = 0 . (14.25)
The domain is 0 ≤ x ≤ 1 with BCs
(i) Prove that all eigenvalues are real and positive. (ii) Show that with a suitable definition of inner
product, that eigenfunctions with different eigenvalues are orthogonal. (iii) Use boundary layer theory
to find the shift in the unperturbed spectrum, λ = 1, 2, 3 · · · , induced by ǫ.
157