Home

PDF (letter size)

Study note of using eigenfunctions and eigevalues to solve an ODE

Nasser M. Abbasi

Sometime in 2010   Compiled on January 29, 2024 at 2:47am

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.

Given (1)d2udx2=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 next? 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. 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 obtainL(sin(nπx))=d2dx2sin(nπx)=n2π2sin(nπx)

Hence it is now in the form Lgn= λngn, 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, (2)f(x)=n=0angn 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 usinggn,gm=abgngmdx=absin(nπx)sin(mπx)dx Then the above becomesgn,gm={0nm12m=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 gmgn and obtainf(x)gm=gmn=0angn=n=0angmgn

Integrating each side givesabf(x)gmdx=abn=0angmgndx=n=0anabgmgndx

But now we see that abgmgn=12 for n=m and zero for all other terms so the above reduces toabf(x)gmdx=am2 Hence we just found (3)an=2abf(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 d2udx2=f(x)? well, if now just write Lu=f(x)=n=0angn, then we haveLu=n=0angn But hold a minute, this means that n=0angnλu. And because Lun=λnun then

u=n=0anλ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 we need to remember that 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.