# How do you write an equation of a circle whose center is at P(4,-5) and is tangent to the line -x+2y=1?

Jul 18, 2016

${x}^{2} + {y}^{2} - 8 x + 10 y - 4 = 0$

#### Explanation:

Since the line is tangent to the circle, its distance from the center is equal to the radius, that's unknown:

d=r

$d = \frac{| a {x}_{0} + b {y}_{0} + c |}{\sqrt{{a}^{2} + {b}^{2}}}$

where a,b,c are, in this case:

a=-1; b=2;c=-1

and $\left({x}_{0} , {y}_{0}\right)$ is the center $P \left(4 , - 5\right)$

So

radius=$| - 1 \left(4\right) + 2 \left(- 5\right) - 1 \frac{|}{\sqrt{{\left(- 1\right)}^{2} + {2}^{2}}}$

$= | - 4 - 10 - 1 \frac{|}{\sqrt{5}}$

$= \frac{15}{\sqrt{5}} = \frac{15 \sqrt{5}}{5} = 3 \sqrt{5}$

Now you can substitute the values in the equation of the circle:

${\left(x - {x}_{c}\right)}^{2} + {\left(y - {y}_{c}\right)}^{2} = {r}^{2}$

${\left(x - 4\right)}^{2} + {\left(y + 5\right)}^{2} = {\left(3 \sqrt{5}\right)}^{2}$

${x}^{2} + {y}^{2} - 8 x + 10 y + 16 + 25 - 45 = 0$

${x}^{2} + {y}^{2} - 8 x + 10 y - 4 = 0$

Jul 18, 2016

${\left(x - 4\right)}^{2} + {\left(y + 5\right)}^{2} - 45 = 0$

#### Explanation:

Giving a circle

$C \to {\left(x - {x}_{0}\right)}^{2} + {\left(y - {y}_{0}\right)}^{2} - {r}^{2} = 0$

and a line

$L \to a x + b y + c = 0$

the tangency point ${p}_{t} = \left\{{x}_{t} , {y}_{t}\right\}$ is such that in ${p}_{t}$ both declivities have the same value, or equivalently, their normal vectors are aligned.

Their normal vectors are

${\vec{n}}_{C} = \left\{{C}_{x} , {C}_{y}\right\} = \left\{2 \left({x}_{t} - {x}_{0}\right) , 2 \left({y}_{t} - {y}_{0}\right)\right\}$ and
${\vec{n}}_{L} = \left\{{L}_{x} , {L}_{y}\right\} = \left\{a , b\right\}$

so at tangency

${\vec{n}}_{C} = \lambda {\vec{n}}_{L}$

The tangency point is obtained solving

{ (2(x_t-x_0)+lambda a = 0), (2(y_t-y_0)+lambda b = 0), (a x_t + b y_t + c = 0) :}

Here we know ${x}_{0} , {y}_{0} , a , b , c$ and we are looking for ${x}_{t} , {y}_{t} , \lambda$

but

{ (x_t=-(a c - b^2 x_0 + a b y_0)/(a^2 + b^2)), (y_t = -(b c + a b x_0 - a^2 y_0)/(a^2 + b^2)), (lambda = (2 (c + a x_0 + b y_0))/(a^2 + b^2)) :}

substituting the known values we obtain

${x}_{t} = 1 , {y}_{t} = 1 , \lambda = - 6$

we know that

${r}^{2} = {\left({x}_{t} - {x}_{0}\right)}^{2} + {\left({y}_{t} - {y}_{0}\right)}^{2}$

so the circle is

$C \to {\left(x - 4\right)}^{2} + {\left(y + 5\right)}^{2} - 45 = 0$