# Extrema of $f(x)=g(|x-a|^2,|x-b|^2,|x-c|^2):\Bbb{R}^n\to \Bbb{R}$ in $S=\{x: |x|=1\}\subset \Bbb{R}^n$ is a linear combination of $a,b,c$

Since I am getting pretty close to the final exams, I would really yield from having my practice challenged and corrected.

Question: Let $a,b,c\in \Bbb{R}^n$ be independent vectors, and $g\in C^{1}(\Bbb{R}^3)$. In the sphere $S=\{x:|x|=1\}$, let us define $$f(x)=g(|x-a|^2,|x-b|^2,|x-c|^2)$$ Suppose $x_0$ is an extrema of $f$ in $S$ and assume $\nabla g(|x-a|^2,|x-b|^2,|x-c|^2)\ne 0$. Prove that $x_0$ belongs to a 3-dimensional subspace of $\Bbb{R}^n$, spanned by $a,b,c$.

(It wasn't quite stated if $f$'s image is in $\Bbb{R}$, but I will assume so).

My attempt would be: Denote $h(x)=(|x-a|^2,|x-b|^2,|x-c|^2)$. Then, $(Dg)_{h(x_0)}(Dh)_{x_0}=\nabla f(x_0)=\lambda \nabla (|x_0|^2-1)$, by Lagrange Multipliers Method, for some $\lambda$. I arrive at:

$(\nabla g)_{h(x)}\begin{pmatrix} {\partial h_a\over \partial x_1} & {\partial h_a\over \partial x_2} & \cdots & {\partial h_a\over \partial x_n} \\ \ {\partial h_b\over \partial x_1} & {\partial h_b\over \partial x_2} & \cdots & {\partial h_b\over \partial x_n} \\ {\partial h_c\over \partial x_1} & {\partial h_c\over \partial x_2} & \cdots & {\partial h_c\over \partial x_n} \end{pmatrix}_{x_0}=2(\nabla g)_{h(x_0)} \begin{pmatrix} {x_1-a_1} & {x_2-a_2} & \cdots & {x_n-a_n} \\ \ {x_1-b_1} & {x_2-b_2} & \cdots & {x_n-b_n} \\ {x_1-c_1} & {x_2-c_2} & \cdots & {x_n-c_n} \end{pmatrix}_{x_0}=2\lambda x_0$.

Noting that $(\nabla g)(h(x_0))$ is simply a non-zero vector, $(y_a,y_b,y_c)$, I get:

$\lambda x_0=(\sum_{i=a}^{c}(x_1-i_1)y_i,...,\sum_{i=a}^{c}(x_1-i_1)y_i)_{(x_0)}=y_a(x_0-a)+y_b(x_0-b)+y_c(x_0-c)\Rightarrow x_0(y_a+y_b+y_c-\lambda)=y_aa+y_bb+y_cc$. The LHS cannot be $0$, since the RHS is a linear combination of independent $a,b$ and $c$. Is there anything missing in my attempt?

I think your calculation of $(Dh)_{x_0}$ is wrong, but I'm having trouble following it so I'm not quite sure. Notice that ${|x-a|}^2$, which I assume is what you call $h_a$, can be written as:
$$\langle x, x \rangle -2 \langle x, a \rangle + \langle a, a \rangle=-2 \langle x, a \rangle + \left( 1 +\langle a, a \rangle\right)$$
So that $\frac{\partial}{\partial x_i}h_a (x)=-2\cdot \frac{\partial}{\partial x_i} \langle x , a \rangle$. Can you calculate this partial derivative?
Of course, something similar holds for $h_b$ and $h_c$.
• Thank you for your perspective. I was looking at: $\sum_{i=1}^n(x_i-a_i)^2$. It does contain $|x|^2$, but I never thought I am allowed to substitute variables before differentiating. It is something I haven't encountered. If I had done it here, I would have gotten the same result. The question is if it is really allowed or not. I only know $g$ was defined on the sphere, but defining a function on a specific set never seemed to me like much more than concentrating on the set in question when analyzing the the function. I would really like a reference\ explanation about why it is allowed... Jun 7 '16 at 16:26
• I am not sure I understand your doubt. Are you questioning the equality $\langle x, x \rangle = 1$ before differentiation? That is okay precisely because the domain of $f$ is $S$ (ie, the equality holds everywhere on the domain). Jun 7 '16 at 19:48