Let z=f(x). Differentiating wrt x and y: dz/dx=6xy+3x^2dy/dx-3y^2dy/dx-6x; dz/dy=6xydx/dy+3x^2-3y^2-6xdx/dy.

dz/dx=3(x^2-y^2)dy/dx+6x(y-1); dz/dy=6x(y-1)dx/dy+3(x^2-y^2).

The general form is: dz/dt=6xydx/dt+3x^2dy/dt-3y^2dy/dt-6xdx/dt, where t is a parameter such that x=g(t), y=h(t) and z=j(t), where g, h and j are functions of t.

When dz/dx=0 or dz/dy=0 there is a critical point: dy/dx=2x(y-1)/(y^2-x^2).

The general form is dz/dt=6x(y-1)dx/dt+3(x^2-y^2)dy/dt=0. So x=y=1 is a critical point; x=y=0 is another; x=-1 and y=1 is another.

When x=y=1+d, where d is very small, dz/dt=6d(1+d)dx/dt + 0 which is positive when d and dx/dt are both positive or both negative. This suggests a minimum at x=y=1. If x=y=d, 6d(d-1)dx/dt<0, a maximum, when d and dx/dt are both positive or both negative. When x=-1+d and y=1+d, 6d(d-1)dx/dt<0, another maximum. If d and dx/dt are of opposite signs, the critical points are inverted.