Let $A \subset \mathbb{R}^n$.
Denote $A:= \{(x_1,x_2,\cdots,x_n) \in \mathbb{R}^n : x_1+x_2+\cdots+x_n=0, x_1^2+\cdots+x_n^2=1\}$.
Find $\max \{x_1: (x_1,x_2,\cdots,x_n) \in A\}$
My solution:
I have to solve the problem using Lagrange multiplier :
Denote $g(x)=x_1^2+\cdots+x_n^2-1,f(x)=x_1=-x_2-\cdots -x_n,x\in \mathbb{R}^n.$
I have solved $D f = \lambda D g$ and find out that $x_1=0.$
Edit-My try :
$f_{x_1}=-\lambda g_{x_1} \implies 0=-2\lambda x_1 \implies x_1=0$
$f_{x_2}=-\lambda g_{x_2} \implies -1-2\lambda x_2=0$
$\vdots$
$f_{x_i}=-\lambda g_{x_i} \implies -1-2\lambda x_i=0$
Therefore $\lambda = \frac{-1}{2x_i}$ and $x_2=-x_3$ and so on...
I think my solution is not correct.
I wonder if my approach is correct, any help please.
$$x_1^2=(x_2+\cdots+x_n)^2\leq (x_2^2+\cdots+x_n^2)(n-1)=(1-x_1^2)(n-1)$$ by Schwarz inequality. The bound $x_1\leq \sqrt{\frac{n-1}{n}}$ is reached by taking $x_2=\ldots=x_n=-\frac{1}{\sqrt{n(n-1)}}.$