$\lim_{z \to \exp(i\pi/3)} \frac{z^3+8}{z^4+4z+16}$ Find $$\lim_{z \to \exp(i \pi/3)} \dfrac{z^3+8}{z^4+4z+16}$$
Note that
$$z=\exp(\pi i/3)=\cos(\pi/3)+i\sin(\pi/3)=\dfrac{1}{2}+i\dfrac{\sqrt{3}}{2}$$
$$z^2=\exp(2\pi i/3)=\cos(2\pi/3)+i\sin(2\pi/3)=-\dfrac{1}{2}+i\dfrac{\sqrt{3}}{2}$$
$$z^3=\exp(3\pi i/3)=\cos(\pi)+i\sin(\pi)=1$$
$$z^4=\exp(4\pi i/3)=\cos(4\pi/3)+i\sin(4\pi/3)=-\dfrac{1}{2}-i\dfrac{\sqrt{3}}{2}$$
So,
\begin{equation*}
\begin{aligned}
\lim_{z \to \exp(i \pi/3)} \dfrac{z^3+8}{z^4+4z+16} & = \dfrac{1+8}{-\dfrac{1}{2}-i\dfrac{\sqrt{3}}{2}+4\left(-\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}\right)+16} \\
& = \dfrac{9}{\dfrac{27}{2}+i\frac{3\sqrt{3}}{2}} \\
& = \dfrac{6}{9+i\sqrt{3}} \\
& = \dfrac{9}{14}-i\dfrac{\sqrt{3}}{2} \\
\end{aligned}
\end{equation*}
But, when I check my answer on wolframalpha, their answer is $$\dfrac{245}{626}-i\dfrac{21\sqrt{3}}{626}.$$
Can someone tell me what I am doing wrong?
 A: You know $z^3=(\exp(\pi i/3))^3=\exp(3\pi i/3)=-1$ and $z=\dfrac{1}{2}+i\dfrac{\sqrt{3}}{2}$ thus with substitution
\begin{eqnarray}
\lim_{z \to \exp(i \pi/3)} \dfrac{z^3+8}{z(z^3+4)+16}
&=&
\lim_{z \to \exp(i \pi/3)} \dfrac{-1+8}{(\dfrac{1}{2}+i\dfrac{\sqrt{3}}{2})(-1+4)+16}\\
&=&
\dfrac{14}{35+3\sqrt{3}i}\\
&=&
\dfrac{14(35-3\sqrt{3}i)}{1252}\\
&=&
\dfrac{245}{626}-i\dfrac{21\sqrt{3}}{626}
\end{eqnarray}
A: First, note that:
$$z^3=\cos(\pi)+i\sin(\pi)=\color{red}{-1}$$
And also, you've evaluated $z$ correctly, but the substitution into your limit is wrong.
Therefore, you should be using:
$$\lim_{x\to \exp(i\pi/3)} \frac{z^3+8}{z^4+4z+16}=\frac{\color{red}{-1+8}}{\left(-\frac{1}{2}-i\frac{\sqrt{3}}{2}\right)+4\color{red}{\left(\frac{1}{2}+i\frac{\sqrt{3}}{2}\right)}+16}$$
Which gives you the correct answer.
A: You can make your life very easy by noticing that $(\mathrm e^{\mathrm i \pi/3})^3=\mathrm e^{\mathrm i \pi} = -1$.
This means that if $z=\mathrm e^{\mathrm i \pi/3}$, then $z^3=-1$ and hence $z^4=-z$.
$$\frac{z^3+8}{z^4+4z+16} = \frac{7}{3z+16}$$
