\(\int \frac {\csc ^3(c+d x)}{(a-a \sin ^2(c+d x))^2} \, dx\) [20]

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

Optimal result

Integrand size = 24, antiderivative size = 72 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=-\frac {5 \text {arctanh}(\cos (c+d x))}{2 a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {2 \sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d} \] Output:

-5/2*arctanh(cos(d*x+c))/a^2/d-1/2*cot(d*x+c)*csc(d*x+c)/a^2/d+2*sec(d*x+c 
)/a^2/d+1/3*sec(d*x+c)^3/a^2/d
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(208\) vs. \(2(72)=144\).

Time = 0.63 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.89 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {2 \csc ^8(c+d x) \left (22-40 \cos (2 (c+d x))+13 \cos (3 (c+d x))-30 \cos (4 (c+d x))+13 \cos (5 (c+d x))+15 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+15 \cos (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-15 \cos (3 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-15 \cos (5 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\cos (c+d x) \left (-26-30 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+30 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{3 a^2 d \left (\csc ^2\left (\frac {1}{2} (c+d x)\right )-\sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^3} \] Input:

Integrate[Csc[c + d*x]^3/(a - a*Sin[c + d*x]^2)^2,x]
 

Output:

(2*Csc[c + d*x]^8*(22 - 40*Cos[2*(c + d*x)] + 13*Cos[3*(c + d*x)] - 30*Cos 
[4*(c + d*x)] + 13*Cos[5*(c + d*x)] + 15*Cos[3*(c + d*x)]*Log[Cos[(c + d*x 
)/2]] + 15*Cos[5*(c + d*x)]*Log[Cos[(c + d*x)/2]] - 15*Cos[3*(c + d*x)]*Lo 
g[Sin[(c + d*x)/2]] - 15*Cos[5*(c + d*x)]*Log[Sin[(c + d*x)/2]] + Cos[c + 
d*x]*(-26 - 30*Log[Cos[(c + d*x)/2]] + 30*Log[Sin[(c + d*x)/2]])))/(3*a^2* 
d*(Csc[(c + d*x)/2]^2 - Sec[(c + d*x)/2]^2)^3)
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.92, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {3042, 3654, 3042, 3102, 252, 254, 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 {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (c+d x)^3 \left (a-a \sin (c+d x)^2\right )^2}dx\)

\(\Big \downarrow \) 3654

\(\displaystyle \frac {\int \csc ^3(c+d x) \sec ^4(c+d x)dx}{a^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \csc (c+d x)^3 \sec (c+d x)^4dx}{a^2}\)

\(\Big \downarrow \) 3102

\(\displaystyle \frac {\int \frac {\sec ^6(c+d x)}{\left (1-\sec ^2(c+d x)\right )^2}d\sec (c+d x)}{a^2 d}\)

\(\Big \downarrow \) 252

\(\displaystyle \frac {\frac {\sec ^5(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {5}{2} \int \frac {\sec ^4(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{a^2 d}\)

\(\Big \downarrow \) 254

\(\displaystyle \frac {\frac {\sec ^5(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {5}{2} \int \left (-\sec ^2(c+d x)+\frac {1}{1-\sec ^2(c+d x)}-1\right )d\sec (c+d x)}{a^2 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {\sec ^5(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\sec (c+d x))-\frac {1}{3} \sec ^3(c+d x)-\sec (c+d x)\right )}{a^2 d}\)

Input:

Int[Csc[c + d*x]^3/(a - a*Sin[c + d*x]^2)^2,x]
 

Output:

(Sec[c + d*x]^5/(2*(1 - Sec[c + d*x]^2)) - (5*(ArcTanh[Sec[c + d*x]] - Sec 
[c + d*x] - Sec[c + d*x]^3/3))/2)/(a^2*d)
 

Defintions of rubi rules used

rule 252
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x 
)^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* 
(p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c 
}, x] && LtQ[p, -1] && GtQ[m, 1] &&  !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi 
alQ[a, b, c, 2, m, p, x]
 

rule 254
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, 
 a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
 

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3102
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S 
ymbol] :> Simp[1/(f*a^n)   Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 
2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 
)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
 

rule 3654
Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[ 
a^p   Int[ActivateTrig[u*cos[e + f*x]^(2*p)], x], x] /; FreeQ[{a, b, e, f, 
p}, x] && EqQ[a + b, 0] && IntegerQ[p]
 
Maple [A] (verified)

Time = 0.93 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\frac {1}{4 \cos \left (d x +c \right )+4}-\frac {5 \ln \left (\cos \left (d x +c \right )+1\right )}{4}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {2}{\cos \left (d x +c \right )}+\frac {1}{4 \cos \left (d x +c \right )-4}+\frac {5 \ln \left (\cos \left (d x +c \right )-1\right )}{4}}{d \,a^{2}}\) \(75\)
default \(\frac {\frac {1}{4 \cos \left (d x +c \right )+4}-\frac {5 \ln \left (\cos \left (d x +c \right )+1\right )}{4}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {2}{\cos \left (d x +c \right )}+\frac {1}{4 \cos \left (d x +c \right )-4}+\frac {5 \ln \left (\cos \left (d x +c \right )-1\right )}{4}}{d \,a^{2}}\) \(75\)
parallelrisch \(\frac {60 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-165 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+225 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-130}{24 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}\) \(127\)
risch \(\frac {15 \,{\mathrm e}^{9 i \left (d x +c \right )}+20 \,{\mathrm e}^{7 i \left (d x +c \right )}-22 \,{\mathrm e}^{5 i \left (d x +c \right )}+20 \,{\mathrm e}^{3 i \left (d x +c \right )}+15 \,{\mathrm e}^{i \left (d x +c \right )}}{3 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a^{2} d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a^{2} d}\) \(132\)
norman \(\frac {\frac {1}{8 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{8 a d}+\frac {75 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 a d}-\frac {65 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{12 a d}-\frac {55 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{8 a d}}{a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) \(135\)

Input:

int(csc(d*x+c)^3/(a-a*sin(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 

Output:

1/d/a^2*(1/4/(cos(d*x+c)+1)-5/4*ln(cos(d*x+c)+1)+1/3/cos(d*x+c)^3+2/cos(d* 
x+c)+1/4/(cos(d*x+c)-1)+5/4*ln(cos(d*x+c)-1))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.64 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {30 \, \cos \left (d x + c\right )^{4} - 20 \, \cos \left (d x + c\right )^{2} - 15 \, {\left (\cos \left (d x + c\right )^{5} - \cos \left (d x + c\right )^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (\cos \left (d x + c\right )^{5} - \cos \left (d x + c\right )^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 4}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} - a^{2} d \cos \left (d x + c\right )^{3}\right )}} \] Input:

integrate(csc(d*x+c)^3/(a-a*sin(d*x+c)^2)^2,x, algorithm="fricas")
 

Output:

1/12*(30*cos(d*x + c)^4 - 20*cos(d*x + c)^2 - 15*(cos(d*x + c)^5 - cos(d*x 
 + c)^3)*log(1/2*cos(d*x + c) + 1/2) + 15*(cos(d*x + c)^5 - cos(d*x + c)^3 
)*log(-1/2*cos(d*x + c) + 1/2) - 4)/(a^2*d*cos(d*x + c)^5 - a^2*d*cos(d*x 
+ c)^3)
 

Sympy [F]

\[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {\int \frac {\csc ^{3}{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} - 2 \sin ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \] Input:

integrate(csc(d*x+c)**3/(a-a*sin(d*x+c)**2)**2,x)
 

Output:

Integral(csc(c + d*x)**3/(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1), x)/a** 
2
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.19 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {2 \, {\left (15 \, \cos \left (d x + c\right )^{4} - 10 \, \cos \left (d x + c\right )^{2} - 2\right )}}{a^{2} \cos \left (d x + c\right )^{5} - a^{2} \cos \left (d x + c\right )^{3}} - \frac {15 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {15 \, \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2}}}{12 \, d} \] Input:

integrate(csc(d*x+c)^3/(a-a*sin(d*x+c)^2)^2,x, algorithm="maxima")
 

Output:

1/12*(2*(15*cos(d*x + c)^4 - 10*cos(d*x + c)^2 - 2)/(a^2*cos(d*x + c)^5 - 
a^2*cos(d*x + c)^3) - 15*log(cos(d*x + c) + 1)/a^2 + 15*log(cos(d*x + c) - 
 1)/a^2)/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (66) = 132\).

Time = 0.42 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.43 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (\frac {10 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}} - \frac {30 \, \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2}} + \frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {16 \, {\left (\frac {12 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {9 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 7\right )}}{a^{2} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{3}}}{24 \, d} \] Input:

integrate(csc(d*x+c)^3/(a-a*sin(d*x+c)^2)^2,x, algorithm="giac")
 

Output:

-1/24*(3*(10*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)*(cos(d*x + c) + 1) 
/(a^2*(cos(d*x + c) - 1)) - 30*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) 
 + 1))/a^2 + 3*(cos(d*x + c) - 1)/(a^2*(cos(d*x + c) + 1)) - 16*(12*(cos(d 
*x + c) - 1)/(cos(d*x + c) + 1) + 9*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1 
)^2 + 7)/(a^2*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)^3))/d
 

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.97 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {-\frac {5\,{\cos \left (c+d\,x\right )}^4}{2}+\frac {5\,{\cos \left (c+d\,x\right )}^2}{3}+\frac {1}{3}}{d\,\left (a^2\,{\cos \left (c+d\,x\right )}^3-a^2\,{\cos \left (c+d\,x\right )}^5\right )}-\frac {5\,\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{2\,a^2\,d} \] Input:

int(1/(sin(c + d*x)^3*(a - a*sin(c + d*x)^2)^2),x)
 

Output:

((5*cos(c + d*x)^2)/3 - (5*cos(c + d*x)^4)/2 + 1/3)/(d*(a^2*cos(c + d*x)^3 
 - a^2*cos(c + d*x)^5)) - (5*atanh(cos(c + d*x)))/(2*a^2*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.97 \[ \int \frac {\csc ^3(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx=\frac {60 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4}-60 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2}-65 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+65 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+60 \sin \left (d x +c \right )^{4}-80 \sin \left (d x +c \right )^{2}+12}{24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2} d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

int(csc(d*x+c)^3/(a-a*sin(d*x+c)^2)^2,x)
 

Output:

(60*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**4 - 60*cos(c + d*x)*l 
og(tan((c + d*x)/2))*sin(c + d*x)**2 - 65*cos(c + d*x)*sin(c + d*x)**4 + 6 
5*cos(c + d*x)*sin(c + d*x)**2 + 60*sin(c + d*x)**4 - 80*sin(c + d*x)**2 + 
 12)/(24*cos(c + d*x)*sin(c + d*x)**2*a**2*d*(sin(c + d*x)**2 - 1))