Tangents To A Circle

I. Tangent To A Circle At Any Given Point:
Here we will see how to draw a tangent to a circle with radius $R$, centered at $x_c, y_c$ at a point $x_1, y_1$ on the circle.
The equation of the above circle can be written as:
$(x - x_c)^2 + (y - y_c)^2 = R^2$

To make things easy, we can first give an such that the center of the circle is at the origin. We can write the new coordinate system as:
$x' = x - x_c$ and $y' = y - y_c$
Therefore, the equation of the circle using the new coordinate system becomes:
$(x')^2 + (y')^2 = R^2$ and the point on the circle becomes:
$x'_1 = x_1 - x_c$ and $y'_1 = y_1 - y_c$

The slope of the radius joining the center of the circle (origin) with $x'_1, y'_1$ is given by:
$s =  \dfrac{y'_1}{x'_1}$
If the slope of the tangent is $s'$ then we know from :
$ss' = -1 \Rightarrow s' = -\dfrac{x'_1}{y'_1}$ 

For, those who are familiar with some basic calculus, here is the method of finding the slope of the tangent at $(x'_1, y'_1)$ using differentiation.
The slope of any curve, $y = f(x)$ at any point on the curve is given by the first derivative of curve $y = f'(x)$ at that point.
The equation of the slope for our translated circle, $(x')^2 + (y')^2 = R^2$, can be found by finding $\dfrac{dy'}{dx'}$

-----------book page break-----------
Differentiating both sides of this equation,
$\dfrac{d}{dx'}(x'^2 + y'^2) = \dfrac{d}{dx'}R^2$

