Find the minimum value of $x_1^2+x_2^2+x_3^2+x_4^2$ subject to $x_1+x_2+x_3+x_4=a$ and $x_1-x_2+x_3-x_4=b$. Question: Find the minimum value of $x_1^2+x_2^2+x_3^2+x_4^2$ subject to $x_1+x_2+x_3+x_4=a$ and $x_1-x_2+x_3-x_4=b$.
My attempt: It can be easily seen that $x_1+x_3=\frac{a+b}{2}$ and $x_2+x_4=\frac{a-b}{2}$. Further, the expression $[x_1^2+x_2^2+x_3^2+x_4^2]$ can be written as $[(x_1+x_3)^2+(x_2+x_4)^2-2(x_1x_3+x_2x_4)].$ I'm having trouble eliminating $(x_1x_3+x_2x_4)$ from this expression. Failing to make any sense out of this, I manipulated the existing expressions to deduce $$x_1x_2+x_1x_4+x_2x_3+x_3x_4=\frac{a^2-b^2}{4}$$and $$(x_1^2+x_3^2)-(x_2^2+x_4^2)+2(x_1x_3-x_2x_4)=a\cdot b$$Beyond this, I cannot make sense of the expressions anymore. I have no idea how to proceed with simplifying the expressions further, and would appreciate hints in the same direction.

Why not use a Lagrangian and find an optimal value for a constrained optimization problem?
That is,
$$
\begin{array}{cl}
\min_{x} & x^T x \\
\text{subject to} & v_1^T x = a, v_2^T x = b
\end{array}
$$
where $x = [\begin{array}{cccc} x_1 & x_2 & x_3 & x_4 \end{array}]^T$, $v_1 = [\begin{array}{cccc} 1 & 1 & 1 & 1 \end{array}]^T$, and $v_2 = [\begin{array}{cccc} 1 & -1 & 1 & -1 \end{array}]^T$.
The Lagrangian is given by
$$
L = x^T x + \lambda_1 (a-v_1^T x) + \lambda_2 (b-v_2^T x).
$$
The gradient of $L$ is $\nabla_x L = 2x - \lambda_1 v_1 - \lambda_2 v_2$, setting it to zero gives the optimal solution
$$
x^* = \frac{\lambda_1 v_1 + \lambda_2 v_2}{2}.
$$
The solution must satisfy the constraints $v_1^T x^* = a$ and $v_2^T x^* = b$, which gives us two equations
$$
\begin{array}{ccl}
\displaystyle \frac{\lambda_1 v_1^T v_1 + \lambda_2 v_1^T v_2}{2} &=& a \\
\displaystyle \frac{\lambda_1 v_2^T v_1 + \lambda_2 v_2^T v_2}{2} &=& b.
\end{array}
$$
By solving these equations, we obtain $\lambda_1 = a/2$ and $\lambda_2 = b/2$. (Notice that $v_1^T v_2 = v_2^T v_1 = 0$ and $v_1^T v_1 = v_2^T v_2 = 4$.)
Finally, the minimum value of $x^T x$ under the constraints $v_1^T x = a$ and $v_2^T x = b$ is given by
$$
\begin{array}{ccl}
x^T x &=& \displaystyle \left(\frac{a v_1 + b v_2}{4}\right)^T \left(\frac{a v_1 + b v_2}{4}\right) \\
&=& \displaystyle \frac{a^2 + b^2}{4}.
\end{array}
$$
