Two circles of radius $r$ are tangent to each other. Two lines pass through the centre of one circle and are tangent to the other circle at points $A$ and $B$ as shown in the diagram. Find an expression for the distance between $A$ and $B$.
[![enter image description here][1]][1]
I was thinking about setting up a function for the circle and differentiate it to find the tangents at point $A$ and $B$- except I have no idea how to set up the function. Does anyone have an idea on how to solve this problem?
A calculus-based approach isn't as elegant as the geometry-based ones shown in other answers, but it can be instructive.
We'll take the circles to have centers at $P(-2r,0)$ and $Q(0,0)$, so that the right-hand circle has equation $$x^2 + y^2 = r^2 \tag{1}$$ Implicit differentiation gives $2x + 2yy^\prime = 0$, so that the slope of the tangent to that circle at, say, $A(a_x,a_y)$ is $$m = -\frac{a_x}{a_y} \tag{2}$$ But the tangent line must pass through $P$, so we can calculate the slope of the line using $A$ and $P$: $$m = \frac{a_y - 0}{a_x-(-2r)} = \frac{a_y}{a_x+2r} \tag{3}$$ Equating $(2)$ and $(3)$, and recalling that $(a_x,a_y)$ satisfies $(1)$, we have $$-\frac{a_x}{a_y} = \frac{a_y}{a_x+2r} \;\to\; -a_x(a_x+2r) = a_y^2 = r^2- a_x^2 \;\to\; a_x=-\frac12 r \;\to\; a_y = \frac{\sqrt{3}}{2}r \tag{4}$$ Since the distance from $A$ to $B$ is clearly twice distance from $A$ to the $x$-axis, we conclude
Things are a little messier if you use explicit differentiation on $$y = \sqrt{r^2-x^2}$$ Alternatively, one can differentiate the parametric representation of the circle $$(r \cos\theta, r\sin\theta)$$ In any case, the strategy of comparing the calculus-derived slope to the basic rise-over-run calculation gives the condition that leads to the ultimate solution.