<s>[INST] $\textrm{Res}\left(\frac{\log z}{z^3+8}; z_k\right) = \frac{-z_k \log z_k}{24}$ when $z_k$ solves $z^3+8=0$ The problem in the book is

Compute $\int_0^\infty \frac{dx}{x^3+8}$.

I set up the keyhole contour, apply the residue theorem, and go through the tedious algebra. I get stuck in doing so, but looking at the solution, I see the following remark:

Note then that $\textrm{Res}\left(\frac{\log z}{z^3+8}; z_k\right) = \frac{-z_k \log z_k}{24}$.

Here, $z_k$ represents one of the poles of the function $\frac{\log z}{z^3+8}$. What I want to know is how the author makes this claim.

I am trying to compute the residues using the simple formula
$$\textrm{Res}(f(z); z_k) = \frac{A(z_k)}{B'(z_k)}$$
when $z_k$ is a simple pole. In this case, letting $B(z) = z^3+8$, I have the following:
$$z_k = -2, 1\pm\sqrt{3}i.$$
This yields the following residues
$$\begin{align*}
\textrm{Res}\left(\frac{\log z}{z^3+8}; z=-2\right) &= \frac{1}{12}\left(\log 2 + i\pi\right), \\
\textrm{Res}\left(\frac{\log z}{z^3+8}; z=1+\sqrt{3}i\right) &= \frac{2}{12(-1+\sqrt{3}i)}\left(\log 2 + \frac{i\pi}{3}\right), \\
\textrm{Res}\left(\frac{\log z}{z^3+8}; z=1-\sqrt{3}i\right) &= \frac{2}{12(-1-\sqrt{3}i)}\left(\log 2 - \frac{i\pi}{3}\right).
\end{align*}
$$
However, when I sum the results, I get a non-zero real and imaginary part. What am I doing wrong?
 [/INST] OK, I am convinced that your mistake lies in calling one of the poles $z=e^{-i \pi/3}$.  For your keyhole contour, it should be $z=e^{i 5 \pi/3}$.
To see this, I am just going to write down the equation you get after applying the contour and the residues:
$$-\int_0^{\infty} \frac{dx}{x^3+8} = \frac{\log{2}+i \pi/3}{12 e^{i 2 \pi/3}} + \frac{\log{2}+i \pi}{12} + \frac{\log{2}+i 5\pi/3}{12 e^{i 4 \pi/3}}$$
You can show that the $\log{2}$'s cancel.  The rest of it is
$$\frac{i \pi}{12} \frac{1}{3} [ e^{-i 2 \pi/3} + 3 + 5 e^{i 2 \pi/3}] = \frac{i \pi}{12} \frac{1}{3} (-3+3+i 2 \sqrt{3}) = -\frac{\pi}{6 \sqrt{3}}$$
The result follows.
</s>