General strategy to solve systems of 4 variables after using lagrange method? Mind the typical calculus exercise to, for example, determine the points on the sphere x^2 + y^2 + z^2 = 4 that are the nearest to the point (3,1,-1). After using lagrange method you end up with a system of equations like:
2(x-3) = 2xλ
2(y-1) = 2yλ
2(z+1) = 2zλ
x^2 + y^2 + z^2 = 4

I'm having trouble in solving those. I often come up with an answer, but the right way to proceed is not always obvious and this makes me perform wrong initial attempts that cost some precious time. What is the right way to approach this problem? Is there a method or algorithm I can apply that will ensure I wont waste time with the wrong approach (even if it is heavier than going to the 'clever' path?)
Edit: just to clarify, this is only an example. I'm asking for a strategy to solve that kind of equation independent of the kind of initial functions, that will always be: given f(x,y,z) and g(x,y,z) = k, find an λ such that grad(f) = λgrad(g).

In these examples, the Lagrangian usually gives the form of the solution, rather than a solution directly.
In this particular example, you should visualise the problem and conjecture a solution.
The form of the problem shows that the solution space is closed and bounded, hence compact, so there is a minimum. The gradient of the constraint is non-zero on the constraint surface, so we can apply Lagrange.
The above reduces to $(1-\lambda) x = 3, (1-\lambda) y = 1, (1-\lambda) z = -1$. This tells you that $\lambda \neq 1$, and that $(x,y,z) = \frac{1}{1-\lambda} (3,1,-1)$. Now select $\lambda$ so that the constraint is met. This will give you two solutions (why?). Pick the right one.
