A $3d$ circle is the intersection of two spheres given by
$ (r - C_1)^T (r - C_1) = R_1^2 $
$ (r - C_2)^T (r - C_2) = R_2^2 $
I'd like to find the points on this circle of intersection that are at a minimum/maximum distance from the origin.
My attempt:
Building a Lagrange multiplier function
$ g(r , \lambda_1, \lambda_2) = r^T r + \lambda_1 ( (r - C_1)^T (r - C_1) - R_1^2 ) + \lambda_2 ( (r - C_2)^T (r - C_2) - R_2^2 ) $
it follows that the gradient is
$ \nabla_r g = 2 \bigg( r + \lambda_1 (r - C_1) + \lambda_2 (r - C_2) \bigg) = \mathbb{0}$
In addition to this equation we have the two equations of the two spheres.
There are $5$ unkowns which are the three coordinates of $r$ and $\lambda_1$ and $\lambda_2$.
That's where I am at. The task now to solve these equations for the unknowns.
Any help would be appreciated. Thank you all.
Edit:
Let $u$ be perpendicular to $C_1$ and $C_2$ , then
$u^T \bigg( r + \lambda_1 (r - C_1) + \lambda_2 (r - C_2) \bigg) = ( u^T r ) (1 + \lambda_1 + \lambda_2 ) = 0 $
which means that
$ u^T r = 0 $
Combining this equation with the two equations of the two spheres, one can find the critical points satisfying all three equations. There will be two such points, one corresponding to the minimum distance from the origin and one corresponding to the maximum.
The furthest I get is as follows:
The equation $\nabla_rg = 0$ gives you an expression for $r$ in terms of the Lagrange multipliers $\lambda_1,\lambda_2$: $$ r = \frac{\lambda_1C_1+\lambda_2C_2}{1+\lambda_1+\lambda_2}. $$ Plugging this expression into the equation for the two spheres you get $$ \lvert C_1 + \lambda_2(C_2 - C_1)\rvert^2 = R_1^2(1+\lambda_1+\lambda_2)^2, $$ $$ \lvert C_2 + \lambda_1(C_2 - C_1)\rvert^2 = R_2^2(1+\lambda_1+\lambda_2)^2. $$ These give you two polynomial equations in $\lambda_1, \lambda_2$ of degree 2. However, I'm not sure you can find explicit solutions to them without it becoming very messy...