You are on page 1of 10

PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I

Odd Term 2019


Dr. Anosh Joseph, IISER Mohali

LECTURE 29

October 29, 2019

DIFFERENTIAL EQUATIONS 6

Topics: Non-homogeneous equations - Green’s function method.

Finding solutions using Green’s function method


In the last lecture we looked at finding the most general solution of the homogeneous, linear second-
order ODE
y 00 + p(x)y 0 + q(x)y = 0. (1)

There are two independent solutions y1 (x) and y2 (x). The most general solution is a linear
combination of the two
y(x) = c1 y1 (x) + c2 y2 (x). (2)

We first looked at the Frobenius’ method to find the first solution y1 (x). In this method we
assumed a series solution of the form

X
y(x) = aλ xk+λ (3)
λ=0

and proceeded to get the indicial equation, the recurrence relations for coefficients aλ , and then
found the solution y1 (x) in a series form.
Then we looked at the Wronskian double integral method to obtain the second solution in terms
of the first solution. The second solution has the form
Z x  Rx 
exp − 2 p(x1 )dx1
y2 (x) = y1 (x) dx2 . (4)
[y1 (x2 )]2
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

Let us look at a method to find the solution when the differential equation is non-homogeneous,
that is, of the form
y 00 + p(x)y 0 + q(x)y = f (x), (5)

where f (x) is a source term or forcing function.


In this case, the solution will be

y(x) = c1 y1 (x) + c2 y2 (x) + yp (x), (6)

and the form of yp (x) will depend on the choice for the forcing function f (x).
The method we are interested in is known as the Green’s functions method1 . The concept of
Green’s functions (or Green functions) was introduced by the British mathematician George Green
(1793 - 1841) in a mathematical essay in 1828.
As a warm up, let us first consider the following differential equation

y 00 + x2 y = 0. (8)

We can introduce a differential operator L

d2
 
L= + x2 (9)
dx2

and then the differential equation can be represented by such an operator acting on a function

L y(x) = 0. (10)

The Green’s function, in this case, can be considered as the analogue of the inverse of L
−1
d2

0 −1
G(x, x ) ∼ L ∼ + x2 . (11)
dx2

The idea is that the Green’s function inverts the operator, so the inhomogeneous version of the
above, L y(x) = f (x), can be solved by the analogue of

y(x) ∼ L−1 f (x) ∼ G(x, x0 )f (x). (12)

Applying the above correspondence yields

L y(x) ∼ L G(x, x0 ) f (x) ∼ L L−1 f (x) = f (x). (13)


1
There exists another method, known as the variation of the parameters method. We will not derive this method.
The result is Z x Z x
y1 (s)f (s)ds y2 (s)f (s)ds
yp (x) = y2 (x) − y1 (x) , (7)
W {y1 (s), y2 (s)} W {y1 (s), y2 (s)}
where W {y1 (s), y2 (s)} is the Wronskian of y1 (s) and y2 (s).

2 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

In electrodynamics and quantum field theory Green’s functions make an appearance often.
There, the relevant differential operators are often difficult or impossible to solve exactly. However,
we can solve them perturbatively using Green’s functions.
In classical and quantum field theory, the Green’s function is often called the propagator or
two-point correlation function. The reason is that it is related to the probability of measuring a
field at one point say, x given that it is sourced at a different point say, x0 .

Definition of Green’s function

We can consider a Green’s function formally as the inverse of an arbitrary linear differential operator
L. It is a function of two variables, G(x, x0 ), satisfying the equation

L G(x, x0 ) = δ(x − x0 ), (14)

with δ(x − x0 ) denoting the Dirac delta function.


We can consider the function f (x) given in the non-homogeneous differential equation as a
source function. The solution to an arbitrary linear differential equation with source term

L y(x) = f (x) (15)

is given by Z
y(x) = G(x, x0 )f (x0 )dx0 . (16)

Then, upon using the property of the Dirac delta function


Z
f (x0 ) δ(x − x0 )dx0 = f (x), (17)

we have
Z
L y(x) = L G(x, x0 ) f (x0 )dx0
Z
= δ(x − x0 ) f (x0 )dx0
= f (x). (18)

Note that the Green’s functions, in general, are not functions but rather distributions. That
means that they can be integrated against functions. The integrals resulting from Green’s function
method may be difficult or impossible to compute analytically. However, they provide an immediate
solution to arbitrary linear differential equations when we may not be able to find a solution by
other methods.

3 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

Constructing Green’s function 1 - Direct integration method

We can express the solution to an arbitrary linear non-homogeneous differential equation in terms
of the Green’s function Z
y(x) = G(x, x0 )f (x0 )dx0 . (19)

Since the Green’s function solves

L G(x, x0 ) = δ(x − x0 ) (20)

and the delta function vanishes outside the point x = x0 , one method of constructing Green’s
functions is by solving the homogeneous linear differential equation

L G(x) = 0 (21)

and then imposing the correct boundary conditions at x = x0 to account for a delta function.
This process can be written more formally as follows. First step is to write down the general
form of the solutions on either side of x = x0

