What is the farthest point from another point, constrained to the intersection of a hyperplane and a hypersphere?

49 Views Asked by At

Assume a unit hypersphere $ S^{(n-1)} $has its center at the origin in an n-dimensional space:

$$ x_1^2 + x_2^2 + ... + x_n^2 = 1 $$

Assume also that a hyperplane with unit normal $n$ intersects the hypersphere at a distance $D$ from origin, where $ |D| <= 1 $, (i.e. the hyperplane and hypersphere do intersect).

$$ x \cdot n = D $$

I'm trying to find the point $x$ such that the distance from point $x$ and another point $p$ is maximized, such that x is constrained to reside on the intersection. This appears to be a constrained optimization problem suitable for employing LaGrange multipliers subject to two constraints. I have identified $ f(x) $ to maximize "distance squared" instead of trying to maximize "distance":

$$ f(x) = (x_1 - p_1)^2 + (x_2 - p_2)^2 + ... + (x_n - p_n)^2 $$

Next,

$$ g_1(x) = x_1^2 + x_2^2 + ... + x_n^2 - 1 = 0 $$

$$ g_2(x) = n_1 x_1 + n_2 x_2 + ... + n_n x_n - D = 0 $$

The LaGrange function subject to two constraints is:

$$ L(x_1, x_2, ..., x_n, \lambda_1, \lambda_2) = f(x) - \lambda_1 g_1(x) - \lambda_2 g_2(x) $$

Getting to the gradients, we solve the following for x and $ \lambda $:

$$ \dfrac{\partial L}{\partial x_i} = 2(x_i - p_i) - 2 \lambda_1 x_i - \lambda_2 n_i = 0 $$

$$ \dfrac{\partial L}{\partial \lambda_1} = - g_1(x) = - x_1^2 - x_2^2 - ... - x_n^2 + 1 = 0 $$

$$ \dfrac{\partial L}{\partial \lambda_2} = - g_2(x) = - n_1 x_1 - n_2 x_2 - ... - n_n x_n + D = 0 $$

Rearranging, there are n+2 equations in n+2 unknowns:

$$ 2 x_i - 2 \lambda_1 x_i - \lambda_2 n_i = 2 p_i $$

$$ x_1^2 + x_2^2 + ... + x_n^2 = 1 $$

$$ n_1 x_1 + n_2 x_2 + ... + n_n x_n = D $$

That's what I have so far. Is this approach correct? I'm stuck here, though. How to solve the last part?