# Equation of a line tangent to a circle

#### Armela

##### New member
The circle x^2 +y^2 -4x+2y+m=0 is tangent with the line y=x+1.Find m.

p.s : I know that o should solve it from the equations of two lines but i really get confused when i substitute the y :/ .
Thanx #### Jameson

Staff member
Hi Armela,

Welcome to MHB! Geometry is not my strong suit at all, but I did find this link for you which might be useful.

Jameson

#### Opalg

##### MHB Oldtimer
Staff member
The circle x^2 +y^2 -4x+2y+m=0 is tangent with the line y=x+1.Find m.

p.s : I know that o should solve it from the equations of two lines but i really get confused when i substitute the y :/ .
Thanx When you substitute $y=x+1$ in the equation of the circle, you get a quadratic equation for $x$. Solve that quadratic equation using the "$\sqrt{b^2-4ac}$" formula (the solution will involve the constant $m$). If $b^2-4ac$ is positive then there are two solutions to the equation, meaning that the line cuts the circle in two points. If it is negative then there are no solutions, meaning that the line misses the circle. But if it is zero then there is just one (repeated) solution, meaning that the line is tangent to the circle.

#### earboth

##### Active member
The circle x^2 +y^2 -4x+2y+m=0 is tangent with the line y=x+1.Find m.

p.s : I know that o should solve it from the equations of two lines but i really get confused when i substitute the y :/ .
Thanx Maybe I understand your remark about the two lines completely wrong, but here comes a way to use actually two lines:

1. Determine the center of the circle by completing the squares. You should come out with:

$\displaystyle{(x-2)^2+(y+1)^2= 5-m}$

So the center is at C(2, -1)

2. If the given line is a tangent to the circle then the radius of the circle is perpendicular to the given line at the tangent point T.
The given line has the slope m = 1 therefore the line frome the center C to the tangent point T has the slope m = -1.
Determine the equation of the line CT. You should come out with

$y = -x+1$

3. Determine the intercept between the given line and CT to get the coordinates of T. You should come out with $T(0, 1)$.

4. Calculate the distance $r=|\overline{CT}|$.

Since $r^2=5-m$ you are able to determine the value of m.