\(\int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx\) [322]

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

Optimal result

Integrand size = 23, antiderivative size = 484 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-b^{2/3}} d}-\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 \sqrt {a^{2/3}-b^{2/3}} b^{2/3} d}+\frac {2 \arctan \left (\frac {(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}-\frac {2 \arctan \left (\frac {\sqrt [3]{-1} \left (\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} b^{2/3} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} b^{2/3} d} \] Output:

2/3*arctan((b^(1/3)+a^(1/3)*tan(1/2*d*x+1/2*c))/(a^(2/3)-b^(2/3))^(1/2))/a 
^(2/3)/(a^(2/3)-b^(2/3))^(1/2)/d-2/3*arctan((b^(1/3)+a^(1/3)*tan(1/2*d*x+1 
/2*c))/(a^(2/3)-b^(2/3))^(1/2))/(a^(2/3)-b^(2/3))^(1/2)/b^(2/3)/d+2/3*arct 
an(((-1)^(2/3)*b^(1/3)+a^(1/3)*tan(1/2*d*x+1/2*c))/(a^(2/3)+(-1)^(1/3)*b^( 
2/3))^(1/2))/a^(2/3)/(a^(2/3)+(-1)^(1/3)*b^(2/3))^(1/2)/d-2/3*arctan((-1)^ 
(1/3)*(b^(1/3)+(-1)^(2/3)*a^(1/3)*tan(1/2*d*x+1/2*c))/(a^(2/3)-(-1)^(2/3)* 
b^(2/3))^(1/2))/a^(2/3)/(a^(2/3)-(-1)^(2/3)*b^(2/3))^(1/2)/d+2/3*arctanh(( 
b^(1/3)-(-1)^(1/3)*a^(1/3)*tan(1/2*d*x+1/2*c))/(-(-1)^(2/3)*a^(2/3)+b^(2/3 
))^(1/2))/(-(-1)^(2/3)*a^(2/3)+b^(2/3))^(1/2)/b^(2/3)/d+2/3*arctanh((b^(1/ 
3)+(-1)^(2/3)*a^(1/3)*tan(1/2*d*x+1/2*c))/((-1)^(1/3)*a^(2/3)+b^(2/3))^(1/ 
2))/((-1)^(1/3)*a^(2/3)+b^(2/3))^(1/2)/b^(2/3)/d
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.41 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.48 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=-\frac {i \text {RootSum}\left [-i b+3 i b \text {$\#$1}^2+8 a \text {$\#$1}^3-3 i b \text {$\#$1}^4+i b \text {$\#$1}^6\&,\frac {2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )+4 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2-2 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2+2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^4}{b \text {$\#$1}-4 i a \text {$\#$1}^2-2 b \text {$\#$1}^3+b \text {$\#$1}^5}\&\right ]}{6 d} \] Input:

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

Output:

((-1/6*I)*RootSum[(-I)*b + (3*I)*b*#1^2 + 8*a*#1^3 - (3*I)*b*#1^4 + I*b*#1 
^6 & , (2*ArcTan[Sin[c + d*x]/(Cos[c + d*x] - #1)] - I*Log[1 - 2*Cos[c + d 
*x]*#1 + #1^2] + 4*ArcTan[Sin[c + d*x]/(Cos[c + d*x] - #1)]*#1^2 - (2*I)*L 
og[1 - 2*Cos[c + d*x]*#1 + #1^2]*#1^2 + 2*ArcTan[Sin[c + d*x]/(Cos[c + d*x 
] - #1)]*#1^4 - I*Log[1 - 2*Cos[c + d*x]*#1 + #1^2]*#1^4)/(b*#1 - (4*I)*a* 
#1^2 - 2*b*#1^3 + b*#1^5) & ])/d
 

Rubi [A] (verified)

Time = 0.96 (sec) , antiderivative size = 484, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3705, 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 {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^2}{a+b \sin (c+d x)^3}dx\)

\(\Big \downarrow \) 3705

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}-b^{2/3}}}-\frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 b^{2/3} d \sqrt {a^{2/3}-b^{2/3}}}+\frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+(-1)^{2/3} \sqrt [3]{b}}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}-\frac {2 \arctan \left (\frac {\sqrt [3]{-1} \left ((-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}\right )}{3 b^{2/3} d \sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}+\frac {2 \text {arctanh}\left (\frac {(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 b^{2/3} d \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\)

Input:

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

Output:

(2*ArcTan[(b^(1/3) + a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) - b^(2/3)]])/( 
3*a^(2/3)*Sqrt[a^(2/3) - b^(2/3)]*d) - (2*ArcTan[(b^(1/3) + a^(1/3)*Tan[(c 
 + d*x)/2])/Sqrt[a^(2/3) - b^(2/3)]])/(3*Sqrt[a^(2/3) - b^(2/3)]*b^(2/3)*d 
) + (2*ArcTan[((-1)^(2/3)*b^(1/3) + a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) 
 + (-1)^(1/3)*b^(2/3)]])/(3*a^(2/3)*Sqrt[a^(2/3) + (-1)^(1/3)*b^(2/3)]*d) 
- (2*ArcTan[((-1)^(1/3)*(b^(1/3) + (-1)^(2/3)*a^(1/3)*Tan[(c + d*x)/2]))/S 
qrt[a^(2/3) - (-1)^(2/3)*b^(2/3)]])/(3*a^(2/3)*Sqrt[a^(2/3) - (-1)^(2/3)*b 
^(2/3)]*d) + (2*ArcTanh[(b^(1/3) - (-1)^(1/3)*a^(1/3)*Tan[(c + d*x)/2])/Sq 
rt[-((-1)^(2/3)*a^(2/3)) + b^(2/3)]])/(3*Sqrt[-((-1)^(2/3)*a^(2/3)) + b^(2 
/3)]*b^(2/3)*d) + (2*ArcTanh[(b^(1/3) + (-1)^(2/3)*a^(1/3)*Tan[(c + d*x)/2 
])/Sqrt[(-1)^(1/3)*a^(2/3) + b^(2/3)]])/(3*Sqrt[(-1)^(1/3)*a^(2/3) + b^(2/ 
3)]*b^(2/3)*d)
 

Defintions of rubi rules used

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 3705
Int[cos[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_) 
), x_Symbol] :> Int[Expand[(1 - Sin[e + f*x]^2)^(m/2)/(a + b*Sin[e + f*x]^n 
), x], x] /; FreeQ[{a, b, e, f}, x] && IGtQ[m/2, 0] && IntegerQ[(n - 1)/2]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.96 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.17

method result size
derivativedivides \(\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{4}-2 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +a \textit {\_R}}}{3 d}\) \(83\)
default \(\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{4}-2 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +a \textit {\_R}}}{3 d}\) \(83\)
risch \(\munderset {\textit {\_R} =\operatorname {RootOf}\left (729 a^{4} b^{4} d^{6} \textit {\_Z}^{6}+27 a^{2} b^{2} d^{2} \textit {\_Z}^{2}+a^{2}-b^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {243 a^{4} b^{3} d^{5} \textit {\_R}^{5}}{a^{2}+b^{2}}+\frac {81 i d^{4} b^{3} a^{3} \textit {\_R}^{4}}{a^{2}+b^{2}}-\frac {27 d^{3} b^{3} a^{2} \textit {\_R}^{3}}{a^{2}+b^{2}}-\frac {9 i d^{2} b \,a^{3} \textit {\_R}^{2}}{a^{2}+b^{2}}-\frac {6 a^{2} b d \textit {\_R}}{a^{2}+b^{2}}+\frac {2 i a b}{a^{2}+b^{2}}\right )\) \(178\)

Input:

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

Output:

1/3/d*sum((_R^4-2*_R^2+1)/(_R^5*a+2*_R^3*a+4*_R^2*b+_R*a)*ln(tan(1/2*d*x+1 
/2*c)-_R),_R=RootOf(_Z^6*a+3*_Z^4*a+8*_Z^3*b+3*_Z^2*a+a))
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.27 (sec) , antiderivative size = 8236, normalized size of antiderivative = 17.02 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F]

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

integrate(cos(d*x+c)**2/(a+b*sin(d*x+c)**3),x)
 

Output:

Integral(cos(c + d*x)**2/(a + b*sin(c + d*x)**3), x)
 

Maxima [F]

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

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

Output:

integrate(cos(d*x + c)^2/(b*sin(d*x + c)^3 + a), x)
 

Giac [F]

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

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

Output:

integrate(cos(d*x + c)^2/(b*sin(d*x + c)^3 + a), x)
 

Mupad [B] (verification not implemented)

Time = 37.91 (sec) , antiderivative size = 951, normalized size of antiderivative = 1.96 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx =\text {Too large to display} \] Input:

