Since $\cos(t)$ is negative for $\pi/2 < t \le \pi$, computing with $(\cos(t))^{3/2}$ is an issue. I do not think numerical_integral will handle complex values, but I could be wrong.