\(\int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz\) [106]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 22, antiderivative size = 300 \[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=-\frac {i z^3 \sin (z)}{3 \sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}-\frac {2 z^2 \text {arctanh}\left (e^{i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}+\frac {z^2 \log \left (1-e^{2 i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}+\frac {2 i z \operatorname {PolyLog}\left (2,-e^{i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}-\frac {2 i z \operatorname {PolyLog}\left (2,e^{i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}-\frac {i z \operatorname {PolyLog}\left (2,e^{2 i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}-\frac {2 \operatorname {PolyLog}\left (3,-e^{i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}+\frac {2 \operatorname {PolyLog}\left (3,e^{i z}\right ) \sin (z)}{\sqrt {1-\cos (z)} \sqrt {1+\cos (z)}}+\frac {\operatorname {PolyLog}\left (3,e^{2 i z}\right ) \sin (z)}{2 \sqrt {1-\cos (z)} \sqrt {1+\cos (z)}} \] Output:

-1/3*I*z^3*sin(z)/(1-cos(z))^(1/2)/(1+cos(z))^(1/2)-2*z^2*arctanh(exp(I*z) 
)*sin(z)/(1-cos(z))^(1/2)/(1+cos(z))^(1/2)+z^2*ln(1-exp(2*I*z))*sin(z)/(1- 
cos(z))^(1/2)/(1+cos(z))^(1/2)+2*I*z*polylog(2,-exp(I*z))*sin(z)/(1-cos(z) 
)^(1/2)/(1+cos(z))^(1/2)-2*I*z*polylog(2,exp(I*z))*sin(z)/(1-cos(z))^(1/2) 
/(1+cos(z))^(1/2)-I*z*polylog(2,exp(2*I*z))*sin(z)/(1-cos(z))^(1/2)/(1+cos 
(z))^(1/2)-2*polylog(3,-exp(I*z))*sin(z)/(1-cos(z))^(1/2)/(1+cos(z))^(1/2) 
+2*polylog(3,exp(I*z))*sin(z)/(1-cos(z))^(1/2)/(1+cos(z))^(1/2)+1/2*polylo 
g(3,exp(2*I*z))*sin(z)/(1-cos(z))^(1/2)/(1+cos(z))^(1/2)
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.28 \[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=\frac {\sqrt {1+\cos (z)} \left (-i \pi ^3+i z^3+6 z^2 \log \left (1-e^{-i z}\right )+12 i z \operatorname {PolyLog}\left (2,e^{-i z}\right )+12 \operatorname {PolyLog}\left (3,e^{-i z}\right )\right ) \tan \left (\frac {z}{2}\right )}{3 \sqrt {1-\cos (z)}} \] Input:

Integrate[(z^2*Sqrt[1 + Cos[z]])/Sqrt[1 - Cos[z]],z]
 

Output:

(Sqrt[1 + Cos[z]]*((-I)*Pi^3 + I*z^3 + 6*z^2*Log[1 - E^((-I)*z)] + (12*I)* 
z*PolyLog[2, E^((-I)*z)] + 12*PolyLog[3, E^((-I)*z)])*Tan[z/2])/(3*Sqrt[1 
- Cos[z]])
 

Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.47, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {5116, 7293, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {z^2 \sqrt {\cos (z)+1}}{\sqrt {1-\cos (z)}} \, dz\)

\(\Big \downarrow \) 5116

\(\displaystyle \frac {\sin (z) \int z^2 (\cos (z)+1) \csc (z)dz}{\sqrt {1-\cos (z)} \sqrt {\cos (z)+1}}\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {\sin (z) \int \left (\cot (z) z^2+\csc (z) z^2\right )dz}{\sqrt {1-\cos (z)} \sqrt {\cos (z)+1}}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sin (z) \left (-2 z^2 \text {arctanh}\left (e^{i z}\right )+2 i z \operatorname {PolyLog}\left (2,-e^{i z}\right )-2 i z \operatorname {PolyLog}\left (2,e^{i z}\right )-i z \operatorname {PolyLog}\left (2,e^{2 i z}\right )-2 \operatorname {PolyLog}\left (3,-e^{i z}\right )+2 \operatorname {PolyLog}\left (3,e^{i z}\right )+\frac {1}{2} \operatorname {PolyLog}\left (3,e^{2 i z}\right )-\frac {i z^3}{3}+z^2 \log \left (1-e^{2 i z}\right )\right )}{\sqrt {1-\cos (z)} \sqrt {\cos (z)+1}}\)

Input:

Int[(z^2*Sqrt[1 + Cos[z]])/Sqrt[1 - Cos[z]],z]
 

Output:

(((-1/3*I)*z^3 - 2*z^2*ArcTanh[E^(I*z)] + z^2*Log[1 - E^((2*I)*z)] + (2*I) 
*z*PolyLog[2, -E^(I*z)] - (2*I)*z*PolyLog[2, E^(I*z)] - I*z*PolyLog[2, E^( 
(2*I)*z)] - 2*PolyLog[3, -E^(I*z)] + 2*PolyLog[3, E^(I*z)] + PolyLog[3, E^ 
((2*I)*z)]/2)*Sin[z])/(Sqrt[1 - Cos[z]]*Sqrt[1 + Cos[z]])
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5116
Int[(Cos[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(Cos[(e_.) + (f_.)*(x_)]*(d 
_.) + (c_))^(n_)*((g_.) + (h_.)*(x_))^(p_.), x_Symbol] :> Simp[a^IntPart[m] 
*c^IntPart[m]*(a + b*Cos[e + f*x])^FracPart[m]*((c + d*Cos[e + f*x])^FracPa 
rt[m]/Sin[e + f*x]^(2*FracPart[m]))   Int[(g + h*x)^p*Sin[e + f*x]^(2*m)*(c 
 + d*Cos[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && 
 EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[p] && IntegerQ[2*m] && 
IGeQ[n - m, 0]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.51

method result size
risch \(\frac {\left ({\mathrm e}^{i z}-1\right ) \sqrt {\left ({\mathrm e}^{i z}+1\right )^{2} {\mathrm e}^{-i z}}\, z^{3}}{3 \sqrt {-\left ({\mathrm e}^{i z}-1\right )^{2} {\mathrm e}^{-i z}}\, \left ({\mathrm e}^{i z}+1\right )}+\frac {2 i \left ({\mathrm e}^{i z}-1\right ) \sqrt {\left ({\mathrm e}^{i z}+1\right )^{2} {\mathrm e}^{-i z}}\, \left (\frac {i z^{3}}{3}-z^{2} \ln \left (-{\mathrm e}^{i z}+1\right )+2 i z \operatorname {polylog}\left (2, {\mathrm e}^{i z}\right )-2 \operatorname {polylog}\left (3, {\mathrm e}^{i z}\right )\right )}{\sqrt {-\left ({\mathrm e}^{i z}-1\right )^{2} {\mathrm e}^{-i z}}\, \left ({\mathrm e}^{i z}+1\right )}\) \(154\)

Input:

int(z^2*(1+cos(z))^(1/2)/(1-cos(z))^(1/2),z,method=_RETURNVERBOSE)
 

Output:

1/3/(-(exp(I*z)-1)^2*exp(-I*z))^(1/2)*(exp(I*z)-1)*((exp(I*z)+1)^2*exp(-I* 
z))^(1/2)/(exp(I*z)+1)*z^3+2*I/(-(exp(I*z)-1)^2*exp(-I*z))^(1/2)*(exp(I*z) 
-1)*((exp(I*z)+1)^2*exp(-I*z))^(1/2)/(exp(I*z)+1)*(1/3*I*z^3-z^2*ln(-exp(I 
*z)+1)+2*I*z*polylog(2,exp(I*z))-2*polylog(3,exp(I*z)))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.25 \[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=z^{2} \log \left (-\cos \left (z\right ) + i \, \sin \left (z\right ) + 1\right ) + z^{2} \log \left (-\cos \left (z\right ) - i \, \sin \left (z\right ) + 1\right ) - 2 i \, z {\rm Li}_2\left (\cos \left (z\right ) + i \, \sin \left (z\right )\right ) + 2 i \, z {\rm Li}_2\left (\cos \left (z\right ) - i \, \sin \left (z\right )\right ) + 2 \, {\rm polylog}\left (3, \cos \left (z\right ) + i \, \sin \left (z\right )\right ) + 2 \, {\rm polylog}\left (3, \cos \left (z\right ) - i \, \sin \left (z\right )\right ) \] Input:

integrate(z^2*(1+cos(z))^(1/2)/(1-cos(z))^(1/2),z, algorithm="fricas")
 

Output:

z^2*log(-cos(z) + I*sin(z) + 1) + z^2*log(-cos(z) - I*sin(z) + 1) - 2*I*z* 
dilog(cos(z) + I*sin(z)) + 2*I*z*dilog(cos(z) - I*sin(z)) + 2*polylog(3, c 
os(z) + I*sin(z)) + 2*polylog(3, cos(z) - I*sin(z))
 

Sympy [F]

\[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=\int \frac {z^{2} \sqrt {\cos {\left (z \right )} + 1}}{\sqrt {1 - \cos {\left (z \right )}}}\, dz \] Input:

integrate(z**2*(1+cos(z))**(1/2)/(1-cos(z))**(1/2),z)
 

Output:

Integral(z**2*sqrt(cos(z) + 1)/sqrt(1 - cos(z)), z)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.19 \[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=\frac {1}{3} i \, z^{3} + 2 i \, z^{2} \arctan \left (\sin \left (z\right ), -\cos \left (z\right ) + 1\right ) - z^{2} \log \left (\cos \left (z\right )^{2} + \sin \left (z\right )^{2} - 2 \, \cos \left (z\right ) + 1\right ) + 4 i \, z {\rm Li}_2\left (e^{\left (i \, z\right )}\right ) - 4 \, {\rm Li}_{3}(e^{\left (i \, z\right )}) \] Input:

integrate(z^2*(1+cos(z))^(1/2)/(1-cos(z))^(1/2),z, algorithm="maxima")
 

Output:

1/3*I*z^3 + 2*I*z^2*arctan2(sin(z), -cos(z) + 1) - z^2*log(cos(z)^2 + sin( 
z)^2 - 2*cos(z) + 1) + 4*I*z*dilog(e^(I*z)) - 4*polylog(3, e^(I*z))
 

Giac [F]

\[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=\int { \frac {z^{2} \sqrt {\cos \left (z\right ) + 1}}{\sqrt {-\cos \left (z\right ) + 1}} \,d z } \] Input:

integrate(z^2*(1+cos(z))^(1/2)/(1-cos(z))^(1/2),z, algorithm="giac")
 

Output:

integrate(z^2*sqrt(cos(z) + 1)/sqrt(-cos(z) + 1), z)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=\int \frac {z^2\,\sqrt {\cos \left (z\right )+1}}{\sqrt {1-\cos \left (z\right )}} \,d z \] Input:

int((z^2*(cos(z) + 1)^(1/2))/(1 - cos(z))^(1/2),z)
 

Output:

int((z^2*(cos(z) + 1)^(1/2))/(1 - cos(z))^(1/2), z)
 

Reduce [F]

\[ \int \frac {z^2 \sqrt {1+\cos (z)}}{\sqrt {1-\cos (z)}} \, dz=-\left (\int \frac {\sqrt {-\cos \left (z \right )+1}\, \sqrt {\cos \left (z \right )+1}\, z^{2}}{\cos \left (z \right )-1}d z \right ) \] Input:

int(z^2*(1+cos(z))^(1/2)/(1-cos(z))^(1/2),z)
                                                                                    
                                                                                    
 

Output:

 - int((sqrt( - cos(z) + 1)*sqrt(cos(z) + 1)*z**2)/(cos(z) - 1),z)