Computational Physics - Department of Physics

(Axel Boer) #1

294 9 Two point boundary value problems


point as the midpoint of the integration interval and compute safely the solution. This is the
topic of the next section.


9.4 Green’s function approach


A slightly different approach, which however still keeps the matching procedure discussed
above, is based on the computation of the Green’s function and its relation to the solution of
a differential equation with boundary values.
Consider the differential equation


−u(x)′′=f(x), x∈( 0 , 1 ), u( 0 ) =u( 1 ) = 0 , (9.23)

and using the fundamental theorem of calculus, there is a constantc 1 such that


u(x) =c 1 +

∫x
0

u′(y)dy,

and a constantc 2
u′(y) =c 2 +


∫y
0

u′′(z)dz.

This is true for any twice continuously differentiable functionu
Ifusatisfies the above differential equation we have then


u′(y) =c 2 −

∫y
0
f(z)dz.

which inserted into the equation forugives


u(x) =c 1 +c 2 x−

∫x
0

(∫y

0

f(z)dz

)

dy,

and defining


F(y) =

∫y
0
f(z)dz,

and performing an integration by parts we obtain
∫x
0


F(y)dy=

∫x
0

(∫y

0

f(z)dz

)

dy=

∫x
0

(x−y)f(y)dy.

This gives us
u(x) =c 1 +c 2 x−

∫x
0

(x−y)f(y)dy.

The boundary conditionu( 0 ) = 0 yieldsc 1 = 0 andu( 1 ) = 0 , resulting in


c 2 =

∫ 1
0

( 1 −y)f(y)dy,

meaning that we can write the solution as


u(x) =x

∫ 1
0

( 1 −y)f(y)dy−

∫x
0

(x−y)f(y)dy

The solution to our differential equation can be represented in a compact way using the
so-called Green’s functions, which are also solutions to our differential equation withf(x) = 0.

Free download pdf