int(cos(c + d*x)^2/(a + b*sin(c + d*x)^3),x)
 

Output:

symsum(log(24576*a^4 - 24576*a^2*b^2 - 122880*root(729*a^4*b^4*d^6 + 27*a^ 
2*b^2*d^2 + a^2 - b^2, d, k)*a^2*b^3 - 24576*root(729*a^4*b^4*d^6 + 27*a^2 
*b^2*d^2 + a^2 - b^2, d, k)*a^5*tan(c/2 + (d*x)/2) - 32768*a*b^3*tan(c/2 + 
 (d*x)/2) + 32768*a^3*b*tan(c/2 + (d*x)/2) - 294912*root(729*a^4*b^4*d^6 + 
 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^2*a^2*b^4 + 294912*root(729*a^4*b^4*d^6 
 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^2*a^4*b^2 + 663552*root(729*a^4*b^4*d 
^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^4*a^4*b^4 - 663552*root(729*a^4*b^4 
*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^4*a^6*b^2 - 7962624*root(729*a^4* 
b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^5*a^4*b^5 + 5971968*root(729*a 
^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^5*a^6*b^3 + 49152*root(729* 
a^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)*a^4*b + 147456*root(729*a^ 
4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)*a^3*b^2*tan(c/2 + (d*x)/2) + 
 294912*root(729*a^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^2*a^5*b*t 
an(c/2 + (d*x)/2) - 294912*root(729*a^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b 
^2, d, k)^2*a^3*b^3*tan(c/2 + (d*x)/2) + 1769472*root(729*a^4*b^4*d^6 + 27 
*a^2*b^2*d^2 + a^2 - b^2, d, k)^3*a^3*b^4*tan(c/2 + (d*x)/2) - 1769472*roo 
t(729*a^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k)^3*a^5*b^2*tan(c/2 + 
(d*x)/2) - 5308416*root(729*a^4*b^4*d^6 + 27*a^2*b^2*d^2 + a^2 - b^2, d, k 
)^4*a^3*b^5*tan(c/2 + (d*x)/2) + 5308416*root(729*a^4*b^4*d^6 + 27*a^2*b^2 
*d^2 + a^2 - b^2, d, k)^4*a^5*b^3*tan(c/2 + (d*x)/2) - 1990656*root(729...
 

Reduce [F]

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

int(cos(d*x+c)^2/(a+b*sin(d*x+c)^3),x)
 

Output:

int(cos(c + d*x)**2/(sin(c + d*x)**3*b + a),x)