(* Mathematica program for Problem 4.15

  date : 8/10/2009
  author: Jorge C. Romão
  email : jorge.romao@ist.utl.pt
*)

Clear[K,a,b,c,d]
K=1;
a=0;
b=8;
c=-5;
d=5;

Plot[Evaluate[u[x]/. NDSolve[{u''[x]-(x^2-K)*u[x] ==0,
u[0]==1,u'[0]==0},u[x],{x,10^(-8),10},MaxSteps->1000]],
{x,a,b},PlotRange->{c,d}]