Maximization Of Multivariable function let $F(a,b,c,d,e,f) = abcdef$ and our constraint is  $a^2+b^2+c^2+d^2+e^2+f^2=6$ ,$a+b+c+d+e+f=0$ then lagrange
we get
$abcdef = 2a^2k +ma=2b^2.k+m.b =.....=2f^2.k+mf$ but this is quite complicated to do is there any elegant way like trig sub or something
for $a,b,c,d,e,f$ real numbers
 A: The following satisfy the constraints:
$$a=b=c=d=\frac{1}{\sqrt2}$$
$$e=f=-\frac{2}{\sqrt2}$$
$$abcdef=\frac12$$
In fact, this will turn out to be the maximum, but for now, we just need to note that  the maximum is greater than zero.
$a+b+c+d+e+f=0$ tells us that some are positive and some are negative. In fact, the number of positive values must be even because $abcdef>0$.
We assume that there are 4 positive values (a,b,c,d) and two negative (e,f). The proof for 2 positive and 4 negative is much the same.
Define
$$E=-e$$
$$F=-f$$
$$a+b+c+d=E+F=S$$
$$E^2+F^2=Q$$
$$a^2+b^2+c^2+d^2=6-Q$$
Now apply the inequality of geometric, arithmetic and quadratic means:
$$(abcd)^{\frac14} \leqslant \frac{S}{4}  \leqslant \left(\frac{6-Q}{4}\right)^{\frac12} \tag1$$
$$(EF)^{\frac12} \leqslant \frac{S}{2}  \leqslant \left(\frac{Q}{2}\right)^{\frac12} \tag2$$
From the second parts of (1) and (2):
$$S^2 \leqslant 24-4Q$$
$$S^2 \leqslant 2Q$$
and combining these gives
$$S\leqslant 2 \sqrt 2 \tag3 $$
From the first parts of (1) and (2):
$$abcd \leqslant \frac{S^4}{256}$$
$$ef=EF \leqslant \frac{S^2}{4}$$
Multiply:
$$abcdef \leqslant \frac{S^6}{1024} \leqslant  \frac{( 2 \sqrt 2 )^6}{1024}=\frac12 $$
As required.
A: More generally, let $\,\mathbb x = (x_1, x_2, \dots, x_n)\,$ and consider the problem of maximizing $\,F(\mathbb x)=\prod_{i=1}^n x_i\,$ subject to $\,G(\mathbb x)=\sum_{i=1}^n x_i^2 = m \gt 0\,$ and $\,H(\mathbb x)=\sum_{i=1}^n x_i = 0\,$.
Following up on OP's approach using Lagrange multipliers with $\,\mathcal L = F + \lambda G + \mu H\,$, setting the partial derivatives to zero gives:
$$
F(\mathbb x) = 2 \lambda x_1^2 + \mu x_1 = 2 \lambda x_2^2 + \mu x_2 = \dots = 2 \lambda x_n^2 + \mu x_n
$$
Adding up the $\,n\,$ equalities $\,F(\mathbb x) = 2 \lambda x_i^2 + \mu x_i\,$ and using the two constraints gives $\,nF(\mathbb x) = 2\lambda m\,$, then substituting back gives $\,2 \lambda m = 2 \lambda n x_i^2 + \mu n x_i\,$ or, with $\,x_i \ne 0\,$:
$$
\frac{m}{x_i} - n x_i = \frac{\mu n}{2 \lambda}
$$
Writing the equality for two indexes $\,i,j\,$ and subtracting gives:
$$
0 = \left(\frac{m}{x_i} - n x_i\right) - \left(\frac{m}{x_j} - n x_j\right) = \frac{(x_j-x_i)(m + n x_ix_j)}{x_ix_j}
$$
It follows that either $\,x_j=x_i\,$ or $\,x_j = -\dfrac{m}{nx_i}\,$. Suppose $\,x_1=x_2 = \dots =x_p = a\,$ for some $\,p\,$, and $\,x_{p+1} = x_{p+2} = \dots =x_n = -\dfrac{m}{na}\,$. Then for the constraints to be satisfied:
$$
\begin{align}
m = G(\mathbb x) = p a^2 + (n-p)\frac{m^2}{n^2a^2} &\quad\iff\quad pn^2 a^4 - m n^2 a^2 + (n-p)m^2 = 0
\\ &\quad\iff\quad (n a^2- m) (p n a^2 - m (n - p)) = 0
\\ 0 = H(\mathbb x) = p a - (n-p)\frac{m}{n a} &\quad\iff\quad p n a^2 - m (n - p) = 0 
\end{align}
$$
Solving the system for $\,p, a\,$ gives either $\,a^2 = \dfrac{m}{n}\,$ and $\,p=\dfrac{n}{2}\,$, or $\,a^2 = \dfrac{m(n-p)}{pn}\,$ with an arbitrary $\,1 \le p \le n\,$. Each of these corresponds to a potential local extremum, and can be further analyzed on a case-by-case basis.
OP's problem is the case $\,n=m=6\,$. For a maximum, the number of negative factors must be even so that the product is positive, so $\,p=2\,$ or $\,p=4\,$. It is sufficient to consider the case $\,p=2\,$, since the other one follows from the substitution $\,x_i \mapsto -x_i\,$. With $\,p=2\,$ the previous formula gives $\,a^2 = \frac{6 \cdot (6 - 2)}{2 \cdot 6}=2\,$, so the maximum of $\,\frac{1}{2}\,$ is attained at $\,\left(\sqrt{2}, \sqrt{2}, \frac{-1}{\sqrt{2}}, \frac{-1}{\sqrt{2}}, \frac{-1}{\sqrt{2}}, \frac{-1}{\sqrt{2}}\right)\,$ and permutations thereof.
