How can I find maximum and minimum modulus of a complex number? I have this problem. Let be given complex number $z$ such that
$$|z+1|+ 4 |z-1|=25.$$
Find the greastest and the least of the modulus of $z$.
I tried with minimum.
Put $A(-1,0)$, $B(1,0)$ and $M(x,y)$ present of $z$. 
We have $O(0,0)$ is the midpoint of the segment $AB$. Therefore
$$OM^2 = \dfrac{AM^2 + BM^2}{2}-\dfrac{AB^2}{4}.$$
Another way
$$25=AM+4BM \leqslant \sqrt{(1^2 + 4^2)(AM^2 + BM^2)},$$
Therefore
$$AM^2 + BM^2 \geqslant \dfrac{625}{17}.$$
$$OM^2 \geqslant \dfrac{625}{17} -1 = \dfrac{591}{17}.$$
Thus, minimum of $z$ is $\sqrt{\dfrac{591}{17}}$.
This answer is not true with Mathematica. Mathematica give $\dfrac{22}{5}$.
Where is wrong in my solution and how can I find the maximum?

This can be seen as following
"Given $x,y \in \mathbb{R}$ such that
$$x \ge 0 , y \ge 0, |x-y| \ge 2, x+4y=25$$
Find the the range of the function $f(x,y)=\frac{x^2+y^2}{2}-1$"
Here there is several ways. You can substitute $x=25-4y$ and consider $f$ as quadratic function of $y$ and exam it on a interval (which one you need to find out). Or you can take the Jacobian, find the vanish point of the Jacobian inside the domain of definition, then compare with the value on the boundary.
Geometrically, the trajectory of $M$ is a circle but I can't recall how to prove. That would be another way to solve the problem with more geometric flavor. 
