Calculate the distance from a point to the surface of a circle at an angle

So, we need to find out the distance $PA$ as a function of $\alpha$, including the special case $\alpha =0$. It is a quite interesting and challenging problem.

enter image description here

Let $\beta=∠ACB$ and apply the tangent formula to the right triangle APD,

$$\tan\alpha = \frac{AD}{PD}=\frac{R\sin\beta - h}{R+d-R\cos\beta}$$

Rearrange above equation to express $\beta$ in terms of $\alpha$,

$$R\sin(\beta+\alpha)=(R+d)\sin\alpha + h\cos\alpha$$

$$\beta = \sin^{-1} u -\alpha \tag{1}$$

where,

$$u = \left(1+\frac{d}{R}\right)\sin\alpha + \frac{h}{R}\cos\alpha \tag{2}$$

Next, apply the cosine formula to the right triangle APD to write the distance $PA$ as,

$$PA(\alpha) =\frac{R+d-R\cos\beta}{\cos\alpha}\tag{3} $$

With (1), we evaluate $R\cos\beta$ in above expression to get,

$$R\cos\beta = R\sqrt{1-u^2} \cos\alpha + (R+d)\sin^2\alpha + h\cos\alpha\sin\alpha \tag{4}$$

Plug (2) into (4) and then into into (3), we arrive at the following result,

$$PA(\alpha) =(R+d)\cos\alpha -h\sin\alpha - \sqrt{R^2-[ (R+d)\sin\alpha + h\cos\alpha ]^2} \tag{5}$$

As seen, the distance $PA$ varies with the angle $\alpha$ in a non-trivial way.

Now, consider the special case of $\alpha = 0$. The general result (5) then simplifies greatly,

$$PA(0) = R + d -\sqrt{R^2-h^2}$$