(*  bei0_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Kelvin function ber(nu,x) *)
(*    for NU = 0 at selected argument values X, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  28 June 2006 *)
(*  Author:  John Burkardt *)

xvec = {};
fvec = {};
nu = 0;
num = 11;

Do [ {
x=( i - 1 ) / 2,
 z = Exp [ - Pi * I / 4] * x, 
f = Im [ Exp[nu * Pi * I ] * BesselJ[nu,z] ];,
xvec = Append [ xvec, x ],
fvec = Append [ fvec, f ],
      Print["  bei[",nu,",",x,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["/Users/burkardt/public_html/math_src/test_values/bei0_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  bei0_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  x  fx"];
Write[fileout,"#"];
Do[{x=xvec[[i]];f=fvec[[i]];Write[fileout,N[x,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];