function [f,dfdx,dfdy] = fig8(x,y)

f = (x.^2 + y.^2).^2 - (x.^2 - y.^2);
dfdx = 4 .* x.^3 + 4.* x .* y.^2 - 2.*x;
dfdy = 4 .* x.^2 .* y + 4 .*y.^3 + 2.*y;