About using the lagrange multiplier. Today I have seen a question like the following;
$x+y+z=5$ and $xy+yz+xz=3$ and $x,y,z \in \mathbb{R}^+$
What is the maximum value $x$ can get?
Now it is pretty obvious that question is solvable using many simple elementary methods like say $(x+y+z)^2=x^2+y^2+z^2+2(xy+yz+xz)=25$
$25=x^2+y^2+z^2+6 \rightarrow x^2+y^2+z^2=19$
Applying Cauchy-Schwarz $(y^2+z^2)(1+1)\geq (z+y)^2$
$2(19-x^2)\ge(5-x)^2$
$x_{max}=\dfrac{13}{3}$
However I would also like to solve it by the lagrange multiplier, here are my efforts
$f(x,y,z,k)=x+5-(y+z)+k(x+y+z-5)$
$f_k'=0$
$f_x'=k+1$
$f_y'=k-1$
$f_z'=k-1$
$k=1,-1$ and $x$ goes nowhere near $\dfrac{13}{3}$

So my question is where am I wrong and how can I fix it?
Besides are there maxima minima questions that can't be solved with lagrange,
is this one of them?

 A: Your function $f(x,y,z,k)=x+5-(y+z)+k(x+y+z-5)$ is not the right function fot Lagrange. The right function is given by
$f(x,y,z,k)=x+5-(y+z)+k(xy+yz+xz-3)$:
A: Using Lagrange multipliers, you could write
$$F=x+\lambda(x+y+z-5)+\mu(xy+yz+xz-3)$$
Computing derivatives 
$$F'_x=1+\lambda +\mu  (y+z)\tag 1$$
$$F'_y=\lambda +\mu  (x+z)\tag 2$$
$$F'_z=\lambda +\mu  (x+y)\tag 3$$
$$F'_\lambda= x+y+z-5\tag 4$$
$$F'_\mu=xy+yz+xz-3\tag 5$$
Now, set all of them equal to $0$ and, solving, you will find two solutions, one for the minimum and the other for the maximum.
A: We will use the quadratic equation approach to determine the min and max values of $x$. We have: $y+z = 5-x$, and $yz + x(y+z) = 3\implies 3- x(5-x)= yz\implies x^2-5x+3= yz\le \dfrac{(y+z)^2}{4}= \dfrac{(5-x)^2}{4}\implies 4x^2-20x+12 \le 25-10x+x^2\implies 3x^2-10x-13 \le 0 \implies (3x -13)(x + 1)\le 0\implies -1 \le x \le \dfrac{13}{3}\implies x_{\text{min}} = -1, x _{\text{max}} = \dfrac{13}{3}$ .
A: It is not allowed to mindlessly apply Lagrange's method to such a problem, for the following reason: The problem defines a more or less complicated global situation, whereas Lagrange's method just produces a few points that might be interesting in the context. But these points can only feel what happens in a tiny neighborhood of them. In the case at hand the constraints define a feasible set $F$ which is the intersection of a plane and a hyperboloid, hence $F$ could a priori extend to infinity, and  the objective function $x\restriction F$ could be unbounded. In addition there is the constraint that all variables should be positive, hence it could very well be that we only have a $\sup$, which is taken when $y\to0+$, $z\to 0+$, etcetera.
You already have found out that all feasible points are lying on the sphere $x^2+y^2+z^2=19$, hence  $F$ lies on the intersection of this sphere with the plane $x+y+z=5$, i.e., on a compact circle $C$. This ensures that we have a $\max x\restriction C$, and this $\max$ would be brought to the fore by Lagrange's method. We are lucky: The method produces exactly two points $p$, $q\in C$ (see @ClaudeLeibovici 's answer). Then one of these has to be the $\max$ of $x\restriction C$ and the other the $\min$ of $x\restriction C$. Now we are lucky again: The max-point $p$ also fulfills the positivity condition (one has to check this!), hence $p$ is a fortiori the maximum for $x\restriction F$. (If  $p$ had violated the positivity condition additional investigations would have been necessary.)
