% Evaluate higher derivatives of y=1/(x+1) at 2.
% Run this by downloading it to your current Matlab directory
%  (find this by typing pwd at the prompt) and then
% running examplediff
% See examplediff_output.txt for the printout that results.
g = sym('1/(x+1)');
x = 2.0;
eval(diff(g,'x',0))
eval(diff(g,'x',1))
eval(diff(g,'x',2))