$\Rightarrow \dfrac{d}{dx'} x'^2 + \dfrac{d}{dx'} y'^2 = 0$

$\Rightarrow 2x' + \dfrac{d}{dy'} y'^2 \cdot \dfrac{dy'}{dx'} = 0$

$\Rightarrow 2x' + 2y' \cdot \dfrac{dy'}{dx'} = 0$

$\Rightarrow y' \cdot \dfrac{dy'}{dx'} = -x'$

$\therefore s' = \dfrac{dy'}{dx'} = -\dfrac{x'}{y'}$


Now that we know how to find the slope of the tangent at any given point on the circle, al we need to do is to find the equation of the line having a slope of $s'$, and passing through $x'_1, y'_1$ on the circle, which is given by:
$y' - y'_1 = s'(x' - x'_1)$

$\Rightarrow y' - y'_1 = -\dfrac{x'_1}{y'_1}(x' - x'_1)$

$\Rightarrow y'_1y' - {y'_1}^2 = {x'_1}^2 - x'_1x'$

-----------book page break-----------
$\Rightarrow x'_1 x' + y'_1 y' - ({x'_1}^2 + {y'_1}^2) = 0$

Because point $(x'_1, y'_1)$ lie on the circle, ${x'_1}^2 + {y'_1}^2 = R^2$
Therefore, the equation of the tangent becomes:
$x'_1x' + y'_1y' = R^2$

Now we can translate back to the original coordinate system using $x' = x - x_c$ and $y' = y - y_c$, and we get the equation of the required tangent as:
$(x_1 - x_c)(x-x_c) + (y_1 - y_c)(y - y_c) = R^2$

II. Tangent To A Circle From An External Point:
Here we will see how to find the equation of the two tangents from point $x_1, y_1$ lying outside a circle centered at $(x_0, y_0)$ and having a radius $R$.
The equation of the circle is given by: 
$(x - x_0)^2 + (y - y_0)^2 = R^2$
For ease of calculation we can given an axes translation of $x_0, y_0$ to the given point and the circle.
The new equation of the circle becomes:
$x^2 + y^2 = R^2$
and the coordinate of the point becomes:
$x'_1 = x_1 - x_0$ and $y'_1 = y_1 - y_0$

We can find the equations of the tangents from $x'_1, y'_1$ to the given circle and translate the same back by the same amount to get the required equations.

If we write the equation of any tangent to this circle as $y' = sx' + c$ where $s$ is the slope of the tangent, and take the point of tangency as $(x'_t, y'_t)$ then:
$y'_t = sx'_t + c$       $\because$ this point lies on the tangent
and
${x'_t}^2 + {y'_t}^2 = R^2$       $\because$ this point lies on the given circle

-----------book page break-----------
Substituting $y'_t = x'_t + c$ from the eqn of the tangent in the equation of the circle.
${x'_t}^2 + (sx'_t + c)^2 = R^2$

$\Rightarrow {x'_t}^2(s^2 + 1) + 2csx'_t + c^2 - R^2 = 0$

Since for any given value of $s$, the tangent touches the circle at only one point, the discriminant of the above equation must be $0$.
Therefore,
$(2cs)^2 - 4 \times (s^2 + 1)(c^2-R^2) = 0$
$\Rightarrow c^2s^2 - c^2s^2 - c^2 + R^2s^2 + R^2 = 0$
$\Rightarrow s^2 = \dfrac{c^2 - R^2}{R^2}$

We can substitute the value of $c = y'_1 - sx'_1$ and get:
$\Rightarrow s^2 = \dfrac{(y'_1 - sx'_1)^2 - R^2}{R^2}$
$\Rightarrow s^2R^2 = {y'_1}^2 + s^2{x'_1}^2 - 2x'_1y'_1s - R^2$
$\Rightarrow (R^2 - {x'_1}^2)s^2 + 2x'_1y'_1s + R^2 - {y'_1}^2 = 0$
$\Rightarrow s = \dfrac{-2x'_1y'_1 \pm \sqrt{4{x'_1}^2{y'_1}^2 - 4(R^2 - {x'_1}^2)(R^2 - {y'_1}^2)}}{2(R^2 - {x'_1}^2)}$
$\Rightarrow s = \dfrac{-x'_1y'_1 \pm \sqrt{{x'_1}^2{y'_1}^2 - R^4 + {x'_1}^2R^2 + { y'_1}^2R^2 - {x'_1}^2{y'_1}^2}}{(R^2 - {x'_1}^2)}$
$\Rightarrow s = \dfrac{-x'_1y_1 \pm R\sqrt{{x'_1}^2 + { y'_1}^2 - R^2}}{R^2 - {x'_1}^2}$

Therefore, the equations of the two tangents to the given circle from the point $x'_1, y'_1$ are given by:
$y' = sx' + c$

-----------book page break-----------
$\Rightarrow y' = sx' + y'_1 - sx'_1$

$\Rightarrow y' - y'_1 = s(x' - x'_1)$

$\Rightarrow y' - y'_1 =  \left(\dfrac{-x'_1y'_1 \pm R\sqrt{{x'_1}^2 + { y'_1}^2 - R^2}}{R^2 - {x'_1}^2} \right) (x' - x'_1)$

Therefore, the equations of the two tangents from $(x'_1, y'_1)$ to the given circle centered at the origin, and with a radius $R$ is given by:

$y' - y'_1 = \left(\dfrac{-x'_1y'_1 \pm R\sqrt{{x'_1}^2 + {y'_1}^2 - R^2}}{R^2 - {x'_1}^2}\right)(x' - x'_1)$

We had initially given an axes translation of $x_c, y_c$ to the circle and the given point such as to bring the circle to the origin, we can now give a reverse translation to obtain our equations.
The translation back to the original coordinate system can be obtained by substituting:
$x' = x - x_c$
$y' = y - y_c$

Also, observe that the slope of the line given by $\left(\dfrac{-x'_1y'_1 \pm R\sqrt{{x'_1}^2 + {y'_1}^2 - R^2}}{R^2 - {x'_1}^2}\right)$ will not change due to axes translation.

-----------book page break-----------
Therefore, we can write the equations as:
$y - y_c - y_1 + y_c = \left(\dfrac{-x'_1y'_1 \pm R\sqrt{{x'_1}^2 + {y'_1}^2 - R^2}}{R^2 - {x'_1}^2}\right)(x - x_c - x_1 + x_c)$

$y - y_1 = \left(\dfrac{-x'_1y'_1 \pm R\sqrt{{x'_1}^2 + {y'_1}^2 - R^2}}{R^2 - {x'_1}^2}\right)(x - x_1)$
where:
$x'_1 = x_1 - x_c$ and $y'_1 = y_1 - y_c$

For circles centered at the origin, $x'_1 = x_1$ and $y'_1 = y_1$, therefore, the equation becomes:
$y - y_1 = \left(\dfrac{-x_1y_1 \pm R\sqrt{{x_1}^2 + {y_1}^2 - R^2}}{R^2 - {x_1}^2}\right)(x - x_1)$

Now let us try the following problem:
--------- Reference to question: b82d9ee6-d172-4e9e-b513-c8f15eeef3ce ---------