α y (x) + α y (x) if x < x0
1 1 2 2
G(x, x0 ) = (22)
β y (x) + β y (x) if x > x0 ,
1 1 2 2

where α1 , α2 , β1 , β2 are constants and y1 and y2 are the two solutions to the homogeneous version
of the given differential equation.
The second step is to impose the two boundary conditions. This fixes two of the constants
α1 , α2 , β1 , β2 in terms of the other two.
In the third step we impose continuity of G(x, x0 ) at x = x0 . This fixes one of the two remaining
constants.
In the fourth step we require that
 
dG 0
Change in slope at x is 1.
dx

That is, dG/dx increases by one at the delta function. This comes from integration of the
original differential equation around a small window on either side of x0 .
For example, in case of
y 00 + x2 y = f (x), (23)

4 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

the left hand side becomes


x0 + Z x0 +
d2 G
Z
LHS = 2
dx + x2 G(x, x0 )dx
x0 − dx x0 −
0 Z x0 +
dG x +
= + x2 G(x, x0 )dx
dx x0 − 0
x −
x0 +
dG
= +0
dx x0 −

dG
= ∆ . (24)
dx x=x0

and the right hand side is


Z x0 +
RHS = δ(x − x0 )dx
x0 −
= 1. (25)

This condition on the change in the derivative fixes the last constant and therefore solves for
the Green’s function.

Worked example 1

Let us consider the differential equation, which is the harmonic oscillator equation with a forcing
function f (t),
d2
y(t) + ω 2 y(t) = f (t), (26)
dt2
with the boundary conditions

dy
y(t = 0) = 0, and = 0. (27)
dt t=0

Let us write Z ∞
f (t) = f (t0 )δ(t − t0 )dt0 . (28)
0

That is, f (t) is made out of a sum of infinite number of delta functions with the weights f (t0 ) for
each t0 .
Suppose G(t, t0 ) is a solution of the differential equation Eq. (26)

d2
G(t, t0 ) + ω 2 G(t, t0 ) = δ(t − t0 ). (29)
dt2

Then, we can show that the solution y(t) of Eq. (26) is


Z ∞
y(t) = G(t, t0 )f (t0 )dt0 . (30)
0

5 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

Substituting Eq. (30) into the left hand side of Eq. (26) and using Eqs. (29) and (28) we find

d2
 
00 2 2
y (t) + ω y(t) = + ω y(t)
dt2
 2 Z ∞
d
= +ω 2
G(t, t0 )f (t0 )dt0
dt2 0
Z ∞  2  
d 0
= 2
+ ω 2
G(t, t ) f (t0 )dt0
dt
Z0 ∞
= δ(t − t0 )f (t0 )dt0
0
= f (t). (31)

Thus Eq. (30) is a solution to Eq. (26).


Let us solve Eq. (29) with the initial conditions
dy d
y(t) = G(t, t0 ) = 0, and = G(t, t0 ) = 0. (32)

dt t=0 dt

t=0 t=0 t=0

In order to simplify our steps let us set t0 = 0. Then

y(t) = 0, t = 0. (33)

This solution is certainly allowed since before we apply any force the oscillator is at rest.
When t > 0, there is again no force after t = 0, so we will have a solution of the form

y(t) = A sin ωt + B cos ωt, t > 0. (34)

The coefficients A and B will be determined by the f that is applied at t = 0.


At t = 0 we have y(t) = 0. This implies that B = 0. Thus we have

y(t) = A sin ωt. (35)

We have the change in slope


Aω cos ωt = 1. (36)

t=0

This gives
1
A= . (37)
ω
Thus we have
1
y(t) = sin ωt, t > 0. (38)
ω
That is, the forcing function δ(t) acting on the oscillator [see Eq. (29)] at rest converts the
oscillator motion to y(t) = 1
ω sin ωt. Generalizing this to the forcing function δ(t − t0 ) acting on an

6 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

oscillator at rest converts the oscillator motion to

1
y(t) = sin ω(t − t0 ), t0 < t, and t0 > 0. (39)
ω

Thus we have the Green’s function



0 0 < t < t0
G(t, t0 ) = (40)
 1 sin ω(t − t0 ) 0 < t0 < t.
ω

Then Eq. (30), through Eq. (40), gives the solution of Eq. (26)
Z ∞
y(t) = G(t, t0 )f (t0 )dt0
Z0 ∞ Z ∞
0 0 0 0 0 0

= G(t, t )f (t )dt + G(t, t )f (t )dt
0 t0 <t 0 t0 >t
Z ∞  Z ∞
1 0 0 0
0 0

= sin ω(t − t ) f (t )dt + 0 f (t )dt . (41)
0 ω t0 <t 0 t0 >t

The second term is zero since G(t, t0 ) = 0 when t0 > t. Thus we have the solution to the non-
homogeneous equation given in Eq. (26)
Z t
1
y(t) = sin ω(t − t0 )f (t0 )dt0 . (42)
0 ω

