Closed form solution to a problem of tangent circles I have two circles, that I know are both tangential to a third (unknown) circle. I also know what quadrants of the circles the tangential points are in. It is as pictured below. I also know the arc angle that the third circle spans between the two tangential points (beta).

I would like to know the location of the two tangential points, as well as one of the tangential directions, so I can draw the unknown (red) circle.

I currently have a working solution for this involving a nonlinear equation solver. If at all possible I would like to have a solution that involves no non-linear equation solving, because I need to run very many of these problems and I need precise results.
First let us solve the radius of your circle. You can see that the centers of the circles form a triangle. There are 8 possible triangles, of which 4 are mirror solutions across the line that connects the centers of your original circles.  The other solutions are permutations of inside tangent and outside tangent connections. 



Image 1: All possible solutions

So knowing the quadrant is hardly enough for the choice of solution.

Solving the triangles



So for eaxmple let the circle be on the inner outside of both circles (the sign changes for the other solutions). Now you need to solve the equation:

$$
 D^2=(x+r_1)^2+(x+r_2)^2-2(x+r_1)(x+r_2)\cos(\beta)
$$

Now this can be solved in a computer algebra system and gives 2 solutions with numerous corner constraints (do it yourself it's important for robust code and obviously you need 4 solutions to check.)

$$
x=\frac{1}{2} \left(\pm\sqrt{\frac{\cos (\beta) (r_1-r_2)^2-2 D^2+(r_1-r_2)^2}{\cos (\beta)-1}}-r_1-r_2\right)
$$

Once you have x solved you can solve the center. This can be done in many ways but I would proceed by solving angle $\alpha$ and some vector rotation, normalization and scalar multiplication. Same calculation can be used to find the intersection point and the tangent is just this vector rotated by 90 degrees.

You could also use an alternate formulation with 2 angles and a vector sum of $a+b-c=0$, with 2 unknowns and 2 equations.