function [f,dfdx,dfdy] = cusp(x,y) f = y.^2 - x.^3; dfdx = - 3 .* x.^2; dfdy = 2.*y;