Residue simplifies to ComplexInfinity

I have Residue calculation that depends on a parameter r, for which I assume

$Assumptions = {r > 0};  I'm interested in the residue of the function$\frac{1}{\left(z^{4/3}+\left(-1\right)^{1/3}r^{4/3}\right)\left(z^{2}-r^{2}\right)}$at$z=-r$. The calculation is: Residue[1/((z^(4/3) + Power[-1, (3)^-1] r^(4/3)) (z^2 - r^2)), {z, -r}] // Simplify  ComplexInfinity However, If I first assign a value to r and then take the Residue Residue[1/((z^(4/3) + Power[-1, (3)^-1] r^(4/3)) (z^2 - r^2)) /. r -> 1, {z, -1}]  1/4 (-1)^(2/3) The output is finite. What am I missing? Thanks. Edit 5.4.18 From the comment section of a different post of mine I learned that Residue in Mathematica versions prior to 11.1 may be buggy. Switching to 11.2, now I get: $Assumptions = {r > 0};
Residue[1/((z^(4/3) + Power[-1, (3)^-1] r^(4/3)) (z^2 - r^2)), {z, -r}]
Residue[1/((z^(4/3) + Power[-1, (3)^-1] r^(4/3)) (z^2 - r^2)) /.
r -> 1, {z, -1}]


Residue[1/(((-1)^(1/3) r^(4/3) + z^(4/3)) (-r^2 + z^2)), {z, -r}]

Residue[1/(((-1)^(1/3) + z^(4/3)) (-1 + z^2)), {z, -1}]

Meaning, Residue fails and does not change the input in both cases.

Also, I decided to plot the complex function for $r=1$ using the function in celtschk's answer in a diffrent post, and got:

We can see that in $z=-r=-1$ there's a discontinuity, which may be consistent with a problematic Laurent series and the inexistence of the residue.

Still, if I remove the assumption that $r>0$, Residue returns the previously problematic output:

$Assumptions = {}; Residue[1/((z^(4/3) + Power[-1, (3)^-1] r^(4/3)) (z^2 - r^2)), {z, -r}] // Simplify  -(1/(-2 (-r)^(7/3) + 2 (-1)^(1/3) r^(7/3))) • There is no Laurent series in a neighborhood of z=-r so it's hard to say what Residue might come up with in that situation. Commented Apr 3, 2018 at 14:28 • the cube root of$-1$is just$-1\$. Take a look at the documentation of CubeRoot of the Wolfram language. It gives to me zero with this code Refine[Residue[1/((z^(4/3) - r^(4/3)) (z^2 - r^2)), {z, -r}], r > 0]. Well, using Power you probably will get the principal value of the cube roots of unity. Commented Apr 3, 2018 at 14:36
• with this code Refine[Residue[ 1/((z^(4/3) + (-1)^(1/3) r^(4/3)) (z^2 - r^2)), {z, -r}], r > 0] it gives this result -(1/(2 (-(-r)^(1/3) + (-1)^(1/3) r^(1/3)) r^2)) Commented Apr 3, 2018 at 14:41
• @DanielLichtblau, how do you know there is no Laurent series? If there isn't, then Residue should fail no? Commented Apr 4, 2018 at 11:01
• Actually looking again I'm not sure. The fractional power gives rise to a series that, in Mathematica, uses Piecewise to handle Im[z] >= 0 vs. Im[z] < 0. But I am not sure the two are actually different in a way that would preclude the existence of a residue. Commented Apr 4, 2018 at 15:47