You are on page 1of 20

Inhomogeneous ODEs: Method of variation of parameters

Consider the general second-order ODE of the form,


+

= ( )

We will now briefly describe the method of variation of parameters. In order to


apply this method we need to know the complementary function. From earlier
lectures we know the complementary function has the form,
=

( )

Also we will pose a particular solution of the form,


=

( )

( )

So we need to determine the unknown functions

Greens Functions in 1D

(1)
( ) and

( )

On differentiating,
=

And we will make the assumption that,


+

=0

(2)

Differentiate again gives,


=

Substituting

( )

( )+

( )

( )

( ) and its derivatives into the governing ODE gives,

]
+

[
+

Greens Functions in 1D

+
+

]
+

= ( )
2

Of course in the second and third terms on the left-hand-side, the terms in the
square brackets are zero. Therefore,
+

= ( )

This together with the assumption (Equation 2) gives us two equations to solve for
and
. We solve to find,

=
Let,
And since

( )(

)
(3)

( )

( )(
=

( ) and

( )

)
( )

( )

( ) are fundamental solutions then,


( )0

Greens Functions in 1D

So we can integrate Equations 3 between

and

to find

( )

( )

We can set
=
= 0 because from Equation 1 these merely generate
additional terms that are of the form of the complementary function. Therefore,
=

d
(4)

Greens Functions in 1D

Therefore we can assert that the general solution to the ODE is,

=
=

+
+

Greens Functions in 1D

( )
+=

General forcing and the influence (Greens) function


Consider a simple problem first in order to motivate the idea of a Greens function
In particular, we should ask if we can obtain a solution form for an ODE with an
arbitrary forcing term ( ) on the right-hand-side.
In order to answer this question let us consider a canonical problem, the steady
state heat equation
=

= ( )

On the domain [0, ] subject to homogeneous boundary conditions


{ 0 = 0,
= 0}.

In order to solve this problem, we note that the complementary function satisfies,
=0
And by direct integration, the fundamental solutions are 1 and
Greens Functions in 1D

However it turns out to be very convenient to have fundamental solutions one of


which satisfies one of the homogeneous boundary conditions and one of which
satisfies the other. Therefore we choose linear combinations to obtain,

So satisfying the left- and right-hand boundary conditions.


=

Using Equations 4, since


that,

1 = we find

The full solution is therefore,


=
Greens Functions in 1D

+(

)( )
7

= 0 means that

So finally let us apply the BCs. Setting


find,
0=

= 0 and for

we

We then note that,


+

=
=

+
1

Greens Functions in 1D

( )

We can therefore write,

( )

Finally this means we can write the solution in the form,

where,

(5)

Greens Functions in 1D

,
,

The function ( ,

) can be thought of as the influence function.

It is in fact the Greens function for this problem.


Note that

= ( , )= ( , )

i.e. it is symmetric. The Greens function does not always possess this full
symmetry. it only occurs for special types of boundary value problems.
Note also that we may write Equation 5 in the form,
,

where,
=

1,
0,

> 0
< 0

is the so-called Heaviside step function.


Greens Functions in 1D

10

So what is a Greens function?


The method of Greens functions is simply a method in order to solve
inhomogeneous BVPs.
One of the interesting aspects of Greens functions is that they enable the
solution to be written down in a very general form for a variety of forcing
functions.
The Greens function also often corresponds to something physically important.

Greens Functions in 1D

11

Sturm-Liouville (S-L) eigenvalue problems


The so-called Sturm-Liouville ODE BVPs take the form of an operator where,

with

( )

[ , ].

This could also be the whole real line or the semi-infinite domain, e.g.,

[0, )

Regular S-L problem


Defined as,

=0

With homogeneous boundary conditions of the form,


={
Greens Functions in 1D

= 0,

= 0}
12

Greens functions for regular S-L problems via eigenfunction expansions


Consider the regular S-L problem of the form,
= ( )
[ , ] and

is subject to two homogeneous BCs of the form,

={
where

(6)

= 0,

= 0}

are real.

Also consider the related eigenvalue problem,


=
with some appropriately chosen ( ). We can solve Equation 6 by posing an
eigenfunction expansion of the form,
=
Greens Functions in 1D

( )

(7)
13

Equation 7 can be differentiated term-by-term so that applying we find,

Let us multiply by

= ( )

( ) and integrate over the domain

The orthogonality of the eigenfunctions (with respect to the weight ( )) allows


us to then show that,

Therefore,
=

( )

( )

( )

And so we recognize that we can write,


=
Greens Functions in 1D

,
14

where,
,

( )

( )

which is therefore an eigenfunction expansion of the Greens function. Note that


,
= ( , ) in this setting.
Note that this solution would run into difficulty if one of the eigenvalues is zero.

Greens Functions in 1D

15

Example
Let us return to a familiar example,
=
with

0 =

= ( )

= 0 and the related eigenvalue problem,


=

with

0 =

=0

We already know from previous work that


= ( ) and
= sin( )
with = 1,2,3, Therefore with reference to the theory above, ( ) is given
by,
=

Greens Functions in 1D

sin(

) sin(
(

)
16

Relationship between the Dirac delta function and the Greens function
Suppose we have ( ) as a concentrated (impulsive) source at
( ) with < <

i.e.

This then gives,

= ( , )

by what is known as the sifting property.


We have therefore obtained the fundamental interpretation of the Greens
function:- It is the response at x due to a concentrated source at

= (

where the subscript on the operator ensures that we know that the derivatives
are with respect to .

Greens Functions in 1D

17

Example
Consider again the steady state heat equation,
= ( )

with

0 = 0,

= 0.

We can write the solution to this problem in the form,

=
Where the Greens function ( ,

,
) satisfies,

( ,

with

0,

= 0 and

Greens Functions in 1D

= 0 and

= (

is the Dirac delta function.


18

Now that we have a governing equation for the Greens function we can obtain its
solution for
,

+
+

,
<
>

Note the constants can be different depending on the location of


The BC at = 0 applies for <
and imposing this gives
,
= 0 gives +
= 0. Therefore we have,
,

Greens Functions in 1D

= 0. Similarly

<
( ) >

We also know from the discussion above that ( ,


gives,
= (

) is continuous at

. This

19

{Jump condition is the derivative of

w.r.t.

defined as,

1
( )

}
=

The jump condition on the derivative at

gives (in this case

= 1)

=1

On solving,
=

d =

Giving,
,

Greens Functions in 1D

20

You might also like