MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to find the eigenvalues/eigenfunctions of a

  • To: mathgroup at
  • Subject: [mg113407] Re: How to find the eigenvalues/eigenfunctions of a
  • From: Bob Hanlon <hanlonr at>
  • Date: Wed, 27 Oct 2010 05:17:00 -0400 (EDT)


u[x_] = (u[x] /. DSolve[
        {u''[x] - lambda u[x] == 0, u'[0] == 0},
        u[x], x][[1]] // ExpToTrig // Simplify) /.
  C[2] -> 1


v = Solve[FullSimplify[
     Reduce[{u[m] == 0, Element[m, Integers]},
     {Element[m, Integers], m > 0, C[1] == 0}],
    lambda][[1]] // Quiet

{lambda -> -(Pi^2/(4*m^2))}

Simplify[u[x] /. v, m > 0]


Simplify[u''[x] - lambda*u[x] /. v,
 Element[m, Integers]]


Bob Hanlon

---- "Nasser M. Abbasi" <nma at> wrote: 


This is a simple math problem, which I solved by hand, but having hard 
time to get the same result I had by using Mathematica.  I'll describe 
the problem, the solution I obtained by hand, what I did to try to 
verify my result.  I'd like to be able to get Mathematica to produce the 
same result I have.

Summary: I need to have mathematica find the eigenvalues and 
eigenfunctions of differential operator without me having to do too much 
manual manipulation.

Given Lu==u''[x], with boundary conditions u'[0]==0,u'[1]==0, need to 
find the eigenvalues and eigenfunctions of L.

my solution:
The eigenvalues are

lambda[n_]= -(n Pi)^2
for n=0,1,2,3,... infinity

with corresponding eigenfunctions

Phi[n_,x_]:=Cos[ n Pi x]
for n=0,1,2,3,... infinity

So, the first eigenvalues are

In[14]:= lambda[n_]:=-(n Pi)^2

What I tried in Mathematica

Tried to solve u''[x] == lambda * u[x], i.e. eigenvalue problem with the 
BVP above, but I get zero solution

DSolve[{ u''[x]- lambda u[x]==0,u'[0]==0,u'[1]==0},u[x],x]


Now tried just one BC, I picked one of the above 2, but I also tried the 
other one later, no success, do not get what I had.

First@DSolve[{ u''[x]- lambda u[x]==0,u'[0]==0},u[x],x];

      {u[x]->2 C[2] Cosh[Sqrt[lambda] x]}


    2 C[2] Cosh[Sqrt[lambda] x]

% find root of the above eigenfunction



% try to guess what the form is



% see what it is


Ok, so  Sqrt[-lambda] = pi/2, then the (first?) eigenvalue is -(pi/2)^2
The rest, keep looking for next roots of the eigenfunction from above?

But I get eigenvalue to be   -(n*pi)^2, not  -(n* pi/2)^2 anyway. Might 
have made a mistake there at the end.

The bottom line is this:  Is there a package or command to make it 
easier to find the eigenvalues and eigenfunctions of a linear operator 
in mathematica, without having to hunt for them by hand? One has to use 
one B.C. to get something, and them hunt for roots, and guess the form.

It seems this task can be automated by some command or package if not 
already done.


  • Prev by Date: Re: Sneaky white space
  • Next by Date: Re: Locator Manipulate
  • Previous by thread: Re: How to find the eigenvalues/eigenfunctions of a
  • Next by thread: Re: checking large scale linear programming solution with