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?

Put $A(-1,0)$, $B(1,0)$, $M(x,y)$ is the point present for $z$. Note that $O(0,0)$ is midpoint of the segment $AB$ and  $AB=2$. We have $AM+4BM=25$. We need to find the least and the greastest of the segment $OM$.
Put $a=AM$, $b=BM$ $(a,\, b >0)$, we have $a+4b=25$ or $a=25-4b$.
Because of $|MA-MB|\leqslant AB$ or
$$|a-b|\leqslant 2 \Leftrightarrow |25-4b-b| \leqslant 2 \Leftrightarrow \dfrac{23}{5}\leq b\leq
   \dfrac{27}{5}.$$
   Anotherway,
$$OM^2 = \dfrac{AM^2 + BM^2}{2}-\dfrac{AB^2}{4}=\dfrac{(25-4b)^2+b^2}{2}-1=\frac{17 b^2}{2}-100
   b+\frac{623}{2}.$$
Consider the function $f(b)=\dfrac{17 b^2}{2}-100
   b+\dfrac{623}{2}$ here $\dfrac{23}{5}\leq b\leq
   \dfrac{27}{5}$, we get the maximum of $f(b)$ is $\dfrac{784}{25}$ and the minimum of  $f(b)$ is $\dfrac{484}{25}$. Then, the maximum of $|z|$ is $\dfrac{28}{5}$ and the minimum of $|z|$ is $\dfrac{22}{25}$.
