This was on last years paper for my upcoming test. My workings got so convoluted that I suspect I have strayed off track. I was wondering if I have overlooked something simple and made it more complicated than it needs to be?

Use implicit differentiation to find the points on the circle $\displaystyle x^2-2y+y^2-2x-2=0$ closest to and farthest away from the origin.

Taking the derivative I get:

$\displaystyle \frac{dy}{dx} = \frac{2-2x}{2y-x} = \frac{1-x}{y-1}$

Setting the derivative = 0, I get x = 1 and therefore the top and bottom of the circle: (1,3) and (1,-1)

After graphing the function, I can see that the two points will be where the line y=x intersects the circle.

To find where this happens, I tried to find where the gradient of the circle is perpendicular to that of the line y=x.

$\displaystyle \frac{1-x}{y-1} = -1$

$\displaystyle 1-x=1-y$

$\displaystyle y=x$ :S

So then I tried setting the original equation = y-x

$\displaystyle x^2-2y+y^2-2x-2 = y-x$

$\displaystyle y^2-3y=x-x^2+2$

$\displaystyle y^2-3y+\frac{9}{4}=x-x^2+\frac{17}{4}$

$\displaystyle (y-\frac{3}{2})^2=x-x^2+\frac{17}{4}$

$\displaystyle y = \sqrt{x-x^2+\frac{17}{4}}+\frac{3}{2}$

I'm lost on this one :S