added nodal differentiation based on L N Trefethen's Matlab code