PROJECT 6  :  Milan Ramaiya  :  11.20  .01

APPROXIMATING ALGORITHM

fp[x0_, 
          h_] = (1/(12  h)) (-25 f[x0] + 48  f[x0 + h] - 
              36  f[x0 + 2  h] + 16  f[x0 + 3  h] - 
              3  f[x0 + 4  h]);
fpp[x0_, 
          h_] = (1/(12  (h^2))) (35  f[x0] - 104  f[x0 + h] + 
              114  f[x0 + 2  h] - 56  f[x0 + 3  h] + 
              11  f[x0 + 4  h]);

EXECUTION

f[x_] = x*(E^x);
Print["Approximation of f'(1)"];
Print["h=.1   => ",  fp[1,  .1]];
Print["h=.01  => " , 
        fp[1,   .01]];
Print["Approximation of f\"(1)"];
Print["h=.1   => ",  fpp[1,  .1]];
Print["h=.01  => " , fpp[1,   .01]];