Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2...

35
Mathematical Methods MATH30800 Richard Porter University of Bristol [email protected], Room 1A.17 http://people.maths.bris.ac.uk/~marp/methods/ Jan 2020 1

Transcript of Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2...

Page 1: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Mathematical Methods MATH30800

Richard PorterUniversity of Bristol

[email protected], Room 1A.17

http://people.maths.bris.ac.uk/~marp/methods/

Jan 2020

1

Page 2: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

6 Laplace Transforms

6.1 Introduction

Definition 6.1 The Laplace transform (LT) of a function f(t), 0 < t <∞, is defined as

L[f(t)] ≡ f(p) =

∫ ∞0

f(t)e−pt dt. (1)

Notes:

• Unlike Fourier transforms (FTs), f(t) need not decay as t→∞; the LT will exist if |f(t)| <Ceαt for some C > 0 if <{p} > α.

• The LT is a one-sided transform acting on 0 ≤ t < ∞1; useful for initial-value problemswhere t represents time.

E.g. 6.1:

L[1] =

∫ ∞0

e−pt dt =

[e−pt

−p

]t=∞t=0

=1

p.

E.g. 6.2: L[et2] doesn’t exist since there isn’t a C, α s.t. et

2< Ceαt as t→∞.

Definition 6.2 The inverse Laplace transform of a function f(p) is defined by

L−1[f(p)] ≡ f(t) =1

2πi

∫ γ+i∞

γ−i∞f(p)ept dp. (2)

This is called the Bromwich inversion formula. In (2), γ > α.

Proof:

Use the Fourier inversion theorem as basis of proof. So let

g(x) =

