The given question is:
Find the equation of the circle that passes through point $(-3,-4)$ and touches the line $x-y+7=0$ at the point $(-5,2).$
What I did was:
Took the given points $(-5,2)$ and $(-3,-4)$ as the diameter of the circle and derived the equation using the 'formula for the equation of a circle when the end points of diameter are given' :-
$(x+5)(x+3) + (y+4)(y-2) = x^2+y^2+15x+2y+7 =0 .$
Then I affixed the equation of the line derived by the given points with a parameter so that I get the equation of any circle which would pass through the given points $(-5,2)$ and $(-3,-4) $:-
$$x^2+y^2+15x+2y+7+k(3x+y+13) = 0 \tag1 $$
I substituted the mid points $(-15-3k/2,-2-k/2)$ of (1) above equation to the line perpendicular to the given tangent because the mid points lie on that $(x+y+3=0) $ line. Then
$$(-15-3k/2) + (-2-k/2) + 3 = 0 = -15-3k-2-k+6 = 0 = -11 = 4k = k = -11/4$$
But when I substitute this value of 'k' to the equation (1) I get the wrong answer. So I tried using another method namely: finding the mid points of the required circle using simultaneous equations of the lines of perpendicular to the given tangent and the perpendicular of the line thru points (-5,2) and (-3,-4) and. That worked for me.
What I need to know
If the first method is inapplicable to the given question or what I am doing wrong there. Thanks in advance.