# Common tangent to two circles

Find the equations of the common tangents to the 2 circles:

$$(x - 2)^2 + y^2 = 9$$ and
$$(x - 5)^2 + (y - 4)^2 = 4.$$

I've tried to set the equation to be $y = ax+b$, substitute this into the 2 equations and set the discriminant to zero, we then get a simultaneous quadratic equations. But they are really difficult to solve. So is there any simpler way to do this? Thank you.

-
Do you know that the slope of the tangent to a graph is given by the derivative? – Dennis Gulko Oct 12 '12 at 8:49
There are, in general, four common tangents to two circles, so you would expect to have four solutions. I would draw a diagram and use some geometry - because these two circles seem to touch, and the tangent at that point will be perpendicular to the line joining the two centres. There are two other common tangents, but if the question is asking for one, I think it would be this one. – Mark Bennet Oct 12 '12 at 8:57
@ Dennis Gulko: Please don't use calculus. @ Mark Bennet: I know these're 3 equations. – ᴊ ᴀ s ᴏ ɴ Oct 12 '12 at 9:05
Have you tried drawing a diagram, including the line joining the centres extended to meet two of the tangents, and for these two (more difficult) tangents, considering (a) obvious symmetry and (b) similar triangles. All the algebraic manipulation reduces to this anyway. I think this approach (which may involve tan(a+b)) clarifies what is at issue. – Mark Bennet Oct 12 '12 at 21:47

You can approach this with homogeneous coordinates. A circle with equation $(x-x_c)^2+(y-y_c)^2 - r^2 = 0$ is represented by a 3x3 matrix as

$${\rm Circle}(x_c,y_c,r) = \begin{bmatrix} 1 & 0 & -x_c \\ 0 & 1 & -y_c \\ -x_c & -y_c & x_c^2+y_x^2-r^2 \end{bmatrix}$$

This means that the equation for a circle $C_1 = \begin{bmatrix} 1 & 0 & -2 \\ 0 & 1 & 0 \\ -2 & 0 & -5 \end{bmatrix}$ is given by the quadratic form

$$P^\top C_1 P = 0$$ $$x^2-4 x+y^2-5 = 0$$

which is the equation for the first circle when expanded out, and $P=\begin{pmatrix} x&y&1 \end{pmatrix} ^\top$ is an arbitrary point.

The second circle is $C_2 = \begin{bmatrix} 1 & 0 & -5 \\ 0 & 1 & -4 \\ -5 & -4 & 37 \end{bmatrix}$.

Now here is the fun stuff. A line in this notation in general is defined as $L=\begin{vmatrix}a&b&c\end{vmatrix}^\top$ such that the equation of the line is

$$P^\top L =0$$ $$a x+b y+c = 0$$

Actually $a$, $b$ above designate the direction of the line such that if the line makes an angle $\theta$ with the horizontal then the line is $L=\begin{vmatrix}-\sin\theta&\cos\theta&-d\end{vmatrix}^\top$ and $d$ is the distance of the line to the origin.

We are using the above information to find the lines that are tangent to both circles. A tangent line to the first circle has satisfies the equation

$$L^\top C_1^{-1} L =0$$ $$d = \pm 3 -2 \sin \theta$$

with the two possible line equations

$$L_A = \begin{vmatrix}-\sin\theta_A&\cos\theta_A &2\sin\theta_A-3\end{vmatrix}^\top$$ $$L_B = \begin{vmatrix}-\sin\theta_B&\cos\theta_B &2\sin\theta_B+3\end{vmatrix}^\top$$

to find the orientations of these lines $\theta_A$ and $\theta_B$ we have to find the lines that are tangent to the second circle, and match the coefficients

$$L^\top C_2^{-1} L =0$$ $$d = \pm 2 + 4 \cos \theta -5 \sin \theta$$

with also two possible line equations

$$L_A = \begin{vmatrix}-\sin\theta_A&\cos\theta_A &-4\cos\theta_A+5\sin\theta_A-2\end{vmatrix}^\top$$ $$L_B = \begin{vmatrix}-\sin\theta_B&\cos\theta_B &-4\cos\theta_B+5\sin\theta_B+2\end{vmatrix}^\top$$

Setting $L_A=L_A$ and solving for $\theta_A$ yields the following

$$2\sin\theta_A-3 = -4\cos\theta_A+5\sin\theta_A-2$$ $$4\cos\theta_A-3\sin\theta_A =1$$ $$\sin\theta_A = \frac{8\sqrt{6}-3}{25}$$

with the solution

$$L_A = \begin{vmatrix} \frac{3-8\sqrt{6}}{25} & \frac{4+6\sqrt{6}}{25} & \frac{16 \sqrt{6}-81}{25} \end{vmatrix}$$ $$\left( \frac{3-8\sqrt{6}}{25}\right) x + \left(\frac{4+6\sqrt{6}}{25}\right) y + \left(\frac{16 \sqrt{6}-81}{25}\right) = 0$$ $$-0.664 x + 0.7479 y - 1.6723 = 0$$

Similarly with $L_B=L_B$ yielding $4\cos\theta_B-3\sin\theta_B=-1$ or

$$L_B = \begin{vmatrix} -\frac{3+8\sqrt{6}}{25} & \frac{6\sqrt{6}-4}{25} & \frac{16 \sqrt{6}+81}{25} \end{vmatrix}$$ $$-\left(\frac{3+8\sqrt{6}}{25}\right) x + \left(\frac{6\sqrt{6}-4}{25}\right) y + \left(\frac{16 \sqrt{6}+81}{25}\right) = 0$$ $$-0.904 x + 0.4278 y + 4.808 = 0$$

