%
% Subroutine to obtain the formula for a finite difference 
% approximation of the kth derivative of an arbitrary smooth function "u"
% and the formula for the truncation error 
% on a given set of not necessarily uniform grid points "xpts" at a given 
% point "xb" not necessarily a grid point. 
% 
% Print the corresponding finite difference formula 
% and the leading order term of the error.


function [c,err0,err1] = fdstencilnonuniform(k,xb,xpts)