                % 4th Order DERIVATIVE APPROXIMATION

% This program will help you to complete Hw 5, problem 2.
                
                
% We need to find constants a, b, c, d, e 
% so that the Taylor expansion is of the highest order for: 
%
%       f'(x_0) = af(x_0-h) + bf(x_0) + cf(x_0+h) + df(x_0+2h) + ef(x_0+3h)
%      
% Here, unknown x is a vector of unknowns:
% x = [a, b, c, d, e]'

A = [ 1 1 1 1 1; -1 0 1 2 3; 1 0 1 4 9; -1 0 1 8 27; 1 0 1 16 81 ]
b = [0 1 0 0 0]'
x = A\ b
