function [f,dfdx,dfdy] = compsin(x,y) f = y - sin(1./x); dfdx = (1./(x.^2)) .* cos(1./x); dfdy = 1;