(*  euler_poly_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Euler polynomials *)
(*    at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  12 January 2006 *)
(*  Author:  John Burkardt *)

nvec = {};
xvec = {};
fvec = {};
Do [ {  n = i, nvec = Append [ nvec, n ],
x = 2/10, xvec = Append [ xvec, x ] },{i,0,10,1}]
Do [ { n = 5,nvec = Append [ nvec, n],
x = i / 10, xvec = Append [ xvec, x] },{i,-5,10,1}]
num = Length [ nvec ];

Do [ {n = nvec [[i]],x = xvec[[i]],  f = EulerE[n,x] ,
  fvec = Append [ fvec,f],
      Print["p[",n,",",x,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt\\Desktop\\Misc\\mathematica\\euler_poly_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  euler_poly_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  n  x  fx"];
Write[fileout,"#"];
Do[{n=nvec[[i]];x=xvec[[i]];f=fvec[[i]];Write[fileout,n,"  ",N[x,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];