{e−γxf(x), x ≥ 00, x < 0

and since γ > α, g(x) decays exponentially as x→∞. Then FT is

G(k) =

∫ ∞−∞

g(x)e−ikx dx

and

g(x) =1

∫ ∞−∞

G(k)eikx dk

1Technically the lower integration limit is 0−.

2

Page 3: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

from inverse formula.

So for x > 0

e−γxf(x) =1

∫ ∞−∞

eikx{∫ ∞

0

e−γx′f(x′)e−ikx

′dx′}

dk.

Now let p = γ + ik (so dk = −idp; k = −i(p − γ); k = −∞ maps to p = γ − i∞; k = +∞ mapsto p = γ + i∞):

e−γxf(x) =1

2πi

∫ γ+i∞

γ−i∞e(p−γ)x

{∫ ∞0

e−px′f(x′) dx′

}dp

and implies

f(x) =1

2πi

∫ γ+i∞

γ−i∞f(p)epx dp

which is (2).

Notes:

• Although we do not need to define f(t) for t < 0 in order to compute f(p), the inversionformula implies f(t) = 0 for t < 0.

• Unlike FTs (2) necessarily requires integration in the complex plane. We come to this laterand first establish useful results which allow us to avoid these difficulties.

• We note, however, using E.g. 6.1 in (2) that

1 =1

2πi

∫ γ+i∞

γ−i∞

ept

pdp for γ > 0, 0 < t <∞.

and the integral is zero if t < 0. Is this obvious ? We do this later...

6.2 Basic properties

6.2.1 Linearity

We have, for any real λ, µ, f(t), g(t)

L[λf(t) + µg(t)] = λL[f(t)] + µL[g(t)].

Applies to L−1 also.

E.g. 6.3:L[cosωt] = L[1

2(eiωt + e−iωt)] = 1

2L[eiωt] + 1

2L[e−iωt].

Hence

L[cosωt] = 12

∫ ∞0

e(iω−p)t dt+ 12

∫ ∞0

e(−iω−p)t dt = 12

[e(iω−p)t

iω − p

]∞0

+ 12

[e(−iω−p)t

−iω − p

]∞0

=1

2

(1

p− iω+

1

p+ iω

)=

p

p2 + ω2.

Similarly,

L[sinωt] = L[(1/2i)(eiωt − e−iωt)] = . . . =ω

p2 + ω2.

3

Page 4: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

6.2.2 Scaling

For a > 0

L[f(at)] =

∫ ∞0

f(at)e−pt dt =

∫ ∞0

f(u)e−pu/a d(u/a) =1

af(p/a)

using substitution u = at.

6.2.3 Shift

L[eatf(t)] =

∫ ∞0

f(t)eate−pt dt =

∫ ∞0

f(t)e−(p−a)t dt = f(p− a).

E.g. 6.4:

L[eat] = L[eat.1] =1

p− afrom E.g. 6.1.

6.2.4 A second shift property/delay

Definition 6.3 The Heaviside function is defined by

H(t) =

{1, t > 00, t < 0.

E.g. 6.5: For a > 0

L[H(t− a)] =

∫ ∞0

H(t− a)e−pt dt =

∫ ∞a

e−pt dt =

∫ ∞0

e−pue−pa du = e−paL[1] =e−pa

p

after making the substitution u = t− a.

The 2nd shift property generalises this example:

L[H(t− a)f(t− a)] =

∫ ∞0

f(t− a)H(t− a)e−pt dt = e−paL[f(t)] = e−paf(p).

6.3 Polynomials

For general functions f(t) the integration needed to define the LT is hard. But for some simplefunctions we are OK.

E.g. 6.6:

L[t] =

∫ ∞0

te−pt dt =

[−e−pt

pt

]∞0

+1

p

∫ ∞0

e−pt dt =1

p2

which follows using integration by parts, E.g. 6.1 and the vanishing of the free term.

4

Page 5: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

This generalises to

L[tn] =

∫ ∞0

tne−pt dt =

[−e−pt

ptn]∞0

+n

p

∫ ∞0

tn−1e−pt dt =n

pL[tn−1]

=n(n− 1)

p2L[tn−2]

= . . . =n!

pnL[1] =

n!

pn+1.

6.4 Laplace transforms of derivatives and integrals

This is really useful/important.

6.4.1 Derivatives

Consider

L[f ′(t)] =

∫ ∞0

f ′(t)e−pt dt =[f(t)e−pt

]∞0

+ p

∫ ∞0

f(t)e−pt dt = −f(0) + pf(p).

This generalises to L[f (n)(t)]. For e.g.

L[f ′′(t)] =

∫ ∞0

f ′′(t)e−pt dt = −f ′(0) + pL[f ′(t)] = −f ′(0)− pf(0) + p2f(p).

E.g. 6.7: (Limits)

Using the result above we have

limp→∞{pf(p)} = lim

p→∞

{f(0) +

∫ ∞0

f ′(t)e−pt dt

}= f(0)

since the exponential goes to 0. Also

limp→0{pf(p)} = lim

p→0

{f(0) +

∫ ∞0

f ′(t)e−pt dt

}= f(0) +

∫ ∞0

f ′(t) dt = f(0) + limt→∞{f(t)− f(0)}

= limt→∞{f(t)}

using the Fundamental Thm of Calculus (FTC).

6.4.2 Derivatives of transforms

L[tf(t)] =

∫ ∞0

tf(t)e−pt dt = − d

dp

∫ ∞0

f(t)e−pt dt = − d

dpf(p).

This generalises to L[tnf(t)].

5

Page 6: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

E.g. 6.8: Find L[t sin at].

Since L[sin at] = a/(p2 + a2) (earlier E.g.) then

L[t sin at] = − d

dp

(a

p2 + a2

)=

2ap

(p2 + a2)2.

6.4.3 Integrals

L[∫ t

0

f(t′) dt′]

=

∫ ∞0

e−pt∫ t

0

f(t′) dt′ dt =

[−∫ t

0

f(t′) dt′e−pt

p

]t0

+1

p

∫ ∞0

f(t)e−pt dt =1

pf(p).

E.g. 6.9: Since L[1] = 1/p, the inverse Laplace transform of 1/p2 is∫ t

0

1.dt′ = t.

6.5 Convolution

Just as with FTs, there is a convolution result for LTs.

Definition 6.4 The convolution of two functions f(t) and g(t) defined over 0 ≤ t < ∞ isdefined by

(f ∗ g)(t) =

∫ t

0

f(s)g(t− s) ds. (3)

6.5.1 Convolution Theorem

L[(f ∗ g)(t)] = L[f(t)]L[g(t)]. (4)

Proof: Start with LHS and definition (3)

L[(f ∗ g)(t)] =

∫ t=∞

t=0

e−pt∫ s=t

s=0

f(s)g(t− s) ds dt =

∫ s=∞

s=0

f(s)

∫ t=∞

t=s

g(t− s)e−pt dt ds

after changing the order of integration. Now substitute t′ = t− s in inner integral

L[(f ∗ g)(t)] =

∫ ∞0

f(s)

∫ t′=∞

t′=0

g(t′)e−p(t′+s) dt′ ds =

∫ ∞0

f(s)e−ps ds

∫ ∞0

g(t′)e−pt′dt′

after separating the integrals, which is the RHS of (4).

Corollary: (4) is useful for determining inverse Laplace transforms, when expressed as

(f ∗ g)(t) = L−1[f(p)g(p)]

after applying L−1 to both sides of (4).

6

Page 7: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Note: (f ∗ g)(t) = (g ∗ f)(t) since∫ t

0

f(s)g(t− s) ds =

∫ t

0

f(t− v)g(v) dv

after substituting s = t− v.

E.g. 6.10: Find the function whose LT is1

p2(p2 + 1); or find

f(t) = L−1[

1

p2(p2 + 1)

].

Method 1: (partial fractions)

f(t) = L−1[

1

p2− 1

p2 + 1

]= L−1

[1

p2

]− L−1

[1

p2 + 1

]= t− sin t

from earlier results.

Method 2: (convolution)

Clearly 1/(p2(p2 +1)) is the product of 1/p2 and 1/(p2 +1) whose inverses are individually known.So by convolution

f(t) =

∫ t

0

s sin(t− s) ds =

∫ t

0

(t− s) sin s ds = [−(t− s) cos s]t0 −∫ t

0

cos s ds = t− sin t

where the second version of convolution is easier to work with than the first.

6.6 Application of LTs to solution of ODEs

Can be done best by example... uses many of our previous results.

E.g. 6.11: Find the solution of the ODE

y′′(t) + 2y′(t) + 5y(t) = f(t), t > 0

with y(0) = A and y′(0) = B. We call these initial conditions (ICs).

Solution is found by “taking the LT of the ODE” (that is, formally multiplying above ODE bye−pt and integration from t = 0 to t =∞. We get

−y′(0)− py(0) + p2y(p) + 2 [−y(0) + py(p)] + 5y(p) = f(p)

which givesy(p)(p2 + 2p+ 5) = f(p) +B + (2 + p)A

or

y(p) =f(p)

p2 + 2p+ 5+B + (2 + p)A

p2 + 2p+ 5

7

Page 8: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Note: This is the key to LTs... they turn differentiation into algebra which is simple to solve.Difficulty doesn’t go away and often bites back when you invert the transform.

Think about the first term. We can write this as f(p)g(p) where

g(p) =1

p2 + 2p+ 5.

To make this work, we’d need to find the g(t) s.t. L[g(t)] = 1/(p2 + 2p+ 5). Or

g(t) = L−1[

1

p2 + 2p+ 5

].

We don’t want to use inversion formula (2) unless we have to and note (completing the square)

g(t) = L−1[

1

(p+ 1)2 + 4

].

We know L[sin 2t] = 2/(p2 + 22) which is close and we can deal with p → (p + 1) via the shiftproperty

L[e−t sin 2t] =2

(p+ 1)2 + 4.

So g(t) = 12e−t sin 2t.

Now think about 2nd term. Can write as (clever thinking required)

A(p+ 1)

(p+ 1)2 + 4+

B + A

(p+ 1)2 + 4= AL[e−t cos 2t] + 1

2(B + A)L[e−t sin 2t]

using the previous results. Therefore, the solution is

y(t) = L−1[y(p)] =

∫ t

0

f(s)12e−(t−s) sin 2(t− s) ds+ Ae−t cos 2t+ 1

2(B + A)e−t sin 2t.

6.7 Application of LTs to PDEs

Again, best demonstrated by example.

E.g. 6.12: (String falling under gravity)

A semi-infinite string of density ρ (mass per unit length) with one end fixed to a wall initiallyheld horizontal is released and falls under gravity. The function u(x, t) measures the verticaldisplacement as a function of position x > 0 and time t > 0.

The governing PDE is the forced wave equation (no derivation)

utt = c2uxx − g

where c2 = T/ρ and T is stress. We have an ICs of u(x, 0) = ut(x, 0) = 0 for x > 0 (initially flatand at rest) and a BC (boundary condition) of u(0, t) = 0 for t > 0.

8

Page 9: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Q: Could we use a Fourier sine transform to solve this problem ?

A: No. The term g is not absolutely integrable.

Solution. Let u(x, p) =

∫ ∞0

u(x, t)e−pt dt be the LT of u in time.

Taking LTs of the PDE gives

−ut(x, 0)− pu(x, 0) + p2u(x, p) = c2d2

dx2u(x, p)− g

p

using result for LT of second derivative and L[1] = 1/p. Use ICs to give

d2

dx2u(x, p)− p2

c2u(x, p) =

g

c2p.

Note: The LT has transformed the PDE into an ODE for x. It is 2nd order, so need 2 BCs.

One comes from L[u(0, t)] = L[0] = 0. I.e. u(0, p) = 0. Solve ODE (2nd order constant coeffs. soneed CF + PI) to get

u(x, p) = Ae−px/c +Bepx/c − g/p3.

Since <{p} > 0, c > 0 and x → ∞ when solution must remain bounded so B = 0. Usingu(0, p) = 0 so A = g/p3 and so

u(x, p) =g

p3e−px/c − g

p3

is “solution in transform space”. We need to invert and try to avoid complex integration. Secondterm is easy since L[t2] = 2!/p3 from earlier.

The first term we note the ealier useful delay result: L[H(t− a)f(t− a)] = e−paf(p).

So we have1

p3e−px/c = 1

2L[H(t− x/c)(t− x/c)2]

Therefore

u(x, t) =1

2g(H(t− x/c)(t− x/c)2 − t2

)is the solution.

Notes:

• If x/c > t then u = −12gt2 (free fall)

• If x/c < t then

u(x, t) = 12g(t− x/c)2 − 1

2gt2 =

gtx

c− gx2

2c

(parabola in x).

This is a hyperbolic problem: information cannot travel faster than the phase speed c.

E.g. 6.13: (semi-infinite rod subject to external heating)

9

Page 10: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Figure 1: Falling string

Thermally conducting material heated along its length by a periodic heat source of strength T sinxand the temperature at the end x = 0 is controlled by sinωt.

Temperature related to θ(x, t) satisfying PDE

θt = θxx + T sinx, x > 0, t > 0

with IC θ(x, 0) = 0 and BC θ(0, t) = sinωt.

Note: As before cannot use Fourier sine transform since T sinx is not integrable.

Solution: let θ(x, p) =

∫ ∞0

θ(x, t)e−pt dt be the LT of θ in time.

Taking the LT of the PDE gives

−θ(x, 0) + pθ(x, p) =d2

dx2θ +

T sinx

p

and first term is zero from IC. The ODE is

d2

dx2θ − pθ = −T sinx

p

for x > 0. Solving the ODE (CF + PI)

θ(x, p) = Ae−x√p +Bex

√p +

T sinx

p(p+ 1)

(we need to check the last term !!)

As before we set B = 0 since we want bounded solutions at x =∞. To find A we take the LT ofthe BC:

θ(0, p) = L[θ(0, t)] = L[sinωt] =ω

p2 + ω2.

Using this in the general solution above determines A = ω/(p2 + ω2) and so

θ(x, p) =ω

p2 + ω2e−x√p +

T sinx

p(p+ 1)

is the solution in “transform space”.

10

Page 11: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Need to invert. The second term is easier since partial fractions

L−1[

1

p(p+ 1)

]= L−1

[1

p− 1

p+ 1

]= 1− e−t

using “shift” for second term.

The first term is not obvious. It looks like convolution but we would need to know for e.g.L−1[e−x

√p]. Lucky for us (PS6Q7) we can deduce that

L−1[e−x√p] =

x

2√πt−3/2e−x

2/4t.

Therefore, solution using convolution is

θ(x, t) =x

2√π

∫ t

0

s−3/2e−x2/4s sinω(t− s) ds+ T sinx(1− e−t).

6.8 Calculating inverse LTs from inversion formula

Requires complex integration, so let’s remind ourselves of some useful results.

Definition 6.5 A function w(z) has a pole of order n at z0 if ∃f(z) s.t. w(z) = f(z)/(z− z0)nand f(z) is bounded near z0

Then the residue of w(z) at z0 is

Res(w; z0) = limz→z0

{1

(n− 1)!

d(n−1)

dz(n−1)f(z)

}.

Note: If w(z) has a simple pole (n = 1) at z0 and we write w(z) = g(z)/h(z) where h(z0) = 0then

Res(w; z0) = g(z0)/h′(z0).

Cauchy’s Residue Theorem (CRT): If C is a closed anticlockwise curve in C and w(z) is ana-lytic (continuously differentiable everywhere apart from at isolated singularities at z = z1, . . . , zmsay) inside C then

1

2πi

∮C

w(z) dz =m∑j=1

Res(w; zj).

Complex integration: To compute an integral in the complex plane, define a parametrisationz(t) ∈ C for a < t < b. Then ∫

C

w(z) dz =

∫ b

a

w(z(t))z′(t) dt.

11

Page 12: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

E.g. 6.14: Calculate1

2πi

∫ γ+i∞

γ−i∞

ept

pdp, for γ > 0.

Note: This is L−1[1/p] = 1 for t > 0.

Consider first t > 0 and replace p by z (to make complexity look explicit). Consider the closedcurve C−R of large radius R as shown in the diagram.

Figure 2: Semicircular contour completed to the left

By the CRT1

2πi

∮C−R

etz

zdz = et.0 = 1

since there is a single simple pole at z = 0.

But C−R is comprised of two segments and so we write

1

2πi

∫ γ+i∞

γ−i∞

ezt

zdz + lim

R→∞

1

2πi

∫C2

etz

zdz = 1

where C2 is the semi-circular arc. The first integral is what we are after and so we need toevaluate the second integral along C2. We parametrise this semi-circle by writing z = γ+Reiθ for12π < θ < 3

2π and θ is the parameter. So z′(θ) = iReiθ and

limR→∞

∫C2

etz

zdz = lim

R→∞

∫ 3π/2

π/2

exp{t(γ +Reiθ)}γ +Reiθ

iReiθ dθ

= limR→∞

∫ 3π/2

π/2

iReiθ

γ +ReiθetγetR cos θeitR sin θ dθ.

There’s a slightly subtle argument here which can be made robust, but broadly since cos θ < 0for θ ∈ (1

2π, 3

2π) then as R → ∞ the integrand decays to zero (all other terms are bounded as

R→∞). Hence

limR→∞

∫C2

etz

zdz = 0.

Also consider t < 0 and now complete the contour in a large semi-circle to the right of γ. Theclosed contour C+

R contains no poles and so

1

2πi

∫ γ+i∞

γ−i∞

ezt

zdz + lim

R→∞

1

2πi

∫C+

2

etz

zdz = 0

12

Page 13: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

by CRT. The second integral is parametrised in exactly the same way but θ goes from π/2 to−π/2. So we get exactly the same integral as before apart from the limits have changed

limR→∞

∫ −π/2π/2

iReiθ

γ +ReiθetγetR cos θeitR sin θ dθ

and now cos θ > 0 but since t < 0 the exponential still decays at infinity and the integral is zero.So

1

2πi

∫ γ+i∞

γ−i∞

ezt

zdz = 0

for t < 0.

Figure 3: Semicircular contour completed to the right

E.g. 6.15: Compute

f(t) =1

2πi

∫ γ+i∞

γ−i∞

ept

(p− a)2dp.

Solution: Choose a > 0 so singularities lie to the left of vertical line passing through γ. For t < 0we form a closed contour C+

R to the right of γ as in the E.g. above and for exactly the samereasons,

1

2πi

∫ γ+i∞

γ−i∞

ept

(p− a)2dp = 0.

For t > 0, the contour C−R is chosen and the contribution from the large semi-circle is still zero bythe arguments used in the previous E.g. so

1

2πi

∫ γ+i∞

γ−i∞

ept

(p− a)2dp = Res

(ept

(p− a)2; p = a

).

We have a pole of order two so the RHS is

1

(2− 1)!

d

dpept∣∣∣∣p=a

= teat.

This confirms L−1[1/(p− a)2] by shifting L−1[1/p2] = t.

13

Page 14: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Q: What about, for e.g.

L−1[

1

p1/2

]=

1

2πi

∫ γ+i∞

γ−i∞

ept√p

dp ?

A: The square-root function is not analytic. We need to know about branch cuts and branchpoints. This needs a bit of revision.

Definition 6.6 A branch point of w(z) is a point, z0, such that the function is discontinuouswhen undergoing an arbitrarily small circuit around z0.

E.g. 6.16: log(z) has a branch point at z = 0. Why ?

Well we write z = reiθ and then

log(z) = log(reiθ) = log(r) + log(eiθ) = log(r) + iθ

and this takes different values when θ is replaced by θ + 2π after landing on the same value of z.We say log(z) is multi-valued.

Proposition: w(z) has a branch point at infinity if w(1/z) has a branch point at z = 0.

E.g. 6.16a: log(z) has a branch point at z =∞ since log(1/z) = − log(z) has a branch point atz = 0.

Definition 6.7 Multi-valued functions (such as log) with branch points can be made into single-valued functions by introducing branch cuts along the discontinuity of the complex function.

E.g. 6.16b:

For log(z) we can place a branch cut along the negative real axis if restrict θ to the domain (−π, π).

Now the function is single valued. If we approach z = −r on the negative real axis from above thecut then

log(z) = limθ→π{log(reiθ)} = log r + iπ

and if approach from below the result is

log(z) = limθ→−π

{log(reiθ)} = log r − iπ.

Notes:

• This isn’t the only choice of branch cut. Any line connecting z = 0 to z = ∞ will act tomake the function log(z) single valued.

• We often choose the branch cut which makes our algebra easy.

• Branch cuts often, but not always, connect branch points.

14

Page 15: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

E.g. 6.17: Consider

w(z) =√z.

Let z = reiθ. Then w(z) = r1/2eiθ/2 and it’s clear that w(z) fails to return to its original value asθ → θ + 2π.

Also, w(1/z) = 1/√z = r−1/2e−iθ/2 and this suffers the same fate; so z =∞ is a branch point.

As before√z can be made single-valued by placing a branch cut between z = 0 and z =∞, and

this is most conveniently done along the −ve real axis.

Figure 4: Branch cut example

E.g. 6.18: Consider

w(z) =√z2 − 1 =

√(z − 1)(z + 1).

Possible branch points are z = 1, z = −1 and z =∞. Let’s check

• Near z = 1 let z = 1 + r1eiθ1 . Then w(z) =

√r1eiθ1(2 + r1eiθ1) ≈

√2r

1/21 eiθ1/2 for small r1.

So w(z) is multi-valued and there is a branch point at z = 1

• Near z = −1 let z = −1 + r2eiθ2 and repeat the same arguments: there is a branch point at

z = −1.

• w(1/z) =√

1/z2 − 1 =√

1− z2/z and this has no branch point at z = 0 (it has a pole andbranch points elsewhere, but we’re not looking for those).

Using both local coordinates (r1, θ1), (r2, θ2) to describe a point z in the complex plane in definitionof w(z) we have

w(z) = r1/21 r

1/22 ei(θ1+θ2)/2

and r1 and r2 are fixed, but we can choose the range of values that θ1, θ2 take. If we choose

θ1 ∈ (−π, π), θ2 ∈ (−π, π)

it follows that w(z) is only discontinuous across the real z-axis from z = −1 to z = +1 (this isour branch cut) and is continuous (and analytic) everywhere else.

Note: We can make branch cuts anywhere depending on how we choose the domains of θ1, θ2.The branch points at z = −1 and z = +1 are always connected by infinity !

15

Page 16: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Figure 5: Possible branch cuts for√z2 − 1

E.g. 6.19: Back to our problem: calculate

L−1[

1

p1/2

]=

1

2πi

∫ γ+i∞

γ−i∞

ept√p

dp

γ > 0 and the integrand has branch points at p = 0 and p = ∞. We cannot push the branchcut to along the positive real p-axis as this changes the definition of the integral we are lookingfor. We choose for simplicity to run the branch cut along the negative real p-axis from p = 0 toinfinity.

In order to use CRT, we need the integrand to be analytic inside the closed contour, so cannotinclude the branch cut. We choose the “keyhole” contour (shown in Fig. 6) where C−R = C1 ∪C2 ∪ C3 ∪ C4 ∪ C5 ∪ C6 is “shrunk” onto the branch cut.

This contour is chosen to make the final result as simple as possible.

First, since there are no poles in C−R ∫C−R

etp√p

dp = 0

by CRT. In other words∫ γ+i∞

γ−i∞

etp√p

dp = limR→∞

∫C1

etp√p

dp = − limR→∞

∫C2∪C3∪C4∪C5∪C6

etp√p

dp.

We have already shown that

limR→∞

{∫C2

+

∫C6

}= 0.

This leaves C3, C5 and C4. Let’s do the latter first. On C4 let p = εeiθ where θ goes from θ = π

16

Page 17: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Figure 6: Integration contour

to θ = −pi and ε is the radius of the circle. Now p′(θ) = iεeiθ dθ so∫C4

etp√p

dp =

∫ −ππ

exp{tεeiθ}ε1/2eiθ/2

iεeiθ dθ = −iε1/2∫ π

−πexp{tεeiθ}eiθ/2 dθ → 0

as ε→ 0, which is useful.

Now look at C3. We parametrise this curve by writing p = reiπ = −r for r from R→∞ to ε→ 0(the choice of argument means we are above the cut). Now p′(r) = −1 so∫

C3

etp√p

dp =

∫ ε

R

e−tr

r1/2eiπ/2(−dr) = −i

∫ ∞0

e−rt√r

dr

in the limit.

Finally, C5: now p = re−iπ = −r where r starts at ε→ 0 and ends at R →∞ (now we are belowthe cut). So p′(r) = −1 and∫

C5

etp√p

dp =

∫ R

ε

e−tr

r1/2e−iπ/2(−dr) = −i

∫ ∞0

e−rt√r

dr

in the limit.

This is the same as C3 and so they “double up”.

Finally, we have

1

2πi

∫ γ+i∞

γ−i∞

etp√p

dp = − 1

2πi

(−2i

∫ ∞0

e−rt√r

dr

)=

1

π

∫ ∞0

e−rt√r

dr.

Phew !

Note: We can go further by making the substitution rt = s2 the RHS integral is

2

π

∫ ∞0

e−s2

√t

ds =2

π√t.1

2

√π.

In other words we have shown that L−1[1/√p] = 1/√πt (agrees with PS6Q3a).

17

Page 18: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

7 Green’s functions

There are many practical application areas governed by linear ODEs/PDEs in which the differentialoperator which acts on the dependent variable is fixed but the forcing/RHS term is not and/orthe BCs may include inhomogeneities.

Let us start by considering ODEs... the connection to PDEs will be made later.

7.1 Motivation

Consider solving an ODE posed as

(Lu)(x) = f(x), a < x < b (5)

where L is a differential operator (e.g. if L = d2/dx2 then above is u′′(x) = f(x)) with, say,u(a) = 0, u(b) = 0. These are called homogeneous Dirichlet boundary conditions.

Now assume we can find a function g(x; ξ) (this means x is the “primary variable” and ξ is actsas a “auxiliary variable”) which solves

(Lg)(x; ξ) = δ(x− ξ), a < x, ξ < b (6)

with g(a; ξ) = g(b; ξ) = 0 for a < ξ < b.

If we suppose

u(x) =

∫ b

a

g(x; ξ)f(ξ) dξ, a < x < b (7)

then

(Lu)(x) =

∫ b

a

(Lg)(x; ξ)f(ξ) dξ =

∫ b

a

δ(x− ξ)f(ξ) dξ = f(x)

and hence (5) is satisfied. Also from (7)

u(a) =

∫ b

a

g(a; ξ)f(ξ) dξ = 0

and similarly u(b) = 0. I.e. (7) is the solution of the ODE/BCs which holds for any RHS termf(x).

Notes:

• We can think of

(Gf)(x) =

∫ b

a

g(x; ξ)f(ξ) dξ

is an the inverse of L in the sense that (LGf)(x) = (GLf)(x) = f(x)

• g(x; ξ) is called a Green’s function.

• There are a few details we need to iron out and then we will see how to construct g.

18

Page 19: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

7.2 Boundary-value problems for ODEs

A boundary-value problem is a differential equation equipped with BCs.

We specifically consider 2nd order linear ODEs:

(Lu)(x) ≡ r(x)u′′(x) + s(x)u′(x) + t(x)u(x) = f(x) (8)

for a < x < b (a and/or b can be infinite) and r(x), s(x), t(x) and f(x) are all given. We requirer(x) 6= 0 in (a, b).

Additionally u(x) will satisfy two BCs:

B1u = c1, B2u = c2

and B1, B2 involves a linear combination of u(x) and u′(x) evaluated at the end points a and b.

For e.g., B1u = u(a), B2u = u′(b) are of Dirichlet and Neumann type (respectively) and aretypical (e.g. APDE2), but the notation allows for the more general conditions

Biu = αiu(a) + βiu′(a) + γiu(b) + δiu

′(b)

(i = 1, 2) which accommodate periodic boundary conditions,

u(a)− u(b) = u′(a)− u′(b) = 0.

7.3 Adjoint operators

With L defined by (8) take the pair of twice continuously-differentiable functions v(x) and w(x)in the combination∫ b

a

v(x)(Lw)(x) dx = [rvw′ + svw]ba −

∫ b

a

((rv)′w′ + (sv)′w − tvw

)dx

=[rvw′ − (rv)′w + svw

]ba

+

∫ b

a

((rv)′′ − (sv)′ + tv

)w(x) dx (9)

after integrating by parts twice. We let the differential operator L∗ be defined by

(L∗v)(x) = (rv)′′ − (sv)′ + tv ≡ r(x)v′′(x) + (2r′(x)− s(x))v′(x) + (r′′(x)− s′(x) + t(x))v(x)

Definition 7.1 The integral relation between L and L∗ is called Green’s formula.

Definition 7.2 L∗ is called the adjoint of L.

If L∗ = L then we say L is self-adjoint (L = d2/dx2 is such an example).

If L∗ 6= L and then L is said to be non self-adjoint2

2In most textbooks on Green’s functions for ODEs, the next step would be to show that all 2nd order differentialequations can be reduced to self-adjoint form. This simplifies the issue of adjoints, but I’ve found the immediatebenefit of this is offset by lots of later befuddlement so my presentation of this subject is relatively singular.

19

Page 20: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

7.4 Adjoint boundary conditions

Momentarily, assume w satisfies the homogeneous BCs: B1w = 0, B2w = 0.

Definition 7.3 The adjoint boundary conditions are defined by B∗1v = 0, B∗2v = 0 such thatthe bracket [

rvw′ − (rv)′w + svw]ba

in (9) vanishes.

Note: the definition of L∗ and B∗1 , B∗2 are designed precisely such that∫ b

a

v(x)(Lw)(x) dx =

∫ b

a

w(x)(L∗v)(x) dx. (10)

E.g. 7.1:

Consider L ≡ d2

dx2+

d

dxand B1u = u(a), B2u = u′(b).

Then, following §7.2, we derive Green’s formula for this L∫ b

a

v(x)(Lw)(x) dx = [v(x)w′(x) + v(x)w(x)]ba −

∫ b

a

dv

dx

dw

dx+

dv

dxw(x) dx

=[v(x)w′(x) + w(x)

(v(x)− v′(x)

)]ba

+

∫ b

a

(d2v

dx2− dv

dx

)w(x) dx (11)

after integrating by parts twice and we identify L∗ =d2

dx2− d

dxas the adjoint operator and the

definition B∗1v = v(a), B∗2v = v(b)− v′(b) ensures the bracketed term vanishes.

7.5 Definition and application of Green’s functions

We define the Green’s function g(x; ξ) to satisfy the ODE

(Lg)(x; ξ) = δ(x− ξ)

and the homogeneous BCs: B1g = 0, B2g = 0.

We also define a function g∗(x; ξ) satisfying the adjoint problem

(L∗g∗)(x; ξ) = δ(x− ξ)

with B∗1g∗ = 0, B∗2g

∗ = 0. We call g∗ the adjoint Green’s function.

We can use (10)3 with w ≡ g(x; ξ), v ≡ g∗(x; ξ1)∫ b

a

g∗(x; ξ1) (Lg)(x; ξ)︸ ︷︷ ︸=δ(x−ξ)

dx =

∫ b

a

g(x; ξ) (L∗g∗)(x; ξ1)︸ ︷︷ ︸=δ(x−ξ1)

dx

3Green’s formula can be applied to functions like g, g∗ in spite of not being twice ctsly diff. (proof omitted –but see Trim’s book for e.g.)

20

Page 21: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

and so

g∗(ξ; ξ1) = g(ξ1; ξ)

or, recycling variables,

g∗(x; ξ) = g(ξ;x) (12)

This is an important reciprocity relation: it means we don’t need to compute the adjoint Green’sfunction !

Note: If L = L∗ and Bi = B∗i then g = g∗ and (12) says that the Green’s function is symmetric:g(x; ξ) = g(ξ;x).

7.5.1 Application to solution of the ODE

Return to the original inhomogeneous problem for u(x):

(Lu)(x) = f(x) for a < x < b with B1u = c1, B2u = c2.

We put w(x) ≡ u(x) and v(x) ≡ g(ξ;x) (note variables reversed) into (9) which now reads∫ b

a

g(ξ;x) (Lu)(x)︸ ︷︷ ︸=f(x)

dx =

[terms including u(x), u′(x), g(ξ;x),

d

dxg(ξ;x)

]ba

+

∫ b

a

u(x)(L∗g)(ξ;x) dx

(remember that ξ is an auxiliary variable and integration, differentiation and substitution of limitsapply to the primary variable, x.)

From (12) (L∗g)(ξ;x) = (L∗g∗)(x; ξ) = δ(x− ξ) and so it follows that the last integral is u(ξ) andso

u(ξ) =

∫ b

a

g(ξ;x)f(x) dx−[terms including u(x), u′(x), g(ξ;x),

d

dxg(ξ;x)

]ba

represents the solution in terms of the Green’s function, g.

Assertion: By construction, the BCs associated with u and those chosen to be satisfied by gensure the bracketed terms exclude unknown values of u(x) and so the equation above representsthe explicit solution of the problem. A proof of this with general r, s, t accounting for generalBCs is algebraically messy; see examples instead.

Note: We can recover the “outline result” in §7.1 by swapping variables x ↔ ξ and since thebracketed term vanishes in this case.

7.6 Constructing a Green’s function

We want to solve (Lg)(x; ξ) = δ(x− ξ), a < x, ξ < b. and note that since δ(x− ξ) = 0 if x 6= ξ

(Lg)(x; ξ) = 0

{a < x < ξξ < x < b

21

Page 22: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Let g = g−(x; ξ) in a < x < ξ and let g = g+(x; ξ) in ξ < x < b and we

solve the homogeneous ODE (Lg±) = 0 with two BCs supplied by B1 and B2.

Because g± generate four unknown constants (e.g. examples below) two extra conditions areneeded and we return to (8):

r(x)d2

dx2g(x; ξ) + s(x)

d

dxg(x; ξ) + t(x)g(x; ξ) = δ(x− ξ). (13)

Suppose g were discontinuous at x = ξ. Then near x = ξ, we could write g ∼ α + βH(x − ξ)where H(·) is the Heaviside function. Then g′(x; ξ) ∼ βH ′(x− ξ) = βδ(x− ξ) and g′′(x; ξ) wouldbe more singular than δ(x− ξ) and would not balance the RHS of (13).

We conclude that g must be continuous at x = ξ and so

g−(ξ; ξ) = g+(ξ; ξ) (14)

is our first matching condition. Now return to (13) and integrate from x = ξ − ε to x = ξ + ε∫ ξ+ε

ξ−εr(x)

d2

dx2g(x; ξ)dx+

∫ ξ+ε

ξ−εs(x)

dg

dx+ t(x)g(x; ξ) dx =

∫ ξ+ε

ξ−εδ(x− ξ) dx

which gives, after integrating by parts

[r(x)g′(x; ξ)]ξ+εξ−ε +

∫ ξ+ε

ξ−ε(s(x)− r′(x))

dg

dx+ t(x)g(x; ξ) dx = 1

As ε→ 0 the remaining integrals vanish and we have a second matching condition(dg+

dx− dg−

dx

)x=ξ

=1

r(ξ). (15)

7.7 Examples

E.g. 7.2: A self-adjoint problem

Basic problem with all the steps. Consider solving the ODE

u′′(x) = f(x), 0 < x < 1

with u(0) = 0, u′(1) = 1. So L = d2/dx2.

Step 1. Establish Green’s formula for the problem:∫ 1

0

v(x)w′′(x) dx =[v(x)w′(x)− w(x)v′(x)

]10

+

∫ 1

0

v′′(x)w(x) dx

so L = L∗ and B∗1v = v(0), B∗2v = v′(1) so B∗i = Bi and we note that the problem is self-adjoint.

22

Page 23: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Step 2. Find g. We define the Green’s function g(x; ξ) to satisfy

(Lg) =d2

dx2g = δ(x− ξ)

with g(0; ξ) = 0, g′(1; ξ) = 0. Letting g = g− for x < ξ and g = g+ for x > ξ and solving Lg± = 0gives:

g−(x; ξ) = A+Bx, and g+(x; ξ) = C +Dx

and applying g−(0; ξ) = 0 implies A = 0, and applying g+′(1; ξ) = 0 implies D = 0, so

g− = Bx and g+ = C.

Now match at x = ξ: g−(ξ; ξ) = g+(ξ; ξ) means C = Bξ. Finally the second matching conditiong+′ − g−′ = 1/1 implies 0−B = 1. So we have determined B = −1 and C = Bξ.

Therefore

g(x; ξ) =

{−x, x < ξ−ξ, ξ < x

and g(ξ;x) = g(x; ξ) (symmetry for self-adjoint problems).

Step 3. Use w ≡ u and v ≡ g(ξ;x) (= g(x; ξ)) in Green’s formula from Step 1:∫ 1

0

g(x; ξ) (Lu)︸︷︷︸=f(x)

dx = (u′(1)g(1; ξ)−u(1)g′(1; ξ))−(u′(0)g(0; ξ)−u(0)g′(0; ξ))+

∫ 1

0

u(x) (Lg)(x; ξ)︸ ︷︷ ︸=δ(x−ξ)

dx

and using the BCs for u and defn for g we have

u(ξ) = ξ +

∫ ξ

0

(−x)f(x) dx+

∫ 1

ξ

(−ξ)f(x) dx.

E.g. 7.3: A non self-adjoint problem

Consider4

(Lu)(x) = u′′(x) + u′(x) = f(x), 0 < x < 1

with u(0) = c1 and u′(1) = c2.

Step 1. Green’s formula (already worked out in E.g. 7.1) is∫ 1

0

v(x)(Lw)(x) dx =[v(x)w′(x) + w(x)

(v(x)− v′(x)

)]10

+

∫ 1

0

(L∗v)(x)w(x) dx (16)

where L∗ = d2/dx2 − d/dx (non self-adjoint).

Step 2. Construct the Green’s function g(x; ξ) satisfying (Lg) = δ(x−ξ) and g(0; ξ) = g′(1; ξ) = 0.First solve then homogeneous ODE for g±:

d2

dx2g± +

d

dxg± = 0

4Both E.g. 7.2 and E.g. 7.3 are terrible examples of the use of Green’s functions since it’s possible to solve theBVP directly without Green’s functions. See Appendix B

23

Page 24: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

integrates tod

dxg± + g± = A

and this integrates (using integrating factors) to

g± = A+Be−x

I.e. writeg− = A+Be−x, x < ξ, and g+ = C +De−x, x > ξ.

We apply the BCs so that g−(0; ξ) = 0 means B = −A and (d/dx)g+(1; ξ) means D = 0 and sonow

g− = A(1− e−x), and g+ = C.

Applying first matching g−(ξ; ξ) = g+(ξ; ξ) gives C = A(1 − e−ξ) and the second matching gives(r(x) = 1 here)

−Ae−ξ = 1

or A = −eξ which implies C = 1− eξ and so

g(x; ξ) =

{eξ(e−x − 1), x < ξ,(1− eξ), x > ξ.

We switch the variables x↔ ξ so that

g(ξ;x) =

{(1− ex), x < ξ,ex(e−ξ − 1), x > ξ.

Step 3. Use v(x) = g(ξ;x) and w(x) = u(x) in Green’s formula (Step 1.)∫ 1

0

g(ξ;x) (Lu)︸︷︷︸=f(x)

dx =[g(ξ;x)u′(x) + u(x)

(g(ξ;x)− (d/dx)g(ξ;x)

)]10

+

∫ 1

0

u(x)δ(x− ξ) dx

since (L∗g)(ξ;x) = (L∗g∗)(x; ξ) = δ(x− ξ). Use with information from the BCs on u to give

u(ξ) =

∫ 1

0

g(ξ;x)f(x) dx−[c2e(e−ξ − 1) + u(1)[0]− 0u′(0) + c1[(1− e0)− (−e0)]

simplifying to

u(ξ) =

∫ ξ

0

(1− ex)f(x) dx+ (e−ξ − 1)

∫ 1

ξ

exf(x) dx+ c1 − (e1−ξ − e)c2.

E.g. 7.4: An initial-value problem (IVP)

Consider the ODE (t indicative of time variable)

d2y

dt2+ ω2y = f(t), t > 0

24

Page 25: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

with y(0) = 1, y′(0) = 0. So L = d2/dt2 + ω2.

Step 1. Green’s formula ∫ ∞0

v(Lw) dt =[vw′ − wv′

]∞0

+

∫ ∞0

w(Lv) dt

after integrating by parts twice. So note L∗ = L but B∗1v = v(∞), B∗2 = v′(∞) implies the problemis non self-adjoint.

Step 2. The Green’s function g satisfies (Lg)(t; τ) = δ(t − τ), and we let g = g− for t < τ wherewe solve (Lg−) = 0 to give

g− = A sinωt+B cosωt

and g−(0; τ) = 0, g−′(0; τ) = 0 gives A = B = 0. So g− ≡ 0.

For t > τ we let g = g+ and solve (Lg+) = 0 to give

g+(t; τ) = C sinωt+D cosωt.

Matching gives g+(τ ; τ) = 0 and dg+/dt|t=τ = 1/r(τ) = 1. So (after a bit of algebra)

g+(t; τ) =sinω(t− τ)

ω.

In other words

g(t; τ) =

{sinω(t− τ)/ω, t > τ0, t < τ

Reversing variables gives

g(τ ; t) =

{0, t > τsinω(τ − t)/ω, t < τ.

Step 3. Finally, using Green’s formula (Step 1) with w = y and v = g(τ ; t)∫ ∞0

g(τ ; t) (Ly)(t)︸ ︷︷ ︸=f(t)

dt = [y′(t)g(τ ; t)− y(t)(d/dt)g(τ ; t)]∞0 +

∫ ∞0

y(t) (Lg)︸︷︷︸δ(t−τ)

dt.

The upper limits equate to zero from the definition of g and so

y(τ) =

∫ τ

0

sinω(τ − t)ω

f(t) dt+ cosωτ

(agrees with PS6, Q11 !)

7.8 Green’s functions for PDEs

Broad subject area with largely bespoke methods depending on the problem being solved. Thesame principles apply however. We demonstrate this with a single example !

25

Page 26: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

E.g. 7.5: The forced wave equation

Consider the forced wave equation for u(x, t)

(Lu)(x, t) ≡ utt − c2uxx = f(x, t), −∞ < x <∞, t > 0 (17)

with ICs of u(x, 0) = ut(x, 0) = 0 and u(x, t)→ 0 as x→ ±∞.

Step 1. We first need to extend Green’s formula (8) by integrating it over both time 0 < t < ∞and space −∞ < x <∞ thus:∫ ∞

0

∫ ∞−∞

v(x, t)(Lw)(x, t) dxdt =

∫ ∞−∞

[∫ ∞0

vwtt dt

]dx− c2

∫ ∞0

[∫ ∞−∞

vwxx dx

]dt

=

∫ ∞−∞

[vwt − wvt]t=∞t=0 dx− c2∫ ∞0

[vwx − wvx]x=∞x=−∞ dt

+

∫ ∞0

∫ ∞−∞

w(x, t)(Lv)(x, t) dxdt

after integrating by parts in t for the first term and by parts in x for the second. Thus L isself-adjoint (but the BCs/ICs are not).

Step 2. We follow the approach developed for ODEs define a Green’s function by

(Lg)(x, t; ξ, τ) = δ(x− ξ)δ(t− τ) (18)

satisfying the conditions g(x, 0; ξ, τ) = ∂tg(x, 0; ξ, τ) = 0 and g → 0 as x→ ±∞.

Let’s find g(x, t; ξ, τ) by taking FTs of (18) w.r.t. time x:

gtt(k, t; ξτ) + k2c2g = δ(t− τ)eikξ

where g(k, t; ξ, τ) = F{g(x, t; ξ, τ)}. We also preserve the ICs as g(k, 0; ξ, τ) = gt(k, 0; ξ, τ) = 0. Ifwe write g = eikξG and ω2 = k2c2 then

Gtt + ω2G = δ(t− τ)

with G = Gt = 0 at t = 0. Our ODE problem E.g. 7.3 !! Solution:

g(k, t; ξ, τ) =

{eikξ sin kc(t− τ)/kc, t > τ0, t < τ

}≡ H(t− τ)

sin kc(t− τ)

kc.

Now we invert the FT

g(x, t; ξ, τ) = H(t− τ)1

∫ ∞−∞

sin kc(t− τ)

kce−ik(x−ξ) dk

and this is a standard5 result from FTs

g(x, t; ξ, τ) =1

2cH(t− τ)H(c(t− τ)− |x− ξ|) =

1

2cH(c(t− τ)− |x− ξ|)

5APDE2, Methods

26

Page 27: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

(the first Heaviside is made redundant by the second one.) We swap the variables (x, t) ↔ (ξ, τ)to give the function

g(ξ, τ ;x, t) =1

2cH(c(τ − t)− |x− ξ|)

and note this is zero for t > τ .

Step 3. Using w ≡ u and v ≡ g(ξ, τ ;x, t) in Green’s formula (Step 1.) gives∫ ∞0

∫ ∞−∞

g(ξ, τ ;x, t) (Lu)︸︷︷︸=f(x,t)

dx dt =

∫ ∞0

∫ ∞−∞

u(x, t)δ(x− ξ)δ(t− τ) dx dt

since the BCs and ICs and definition of g are zero at all the limits by construction and (Lg)(ξ, τ ;x, t) =(Lg)(x, t; ξ, τ) = δ(x− ξ)δ(t− τ). Thus,

u(ξ, τ) =1

2c

∫ τ

0

∫ ∞−∞

H(c(τ − t)− |x− ξ|)f(x, t) dx dt.

Note: There are other methods of deriving this result (e.g. LTs instead of FTs, or can LT andFT without the need for a Green’s function.)

27

Page 28: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

8 Similarity Solutions

8.1 Introduction

In keeping with the methods for PDEs in this course, this is a technique in which PDEs can bereduced to ODEs.

Consider a PDE for u(x, t) under the scaling of the dependent and independent variables

(x, t, u)→ (x/L, t/L1/a, u/Lb)

for constants L, a, b. If the PDE that results can be made independent of L by a suitable choiceof a, b then the PDE is called self-similar.

With some arguments that go beyond the scope of this course, this process can be reduced tolooking for solutions expressed in the form

u(x, t) = t−bU(x/ta) (19)

with a, b chosen s.t. the PDE is reduced to an ODE for U(ξ) (where ξ = x/ta) only; ξ is calledthe similarity variable.

8.2 Example (heat equation)

Considerut = Duxx, t > 0 (20)

for D > 0. From (19) we have

ut = −bt−b−1U(x/ta)− xat−b−a−1U ′(x/ta)

withux = t−b−aU ′(x/ta), uxx = t−b−2aU ′′(x/ta).

Putting these into (20) gives

−bt−b−1U(x/ta)− xat−b−a−1U ′(x/ta) = Dt−b−2aU ′′(x/ta)

multiply by tb+1 and let ξ = x/ta to get

−bU(ξ)− aξU ′(ξ) = Dt1−2aU ′′(ξ).

This needs to be independent of t for the method to work and we can do this by choosing a = 12.

So (20) has been transformed to

DU ′′(ξ) + 12ξU ′(ξ) + bU(ξ) = 0 (21)

Note: b is arbitrary. Not a problem as we haven’t supplied an IC. It is typical that such problemscome with additional conditions/constraints which fix these constants.

28

Page 29: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

E.g. 8.1: Consider (20) holds in x > 0 with IC

u(x, 0) = 0, x > 0

and BCsu(0, t) = T, and u(x, t)→ 0 as x→∞

for t > 0. In terms of transformed variables, these conditions look like

limt→0{t−bU(x/t1/2)} = 0

t−bU(0) = T, U(ξ)→ 0, ξ →∞

for t > 0. The only we can satisfy the 2nd of these is if b = 0 whereupon U(0) = T .

Since b = 0, (21) isDU ′′(ξ) + 1

2ξU ′(ξ) = 0

which is 2nd order in U but 1st order in U ′. I.e. we write

d

dξU ′(ξ) +

ξ

2DU ′(ξ) = 0

and the integrating factor is exp{∫ ξξ′/2D dξ′} = exp{ξ2/4D} and so we write the above as

d

(U ′(ξ)eξ

2/4D)

= 0

which givesU ′(ξ) = Ae−ξ

2/4D.

Integrate again to get

U(ξ) = B + A

∫ ξ

0

e−s2/4D ds

and using the BC U(0) = T means B = T . Using the other BC U(ξ)→ 0 as ξ →∞ gives

0 = T + A

∫ ∞0

e−s2/4D ds = T + A

√Dπ

from standard Gaussian integral result. So A = −T/√Dπ and the final solution is, after trans-

forming back to original variables

u(x, t) = t−0U(x/t1/2) = T − T√Dπ

∫ x/√t

0

e−s2/4D ds = T

(1− 2√

π

∫ x/√4Dt

0

e−v2

dv

)= T erfc{x/

√4Dt}.

E.g. 8.2: Consider the heat equation again

ut = Duxx, t > 0, x > 0

29

Page 30: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

but with a flux conditionux(0, t) = q

in addition to u(x, 0) = 0 for x > 0 and u(x, t)→ 0 as x→∞ as before.

In terms of transformed variables

ux(0, t) = t−b−aU ′(0) = t−b−1/2U ′(0) = q

for all t > 0 since a = 1/2. So we need b = −1/2 here. So now (21) is

2DU ′′(ξ) + ξU ′(ξ)− U(ξ) = 0

with U ′(0) = q and U(ξ)→ 0 as ξ →∞.

This is harder to solve and we need a trick: try U(ξ) = ξF (ξ) (left as an exercise).

8.3 Example (nonlinear diffusion)

Considerθt = (θ2θx)x, −∞ < x <∞, t > 0 (22)

with θ → 0 as x→ ±∞ for t > 0. A particular initial condition is θ(x, 0) = δ(x).

It is not always the case that particular ICs can be met. Instead the similarity solution method canbe used to find a long-time behaviour of the solution, by replacing the particular initial conditionsby a “weak” condition which includes the particular IC in mind.

From (22)d

dt

∫ ∞−∞

θ(x, t) dx =

∫ ∞−∞

θt dx =

∫ ∞−∞

(θ2θx)x dx =[θ2θx

]∞−∞ = 0

by the FTC. Integrating up we have∫ ∞−∞

θ(x, t) dx =

∫ ∞−∞

θ(x, 0) dx =

∫ ∞−∞

δ(x) dx = 1 (23)

(physically, heat is conserved) and this constraint replaces the IC.

We want to solve (22) using similarity solutions, let θ(x, t) = t−bF (x/ta) implies

θt = −bt−b−1F (x/ta)− axt−b−a−1F ′(x/ta)

andθx = t−b−aF ′(x/ta) ⇒ θ2θx = t−3b−aF 2(x/ta)F ′(x/ta)

and so(θ2θx)x = 2t−3b−2aF (x/ta)F ′2(x/ta) + t−3b−2aF 2(x/ta)F ′′(x/ta).

Put this in (22) to get

−bt−b−1F (x/ta)− xat−b−a−1F ′(x/ta) = t−3b−2a(2FF ′2 + F 2F ′′

).

30

Page 31: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Multiply by tb+1 and use ξ = x/ta to get

−bF − aξF ′ = t−2b−2a+1(2FF ′2 + U2U ′′

)(24)

We need to make this independent of t which requires

a+ b = 12.

This doesn’t fix either a or b, just a relation between them. For the other we transform (23) to

1 =

∫ ∞−∞

t−bF (x/ta) dx = ta−b∫ ∞−∞

F (ξ) dξ

after substitution ξ = x/ta. Since this holds for all t > 0 we have a = b and so a = b = 14.

Therefore (24) isF 2F ′′ + 2FF ′2 + 1

4(ξF ′ + F ) = 0 (25)

which doesn’t look pleasant, but (remarkably !?) it can be writtem

d

(F 2F ′

)+ 1

4

d

(ξF)

= 0

and integrates upF 2F ′ + 1

4ξF = A.

But from the condition θ → 0 as x → ±∞ transforms to t−1/4F (ξ) → 0 as ξ → ±∞ and so weneed A = 0. Then F = 0 is one solution and the other satisfies

F ′ = − ξ

4F

which we can integrate by separating vars:∫F dF = −1

4

∫ξ dξ

to give12F 2 = −1

8ξ2 +B

for some constant B. I.e. F 2 = 2B − 14ξ2.

However, this only makes sense if B > 0 and ξ2 < 8B and this solution will not extend to allvalues of x and t.

Since we need F to tend to zero at infinity and we have no information to suggest that F shouldbe anything but continuous, the complete similarity solution must defined in a piecewise fashion

F (ξ) =

{ √2B − 1

4ξ2, ξ2 < 8B

0, ξ2 > 8B

comprised of the two possible solutions found.

31

Page 32: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

It remains to determine B. This comes from applying

1 =

∫ ∞−∞

F (ξ) dξ =

∫ √8B−√8B

√2B − 1

4ξ2 dξ = 4B

∫ π/2

−π/2cos2 s ds = 2Bπ

after substituting ξ =√

8B sin s. So we conclude that 2B = 1/π and therefore

F (ξ) =

√π−1 − 1

4ξ2, ξ2 < 4/π

0, ξ2 > 4/π

or, in terms of the original variables,

u(x, t) =

{t−1/4

√π−1 − 1

4x2/√t, x2 < 4

√t/π

0, x2 > 4√t/π.

32

Page 33: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Appendix A: Miscellaneous results

Extra information, some of which we reference in the course.

A.1 Heaviside and delta functions

The Dirac delta function is defined by the properties

δ(x) = 0, x 6= 0

and ∫ b

−aδ(x)dx = 1

where a, b are positive real constants. In some definitions you will see δ(0) = ∞, but this isambiguous and misleading. The delta function should only be used in an integrated sense.

As a consequence of its definition the delta function operates as a sampling device, in the sensethat for any smooth function f(x), ∫ b

−af(x)δ(x)dx = f(0)

I.e. it “picks out” the value of the remainder of the integrand at the point where it is non-zero.This can be generalised to ∫ b

−af(x)δ(x− ξ)dx = f(ξ)

provided −a < ξ < b, otherwise the result is zero since the delta function vanishes over the rangeof integration.

Beyond this, it is easy to show from the definition that

δ(αx) = δ(x)/|α|,

that the function is even:δ(x) = δ(−x)

and that xδ(x) = 0 for all x. There are other neat results including

δ(x) =1

∞∑n=−∞

einx

and

δ(x) =1

∫ ∞−∞

eikxdk

whilst we can also consider derivatives of δ-functions since integrating the sampling property byparts gives ∫ ∞

−∞f(x)δ′(x)dx = −

∫ ∞−∞

δ(x)f ′(x)dx = f ′(0)

33

Page 34: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

A formal method for establishing these results is by defining the δ-function as a limit of a continuousfunction. For example, we can say that

δ(x) = limε→0{ηε(x)}

where

ηε(x) =

{1/(2ε), −ε < x < ε0, otherwise

or

ηε(x) = e−x2/2ε/√

2πε

(known as the “heat kernel” due to its relation to solutions of the heat equation). There are otherdefinitions that can be used.

The Heaviside step function is defined as

H(x) =

1, x > 012, x = 0

0, x < 0

Its relation to the signum function is

H(x) = 12(sgn(x) + 1)

where sgn(x) is −1, 0 or 1 if x is less than, equal to, or greater than zero. Its relation to the deltafunction is that

H(x) =

∫ x

−∞δ(s)ds

or that

δ(x) = H ′(x)

A.2 Error functions

The error function is defined by

erf(x) =2√x

∫ x

0

e−v2

dv

and has the properties that erf(0) = 0, erf(−x) = erf(x) and erf(x) → 1 as x → ∞. This latterresult is on account of the identity ∫ ∞

0

e−v2

dv =√π/2

which is half of the full result for the area under a Gaussian∫ ∞−∞

e−v2

dv =√π

34

Page 35: Mathematical Methods MATH30800marp/methods/... · E.g. 6.8: Find L[tsinat]. Since L[sinat] = a=(p2 + a2) (earlier E.g.) then L[tsinat] = d dp a p 2+ a 2ap (p2 + a2)2 6.4.3 Integrals

Related to the error function is the complementary error function which is defined as

erfc(x) = 1− erf(x) = 1− 2√x

∫ x

0

e−v2

dv =2√x

∫ ∞x

e−v2

dv

This function has the properties that erfc(0) = 1 erfc(−x) = 2−erfc(x) and erfc(x)→ 0 as x→ 0.By the FTC we have

d

dxerf(x) =

2√π

e−x2

Appendix B: A solution to an ODE

For interest only. In E.g. 7.3 we have to solve

u′′(x) + u′(x) = f(x), 0 < x < 1

with u(0) = c1 and u′(1) = c2. We can write the ODE as

d

dx

(ex

du

dx

)= exf(x)

and integrate subject to the condition u′(1) = c2 to get

exu′(x) =

∫ x

1

esf(s) ds+ c2e

Then

u′(x) = e−x∫ x

1

esf(s) ds+ c2e1−x

and we integrate again subject to u(0) = c1 to give

u(x) =

∫ x

0

e−t∫ t

1

esf(s) ds dt+ c1 − c2(e1−x − e)

Now integration by parts and the FTC gives

u(x) =

[−e−t

∫ t

1

esf(s) ds

]x0

+

∫ x

0

e−tetf(t) dt+ c1 − c2(e1−x − e)

which simplifies (reversing limits on integrals) to

u(x) = e−x∫ 1

x

esf(s) ds−∫ 1

0

esf(s) ds+

∫ x

0

f(t) dt+ c1 − c2(e1−x − e)

and finally we can partition the integral from 0 to 1 into two integrals from 0 to x and from x to1 to recover the solution we derived with Green’s functions

u(x) =

∫ x

0

(1− es)f(s) ds+ (e−x − 1)

∫ 1

x

esf(s) ds+ c1 − c2(e1−x − e).

35