In Eq. (42) we have arbitrary forcing function f (t). We can think that f (t) is made of a linear
sum of delta functions with appropriate weights. Around a point t0 the delta function has strength
f (t0 ). Then, if we add up such delta functions, we should get the function f . That is,
Z ∞
f (t) = dt0 f (t0 )δ(t − t0 ). (43)
0

We should take the solution y(t) generated by each such delta function, and add them up. Since
the delta function at t0 has strength f (t0 ), instead of strength unity, we should multiply the solution
y(t) = 1
ω sin ω(t − t0 ) by f (t0 ). The solution y(t) at t should take into account the effect of all delta
functions at t0 < t, but not those at t0 > t. Taking all these into account we get the solution given
in Eq. (42).

Worked example 2

In using Green’s functions in three-dimensional problems (for example, in electromagnetism), we


usually want a solution which is zero on the boundary of some region.
Let us see how we can compute the Green’s function in such cases using an example. Let us
try to find the solution of
y 00 + y = f (x), (44)

7 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

such that y = 0 at x = 0 and x = π/2.


A physical interpretation of this problem is a string stretched along the x axis from x = 0 to
x = π/2, and then it is caused to vibrate by a force proportional to

−f (x) sin ωt,

then |f (x)| in Eq. (44) gives the amplitude of small vibrations.


Let us first find a solution of

d2
G(x, x0 ) + G(x, x0 ) = δ(x − x0 ), (45)
dx2

satisfying G(0, x0 ) = G( π2 , x0 ) = 0. This solution is the Green’s function for our problem.
Then Z π/2
y(x) = G(x, x0 )f (x0 )dx0 (46)
0

gives a solution of Eq. (44) satisfying the conditions y(0) = y( π2 ) = 0.


To construct the desired Green’s function, we first note that for any x 6= x0 , Eq. (45) becomes

d2
G(x, x0 ) + G(x, x0 ) = 0, x 6= x0 . (47)
dx2

The solutions of Eq. (47) are sin x and cos x. We observe that sin x = 0 at x = 0 and cos x = 0
at x = π/2.
Thus we try to find a Green’s function of the form

A(x0 ) sin x 0 < x < x0 < π
G(x, x0 ) = 2
(48)
B(x0 ) cos x 0 < x0 < x < π
2.

The next step may be clarified by thinking about the string problem.
If the string is oscillated by a concentrated force at x0 , then the amplitude of the vibration given
by Eq. (48). It is shown in Fig. 1.
At x = x0 , G(x, x0 ) is continuous, that is from Eq. (48)

A(x0 ) sin x0 = B(x0 ) cos x0 . (49)

However the slope changes abruptly at x0 . From Eq. (48) we find



d A(x0 ) cos x x < x0
G(x, x0 ) = (50)
dx −B(x0 ) sin x x > x0 .

Change in dG
dx at x0 is
−B(x0 ) sin x0 − A(x0 ) cos x0 .

8 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

G(x, x′)

0 x′ π
2

Figure 1: The vibrating string under a concentrated force imparted at the point x0 .

We can evaluate this change in dG/dx by integrating Eq. (45) from x = x0 −  to x = x0 + 


and letting  → 0.
Since
d2 G
Z
dG
2
= ,
dx dx
we find 0 Z x0 + Z x0 +
dG x + 0
+ G(x, x )dx = δ(x − x0 )dx = 1,
dx x0 − 0
x − 0
x −

or letting  → 0:  
dG
Change in slope at x0 is 1.
dx
Computing the change in slope, and equating it to 1, we get

−B(x0 ) sin x0 − A(x0 ) cos x0 = 1. (51)

We solve Eq. (49) and Eq. (51) for A(x0 ) and B(x0 ) and get

A(x0 ) = − cos x0 , B(x0 ) = − sin x0 . (52)

Thus we have 
− cos x0 sin x 0 < x < x0 < π
G(x, x0 ) = 2
(53)
− sin x0 cos x 0 < x0 < x < π
2.

9 / 10
PHY310 - MATHEMATICAL METHODS FOR PHYSICISTS I Odd Term 2019

Then from Eq. (46) the solution of Eq. (44) with y(0) = y( π2 ) = 0 is
π
Z x Z
2
0 0 0
y(x) = − cos x (sin x )f (x )dx − sin x (cos x0 )f (x0 )dx0 . (54)
0 x

Question: electromagnetic waves in a lasing cavity

Consider a one-dimensional lasing cavity of length L containing an active laser medium with current
density j(x), and electromagnetic waves polarized in the z-direction are propagating in it. Maxwell’s
equation for the z-component of the electric field of these waves then has the form

d2
 
2
− κ Ez (x) = j(x), (55)
dx2

where the constant κ = gω 2 /c2 , with c denoting the speed of light, ω the angular frequency of light,
and g a constant, called the gain coefficient. The cavity is walled by conducting mirrors and thus
the electric field Ex (x) obeys the Dirichlet boundary conditions: Ez (0) = Ez (L) = 0. Find the
general solution of the electric field between the mirrors using the Green’s function method.

10 / 10

You might also like