Study note of using eigenfunctions and eigevalues to solve an ODE

Nasser M. Abbasi

Sometime in 2010 compiled on — Tuesday September 05, 2017 at 07:30 PM


PDF (letter size)
PDF (legal size)

This note shows how to use the idea of eigenvalues and eigenfunctions to help guide finding a solution to a differential equation. There are many ways to solve this ODE, and this is a nicer more general way to looking at solving it.


d-u-= f (x)

With some boundary conditions u (0) = u0   and u(L) = uL.

We start by rewriting this ODE as Lu = f  where L  is an operator applied on u  . This is just a rewrite of the ODE, we did not do anything new here, but this way it makes the equation look more like an Ax = b  , and this helps, for later when we discretize it and apply FDM (finite difference method), that what we will end up with. Also writing it as Lu  = f  is more cool, and makes one look like a real math person.

Now that we have Lu = f  what to do? The whole point is to now find the eigenfunctions and eigenvalues of the operator L  (Recall, an operator has a matrix as a representation, L  is a mapping operator after all, so it is not far fetch to talk about an eigenvalues and eigenfunctions of an operator.).

Let us now call the eigenfunctions of L  as gn  and the eigenvalues as λn  .

So now we can write

Lgn = λngn

But how to find these gn  ? For the above ODE, it is done by inspection as it is clear that gn = sin(nπx )  is an eigenfunction. We can see that because if we apply L  to it, we obtain

L (sin (nπx)) = --2-sin (n πx) = − n2π2 sin (nπx)

Hence it is now in the form Lg  =
  n  λ  g
  n n  , where λ
  n  , a scalar, and in this case

λn = − n2 π2

This is cool. We found the eigenfunctions and eigenvalues of L.  Now what to do with them? Well, Since from (1) we see that f (x)  is in the domain of the operator, because Lu =  f (x)  , and we just found the eigenfunctions of the operator, so then this is like saying that we found the basis vectors of the domain of L  where f (x )  lives, and we need to use the basis vectors of this domain to represent f (x)  . In other words,

f (x) = ∑ a  g
           n  n

The is just like in normal euclidean space, where we represent a vector as

v = vxi + vyj+ vzk

The eigenfunctions gn  are like the basis vectors i,j,k  and an  are like the coordinates of the vector v  . And f (x )  is like the vector v  .

So far so good. We found the eigenfunctions of L  , and we rewrote f (x)  in terms of these eigenfunctions. But wait a minute, we now have to find the an  . These are like the coordinates of f (x)  when viewed in function space.

Here comes to the rescue something new that we need in order to make more progress. These eigenfunctions are not just some random things we pulled out of the sky. They are special functions and must adhere to some things. This is mathematics after all, and we must have some order.

These eigenfunctions must be orthogonal to each others and we define them on square integrable space L2[0,L].  We just made this restriction of the space to be able to make more headway in solving this problem.

What all this means, is that gn  must be orthogonal to each others (just like i,j,k   are as a special case in the Euclidean space). Being in this space, we need to define an inner product on them. We need to know how to perform an inner product between gn  and gm  .

You might feel tricked now, because we did not say any of this stuff about the eigenfunctions gn = sin(nπx )  when we found them above by inspection. But it is OK, luckily for us gn = sin(nπx )  does meet these requirements. How? because if we define the inner product between gn  and gm  using

           b           b
          ∫           ∫
〈gn,gm〉 =   gngmdx  =   sin(nπx )sin (mπx )dx
          a           a

Then the above becomes

         {  0   n  m
〈gn,gm 〉 =   1  m  = m

So, gn,gm  are orthogonal to each others. This is what orthogonal means. If we inner product any 2 different eigenfunctions with each others, we get zero, but if we inner product an eigenfunction with itself, we do not get zero.

Now we are really happy. We found that the eigenfunctions gn = sin(nπx )  are orthogonal to each others, and we can express f (x )  in term of them.  We use this inner product property to find an  . We go back to (2) above, and multiply each side by gm  gn  and obtain


Integrating each side gives


But now we see that ∫b
  gmgn =  2
a   for n = m  and zero for all other terms so the above reduces to

∫ b            am
   f (x)gmdx = ---
 a              2

Hence we just found

an = 2  f (x)gndx

We take this an  and use it in (2). So, we have just found an expansion of f (x)  in terms of the eigenfunctions gn  . i.e. we have found a complete representation of f (x)  as a function in the space of L  , with its basis vectors and the coordinates an  .

This is all so wonderful. But how does this help us to find the solution to d2u2 = f (x)?
dx  well, if now just write Lu = f (x) = ∑ ∞  a g
              n=0  n n  , then we have

Lu =    angn

But hold a minute, this means that ∑ ∞
  n=0 angn ≡ λnu  or

    ∑∞  an-
u =     λngn

And this is the solution to the ode.

Hence given a differential operator L  , once we  know its eigenfunctions and its eigenvalues, the problem is solved.

We just have to express the forcing function in terms of the eigenfunctions, and once this is done, the problem is solved. the solution is found. In real life, we obtain the matrix representation of L  , and we work on the matrix representation and find the eigenfunctions and eigenvalues. So, solving this ODE becomes a problem of finding eigenvalues and eigenfunctions. But remember, this all worked only because we were able to represent f (x)  in terms of the eigenfunctions. If somehow we could not represent f (x)  this way, then this whole approach falls apart.