%
%  w11j0.m -- (djm:  18 mar 2004)
%    - bessel eigenvalues
%

delta = 100;

%  newton loop
while (abs(delta) > 1e-12)
    Fmu  = bessely(0,mu)*besselj(0,2*mu) - besselj(0,mu)*bessely(0,2*mu) ;
    
    FmuP =   (besselj(1,mu)*bessely(0,2*mu) - bessely(1,mu)*besselj(0,2*mu)) ...
         + 2*(besselj(0,mu)*bessely(1,2*mu) - bessely(0,mu)*besselj(1,2*mu)) ;
     
    delta = Fmu/FmuP;
    mu    = mu - delta;
end

format long
lambda = mu^2
format short

%  make plot
figure(1);  clf
x = 1:0.002:2;
u = bessely(0,mu)*besselj(0,mu*x) - besselj(0,mu)*bessely(0,mu*x) ;
plot(x,u,'r')
title(['\bf bessel eigenfunction:  \lambda = ' num2str(lambda)])
xlabel('\bf x-axis')
ylabel(['\bf u(x;\lambda) - ' num2str(round(mu/pi))  ' mode'])