# How to find $k$ such that the line $y=x-2-k$ is tangent to the circle given by $x^2+(y+2)^2=4$?

I have the circle $$x^2+(y+2)^2=4$$ and the line $$y=x-2-k$$. How would you find a $$k$$ value that would allow the second equation to sit tangent to the circle? There should, in theory, be only two solutions.

I can't make sense of this problem as you can't equate these problems to find a point. Thinking of this problem, I would think of using the discriminate, but I cannot find the proper equation format by manipulating the equation in order to make it fit in the form $$ax^2+bx+c$$.

Would anyone have any clue on how you may find this value? I've noticed by typing it into a CAS, it partially solves it by stating the domain of k can only be within $$2\sqrt2$$ or $$-2\sqrt2$$ which are the solutions to this problem but I would like to understand how it may have equated this domain.

Thank you for your help.

## 2 Answers

The line is tangent to the circle iff they intersect at exactly one point. The intersection is given by a quadratic equation, the number of solutions is given by the sign of the discriminant (you want the discriminant to be $$0$$).

The circle and the line intersect at $$x$$ given by $$x^2+(x-k)^2=4$$, i.e. $$2x^2-2kx+k^2-4=0$$.

There is only one possible $$x$$ if $$\Delta=32-4k^2=0$$, that is when $$k=\pm2\sqrt{2}$$.

Then the coordinates of the tangent points are given by $$x=\frac k2, y=-\frac k2-2$$.

• @Ryan_DS The coefficients $a,b,c$ in $ax^2+bx+c$ are respectively $2, -2k, k^2-4$, and the discriminant is $b^2-4ac=(-2k)^2-4\times2\times(k^2-4)=4k^2-8k^2+32=32-4k^2$. – Jean-Claude Arbaut Apr 17 at 8:54

There's another approach with calculus.

The slope of equation $$y = x-2-k$$ is 1. Differentiating the equation of circle we get $$\frac{dx^2}{dx} + \frac{d(y+2)^2}{dx} = 0 \\ 2x + 2(y+2)\frac{d(y+2)}{dx} = 0\\ x + (y+2)\frac{dy}{dx} = 0\\ \frac {dy}{dx} = \frac{-x}{y+2}$$ This gives the slope of tangent at any point on the circle.

Equating this to 1 we get $$-x=y+2$$ substituting it in equation of circle, we get $$x=\pm \sqrt 2 \implies y=\mp \sqrt 2 -2$$

It means the tangents at point $$(\sqrt 2, -\sqrt 2 -2)$$ and $$(-\sqrt 2, \sqrt 2 -2)$$ to the circle have slope 1 which is exactly the slope of the given line.

Substituting these values in the equation $$y=x-2-k$$, we get $$k=\pm 2\sqrt 2$$

• I like the approach, but isn't the differentiated equation of the circle $(2-x)/y$? – Ryan_DS Apr 18 at 2:38
• @Ryan_DS It isn't $(2-x)/y$. I edited the answer to include the complete differentiation process. – dssknj Apr 19 at 10:51