Hi i'm trying to do this definite integral $$∫_{0}^{π }\frac{\sin ^3xdx}{\left(R^2+Z^2-2ZR\cos x\right)^{3/2}}=∫_{0}^{π}\frac{\sin xdx}{\left(R^2+Z^2-2RZ\cos x\right)}-∫_{0}^{π}\frac{\cos ^2x\sin xdx}{\left(R^2+Z^2-2RZ\cos x\right)}$$ And then i have to see what happens when $ Z<R$
I do the substitution: $u=R^2+Z^2-2RZ\cos x,du=2ZRsenx,\cos ^2x=\left(\frac{R^2+z^2-u}{2ZR}\right)^2$ $$\frac{1}{2ZR}∫\frac{du}{u^{3/2}}-\frac{1}{\left(2ZR\right)^2}\left(∫\frac{\left(R^2+Z^2\right)^2du}{u^{3/2}}-∫\frac{2\left(R^2+Z^2\right)u}{u^{3/2}}+∫\frac{u^2du}{u^{3/2}}\right)$$ $$\frac{-u^{-1/2}}{ZR}+\frac{\left(R^2+Z^2\right)^2u^{-1/2}}{2\left(ZR\right)^2}+\frac{\left(R^2+Z^2\right)u^{1/2}}{\left(RZ\right)^2}-\frac{2u^{3/2}}{3}=$$$$\frac{-(R^2+Z^2-2RZcosx)^{-1/2}}{ZR}+\frac{(R^2+Z^2)^2(R^2+Z^2-2RZcosx)^{-1/2}}{2(ZR)^2}+\frac{(R^2+Z^2)(R^2+Z^2-2RZcosx)^{1/2}}{(RZ)^2}-\frac{2(R^2+Z^2-2RZcosx)^{3/2}}{3} \big|_0^\pi $$ then $$\frac{1}{\left(ZR\right)^2}(\frac{1}{2}\left(\frac{1}{|R+Z|}-\frac{1}{|R-Z|}\right)\left(\left(R^2+Z^2\right)^2-2ZR\right)+\left(R^2+Z^2\right)\left(|R+Z|-|R-Z|\right)-\frac{1}{6}\left(R+Z\right)^3+\frac{1}{6}\left(|R-Z|\left(R-Z\right)^2\right)$$ when $Z<R$ I get $$\frac{2}{3R^2}\frac{3R-2ZR^2-4Z^3}{R^2-Z^2}$$ but it has to be $\frac{4}{3R^3}$ i've looked at it too much i dont know where im doing wrong.please help