A chord PQ of the circle $x^2+y^2-2ax-2by=0$ subtends an angle of $45^{\circ}$ to the origin.
Given that M is the mid point of PQ. Find the equation of the locus of M.
MY ATTEMPT Centre of the given circle $= \frac{-1}{2}[(-2a),(-2b)]=C(a,b)$
Let, $M(x,y)$
Slope of $CM$=$(\frac{b-y}{a-x})$
$CM\perp PQ$
$\therefore$ Slope of $PQ$=-$(\frac{a-x}{b-y})$
Equation of $PQ$ gives locus of $M(x,y)$
$\implies$$y_{PQ}=m_{PQ}x+c$
$\implies$$y=-(\frac{a-x}{b-y})+c$
But my approach above is wrong since the textbook answer is as below:
$x^2+y^2-2ax-2by+\frac{1}{2}(a^2+b^2)=0$
YOUR HELP WILL BE HIGHLY APPRECIATED
The given circle of center $O(a,b)$ and radius $r=\sqrt{a^2+b^2}$ contains the origin. Then, the chord $PQ$ subtends a right-angle to $O$ and the distance from $O$ to $PQ$ is $\frac1{\sqrt2}r$.
Thus, the locus is on a circle of center $(a,b)$ and radius $\frac1{\sqrt2}r$, which determines its equation as $$(x-a)^2+(y-b)^2=\frac{1}{2}(a^2+b^2)$$