I'm in Multivariable/Vector calculus and this is the final question on the final review. Initially I thought to use a lagrange variable to solve this problem but that resulted in an algebraic nightmare. $$ \lambda = \frac{2y-4}{x} = \frac{2x-2}{y} $$ Am I just missing something in my algebra, is there another way to solve this without a lagrange multiplier, or do I just have to do the algebra? Thank you!
EDIT: To clarify, here's the way I did the Lagrange Multiplier. $$ f(x,y,z) = d^2 = (x-1)^2 + (y-2)^2 + (z-4)^2 $$ $$ g(x,y,z) = 0 = xy-z^2 $$ $$ \nabla f = \lambda \nabla g$$ $$ \lambda y = 2x-2$$ $$ \lambda x = 2y-4$$
And then, from there, I solved for lambda which resulted in the "algebra nightmare". Sorry for not initially including that.