Here are the results plotted in GeoGebra for validation.

-

A line with equation $ax+y+c=0$ is tangent to a circle iff its distance from the center of the circle is equal to the radius of the circle, so you get the sistem(s):

$$\left\{\begin{array}{rcl}|2a+c| &=& 3\sqrt{a^2+1} \\ |5a+4| &=& 2\sqrt{a^2+1}. \end{array}\right.$$

with $4$ solutions.

-
Can you explain these 2 equations a bit more? – ᴊ ᴀ s ᴏ ɴ Oct 13 '12 at 5:01
The distance between a line with equation $ax+by+c=0$ and a point $(x_0,y_0)$ is given by $\frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}. In this particular case, the distance between the centers of the two circles is equal to the sum of their radiuses, so the two circles are externally tangent, and the intersection of the two externally tangent lines is the exterior homotetic center of the two circles. – Jack D'Aurizio Oct 15 '12 at 12:05 The parametric equation of$(x-a)^2+(y-b)^2=r^2$is$(x=a+r\cos C,y=b+r\sin C)$Let $$\frac{y-(b+r\sin C)}{x-(a+r\cos C)}=m$$ be a tangent at$(a+r\cos C,b+r\sin C)$, then the distance of line from the center is equal to the radius. $$r=\frac{\mid m(a-a-r\cos C)-b+b+r\sin C\mid}{\sqrt{m^2+1}}=\frac{r\mid\sin C-m\cos C\mid}{\sqrt{m^2+1}}$$$m^2+1=(\sin C-m\cos C)^2\implies (m\sin C+\cos C)^2=0\implies m=-\frac{\cos C}{\sin C}$So, the equation of the tangent becomes $$\frac{y-(b+r\sin C)}{x-(a+r\cos C)}=-\frac{\cos C}{\sin C}$$$x\cos C+y\sin C-a\cos C-b\sin C -r=0$(this can also be reached using calculus) For$(x-2)^2+y^2=9,a=2,b=0,r=3$So, equation of the tangent will be$x\cos A+y\sin A-2\cos A -3=0$For$(x-5)^2+(y-4)^2=4,a=5,b=4,r=2$So, equation of the tangent will be$x\cos B+y\sin B-5\cos B-4\sin B -2=0$For common tangent, these two lines must be same, So, $$\frac{\cos A}{\cos B}=\frac{\sin A}{\sin B}=\frac{2\cos A+3}{5\cos B+4\sin B+2}$$$\frac{\cos A}{\cos B}=\frac{\sin A}{\sin B}\implies \sin(A-B)=0\implies A=B$or$A=\pi+B$(1)If$A=B,1=\frac{2\cos B+3}{5\cos B+4\sin B+2}\implies 4\sin B+3\cos B=1$(2)If$A=\pi+B,\cos A=\cos(\pi+B)=-\cos B, -1=\frac{-2\cos B+3}{5\cos B+4\sin B+2}$For (1),$4\sin B+3\cos B=1$Putting$4=R\sin D,3=R\cos D\implies R=5,D=cos^{-1}\frac 3 5,\cos(B-D)=\frac 1 5, B-\cos^{-1}\frac 3 5 =2n\pi \pm \cos^{-1}\frac 1 5$where$n$is any integer.$\cos B=\frac{3 \pm 8\sqrt{6}}{25},\sin B$can be calculated uniquely using (1). So, there will be two tangent in this case. For(2)$ 3\cos B+4\sin B=-5$Applying the same approach like in (1),$\cos(B-\cos^{-1}\frac 3 5)=-1=\cos \pi, B=\cos^{-1}\frac 3 5+\pi\cos B=\cos(\cos^{-1}\frac 3 5+\pi)=-\cos(\cos^{-1}\frac 3 5)=-\frac 3 5\sin B$becomes$-\frac 4 5$So, the tangent becomes,$(x-5)(-\frac 3 5)+(y-4)(-\frac 4 5) -2=0$- For the circles $$(x - 2)^2 + y^2 = 9\text{ and } (x - 5)^2 + (y - 4)^2 = 4,$$ using Article$180$of The elements of coordinate geometry by Loney, Case$1:$If$T_2$is the point dividing internally the line joining the centres in the ratio$2:3$then its coordinates are $$\left(\frac{2\cdot2+5\cdot3}{2+3},\frac{2\cdot0+4\cdot3}{2+3}\right)=\left(\frac{19}5,\frac{12}5\right)$$ Now, the equation of any line passing through$T_2\left(\frac{19}5,\frac{12}5\right)$is $$\frac{y-\frac{12}5}{x-\frac{19}5}=m\implies 5mx-5y+12-19m=0$$ where$m$is the gradient If it is the tangent of the circle, the distance of this line from the centre of each circle will be equal to the radius of the respective circle. $$\implies \left|\frac{5m\cdot 2-5\cdot0+12-19m}{\sqrt{(5m)^2+(-5)^2}}\right|=3\implies |12-9m|=15\sqrt{m^2+1}$$ $$\text{On squaring and re-arrangement, } 16m^2+24m+9=0\implies m=-\frac34$$ So, there will be only one crossed common tangent Case$2:$If$T_1$is the point dividing externally the line joining the centres in the ratio$2:3$then its coordinates are $$\left(\frac{2\cdot2-5\cdot3}{2-3},\frac{2\cdot0-4\cdot3}{2-3}\right)=\left(11,12\right)$$ Now, the equation of any line passing through$T_1\left(11,12 \right)$is $$\frac{y-12}{x-11}=n\implies nx-y+12-11n=0$$ where$n$is the gradient Can you follow the method used in Case$1$to find the two values of$n,\$ which implies there will be two simple common tangents

-