The real numbers $x,y$ and $z$ are such that $x-7y+8z=4$ and $8x+4y-z=7$. What is the maximum value of $x^2-y^2+z^2?$
From those equations I got:
$12z-5x=13y$
$12x+5z=13$
$12y+5=13z$
$12-5y=13x$
I know that $5,12,13$ is a pythag triplet but I don’t know what to do next. I think lagrange multipliers could be used but there should be a solution that doesn’t require calculus
Hints, suggestions and solutions would be appreciated.
Taken from the 2014 KIMC https://chiuchang.org/imc/wp-content/uploads/sites/2/2018/01/2014-IWYMIC-Individual.x17381.pdf