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.
Let points (-5,2) and (-3,-4) as T and P respectively.
Assuming T and P as diametrically opposite points in a circle leads to the error.
At first you need to find center (h,k) of the circle.
Tangent at T has slope 1, so the normal has a slope -1.
$$ \dfrac{(k-2)}{(h+5)} = -1 \dots (1*) $$
Perpendicular bisector of TP is given by
$$( k-2)^2 + (h+5)^2 =( k+4)^2 + (h + 3)^2 =( R^2) \dots (2*) $$
Solving (1*), (2*) and we have $$ h = -5/2, k =-1/2\dots (3*) $$
From (1*), (2*) $$ R^2 = (k-2)^2 + (h +5)^2 = 50/4 $$
Plug in above values into circle equation $$ (x-h)^2 + (y-k)^2 = R^2 \dots (4*) $$