Examples of Eigenvalue/Eigenfunction

Many standard eigenfunction problems involve similar ODEs and similar cases (λ = 0, λ positive, λ negative with eigenvalues related to squares of integers).  I devised another example with a slight variation to demonstrate that the cases depend on the DE involved.

This notebook supplements a handout.

notebook created by T. Shelton, Southwestern University
reference  Elementary Differential Equations and Boundary Value Problems, Boyce & DiPrima, 8th Edition, John Wiley & Sons, Inc.; 2005. 
reference  Differential Equations: Theory, Technique, and Practice, Simmons & Krantz, McGraw-Hill Co, Inc. 2007

1st Example

(λ-1) u''(x) + 2 u'(x) - 3 u(x) = 5 for x>0
u(2) = 1, u(3) = (8/3) (e^(3/2)) - (5/3)

preliminary, λ=1.

(You might notice the rather unusual value for the second boundary condition, so here I provide some rationale.  When λ has a value so the DE degenerates to first order, I picked one boundary condition arbitrarily that is nice, then I solved for the solution value at the other boundary.)

DSolve[2 u'[x] - 3 u[x] == 5,u[x],x]

DSolve[{2 u'[x] - 3 u[x] == 5,u[2]==1},u[x],x]

-((5 (E^3)-8 (E^(3 x/2)))/(3 (E^3)))/.{x->3}

Note that this simplifies to (8/3) (e^(3/2)) - (5/3).

a general solution without any bondary conditions, λ≠1.

DSolve[{(λ-1) u''[x] +2 u'[x] - 3 u[x] == 5},u[x],x]

since the DE is 2nd order, constant coefficient, we try u[x] = (e^(r x))  and get a quadratic characteristic equation for the associated homogeneous DE.

Solve[(λ-1) r^2 + 2 r - 3 ==0,r]

Note that -2 + 3 λ = 0 for λ = 2/3.  We have different types of solutions at, below, and above this value.

λ = 2/3

DSolve[{(2/3-1) u''[x] +2 u'[x] - 3 u[x] == 5},u[x],x]

DSolve[{(2/3-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]

Expand[-((5 (E^(15/2))+16 (E^(3 x))-24 (E^((3/2)+3 x))-8 (E^(3 x)) x+8 (E^((3/2)+3 x)) x)/(3 (E^(15/2))))]

Collect[%,{ (E^(-(15/2)+3 x)),(E^(-6+3 x)) x}]

General λ≠1; BVP

DSolve[{(λ-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]

example of BVP soln, for λ=0

((λ-1) u''[x] +2 u'[x] - 3 u[x] )/.{λ->0}

DSolve[{-3 u[x]+2 u'[x]-u''[x]== 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))}/.{λ->0},u[x],x]

the following will explain why we do the odd expression below.  A single solution will look like {{u[x]->fcn}}.
Flatten[{{u[x]->fcn}}]            results in {u[x]->fcn}.     Flatten[{{u[x]->fcn}}] [[1,2]]   peels out fcn.

Many solutions

We can almost blindly generate a variety of solutions and their plots.

Clear[l1];l1=Table[{λ,Flatten[DSolve[{(λ-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]][[1,2]]},{λ,-3.,3.,1/3}]

Length[l1]

l1[[19]]

l1[[19,2]]

Clear[l2];
l2 = Table[l1[[n,2]],{n,1,19}]

Plot[l2,{x,-3,10}]

Solutions for each case

here are sample values within each of the four cases  λ < 2/3,  λ = 2/3, 2/3 < λ < 1, λ = 1, λ > 1

Clear[sample1,sample2,sample3,sample4];
sample1= {-3.,-1.,0.,1./3}
sample2 ={ 2./3}
sample3 = Table[2./3 + (1-2/3)/5*b,{b,1,4}]
sample4 = {1.5, 2., 4.}

We calculuate the set of solutions to the BVP for each set of sample values and show the result graphically.  Notice that the functions within a case have similar behaviors; behaviors differ by case.  In some instances, we obtain a clearer picture by explicitly choosing the y-values of the graphing window.

Clear[solns1,solns2,solns3,solns4];
solns1 = Table[(Flatten[DSolve[{(sample1[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]])[[1,2]],{i,1,Length[sample1]}]

Plot[solns1,{x,-2,5}]

solns2 = Table[(Flatten[DSolve[{(sample2[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]])[[1,2]],{i,1,Length[sample2]}]

Plot[solns2,{x,-2,5}]

Plot[solns2,{x,-2,5},PlotRange->{-50,15}]

solns3= Table[(Flatten[DSolve[{(sample3[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]])[[1,2]],{i,1,Length[sample3]}]

Plot[solns3,{x,-2,5}]

Plot[solns3,{x,-2,5},PlotRange->{-50,15}]

solns4 = Table[(Flatten[DSolve[{(sample4[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-((5 (E^3)-8 (E^(9/2)))/(3 (E^3)))},u[x],x]])[[1,2]],{i,1,Length[sample4]}]

Plot[solns4,{x,-2,5}]

Plot[solns4,{x,-2,15},PlotRange->{-500,500}]

2nd Example

(λ-1) u''(x) + 2 u'(x) - 3 u(x) = 5 for x>0
u(2) = 1, u(3) = -1

note that there is no solution for λ=1

DSolve[{2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]

DSolve[{(λ-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]

Solutions for each case

Use the same sample values as above within each of the four cases  λ < 2/3,  λ = 2/3, 2/3 < λ < 1, λ = 1, λ > 1
sample1 = {-3., -1., 0., 1./3}
sample2 = { 2./3}
sample3 = Table[2./3 + (1 - 2/3)/5*b, {b, 1, 4}]
sample4 = {1.5, 2., 4.}

We calculuate the set of solutions to the BVP for each set of sample values and show the result graphically.  Notice that the functions within a case have similar behaviors; behaviors differ by case.  In some instances, we obtain a clearer picture by explicitly choosing the y-values of the graphing window.

Clear[solns12,solns22,solns32,solns42];
solns12 = Table[(Flatten[DSolve[{(sample1[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]])[[1,2]],{i,1,Length[sample1]}]

Plot[solns12,{x,-2,5}]

solns22 = Table[(Flatten[DSolve[{(sample2[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]])[[1,2]],{i,1,Length[sample2]}]

Plot[solns22,{x,-2,5}]

Plot[solns22,{x,-2,5},PlotRange->{-50,15}]

solns32= Table[(Flatten[DSolve[{(sample3[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]])[[1,2]],{i,1,Length[sample3]}]

Plot[solns32,{x,-2,5}]

Plot[solns32,{x,-2,5},PlotRange->{-50,15}]

solns42 = Table[(Flatten[DSolve[{(sample4[[i]]-1) u''[x] +2 u'[x] - 3 u[x] == 5,u[2]==1,u[3]==-1},u[x],x]])[[1,2]],{i,1,Length[sample4]}]

Plot[solns42,{x,-2,10}]

Plot[solns42,{x,-2,10},PlotRange->{-50,100}]