Suppose I have a function u(x, y). I have a transformation from (X, Y) to (x, y) via u(x,y) = U(X,Y) and

X = f(x,y) Y = g(x,y)

Using Mathematica, how do I compute the derivatives u_x, u_y, u_{xx}, u_{yy}, etc. in terms of U?

For example, u_x = f_x U_X + g_y U_Y

For example, if X = y - xY = y^2 - x^2

then u_x = -U_X + 2x U_Y.

The problem here is that without knowing the inverses of f(x,y) and g(x,y), I don't know how to get Mathematica to work out the chain rules. For example, can you show me how to compute u_{xx} in mathematica using the above example?