To differentiate a function of x and y, you must differentiate x as you would ordinarily, and then differentiate y as you would normally, but multiply the differentiated term by dy/dx. For terms with x and y in them, you must apply the product rule. Once each term has been differentiated, collect all the terms with dy/dx as a multiplier on one side of the equation and all the other terms on the other. Then, factorise the dy/dx side, and divide by what's in the brackets to get dy/dx on its own. You will then have the solution. This is called implicit differentiation.