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

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [F]
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 = 299 \[ \int \frac {\sec ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {2 (-1)^{2/3} b^{2/3} \arctan \left (\frac {\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} \left (a^{2/3}-(-1)^{2/3} b^{2/3}\right )^{3/2} d}-\frac {2 b^{2/3} \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} \left (a^{2/3}-b^{2/3}\right )^{3/2} d}+\frac {2 \sqrt [3]{-1} b^{2/3} \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} \left (a^{2/3}+\sqrt [3]{-1} b^{2/3}\right )^{3/2} d}+\frac {\sec (c+d x) (b-a \sin (c+d x))}{\left (-a^2+b^2\right ) d} \] Output:

2/3*(-1)^(2/3)*b^(2/3)*arctan(((-1)^(1/3)*b^(1/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 
))^(3/2)/d-2/3*b^(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))^(3/2)/d+2/3*(-1)^(1/3)*b^(2/3) 
*arctan(((-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))^(3/2)/d+sec(d*x+c)* 
(b-a*sin(d*x+c))/(-a^2+b^2)/d
 

Mathematica [C] (warning: unable to verify)

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

Time = 0.59 (sec) , antiderivative size = 432, normalized size of antiderivative = 1.44 \[ \int \frac {\sec ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {-6 b+6 b \cos (c+d x)-i b \cos (c+d x) \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 b \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )-i b \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )+4 i a \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}+2 a \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}-12 b \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2+6 i b \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2-4 i a \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^3-2 a \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^3+2 b \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4-i b \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 a \sin (c+d x)}{6 (a-b) (a+b) d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \] Input:

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

Output:

(-6*b + 6*b*Cos[c + d*x] - I*b*Cos[c + d*x]*RootSum[(-I)*b + (3*I)*b*#1^2 
+ 8*a*#1^3 - (3*I)*b*#1^4 + I*b*#1^6 & , (2*b*ArcTan[Sin[c + d*x]/(Cos[c + 
 d*x] - #1)] - I*b*Log[1 - 2*Cos[c + d*x]*#1 + #1^2] + (4*I)*a*ArcTan[Sin[ 
c + d*x]/(Cos[c + d*x] - #1)]*#1 + 2*a*Log[1 - 2*Cos[c + d*x]*#1 + #1^2]*# 
1 - 12*b*ArcTan[Sin[c + d*x]/(Cos[c + d*x] - #1)]*#1^2 + (6*I)*b*Log[1 - 2 
*Cos[c + d*x]*#1 + #1^2]*#1^2 - (4*I)*a*ArcTan[Sin[c + d*x]/(Cos[c + d*x] 
- #1)]*#1^3 - 2*a*Log[1 - 2*Cos[c + d*x]*#1 + #1^2]*#1^3 + 2*b*ArcTan[Sin[ 
c + d*x]/(Cos[c + d*x] - #1)]*#1^4 - I*b*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) & ] + 6*a*Sin[c + d*x])/( 
6*(a - b)*(a + b)*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2 
] + Sin[(c + d*x)/2]))
 

Rubi [F]

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 {\sec ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3707

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

Input:

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

Output:

$Aborted
 

Defintions of rubi rules used

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

rule 3707
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_.)*((a_) + (b_.)*((c_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> Unintegrable[(d*Cos[e + f*x])^m*(a + 
 b*(c*Sin[e + f*x])^n)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x]
 
Maple [C] (verified)

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

Time = 2.40 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.54

method result size
derivativedivides \(\frac {-\frac {2}{\left (2 a -2 b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2}{\left (2 a +2 b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {b \left (\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} b +2 \textit {\_R}^{3} a -6 \textit {\_R}^{2} b +2 a \textit {\_R} -b \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}}\right )}{3 \left (a -b \right ) \left (a +b \right )}}{d}\) \(162\)
default \(\frac {-\frac {2}{\left (2 a -2 b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2}{\left (2 a +2 b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {b \left (\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} b +2 \textit {\_R}^{3} a -6 \textit {\_R}^{2} b +2 a \textit {\_R} -b \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}}\right )}{3 \left (a -b \right ) \left (a +b \right )}}{d}\) \(162\)
risch \(\text {Expression too large to display}\) \(1344\)

Input:

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

Output:

1/d*(-2/(2*a-2*b)/(tan(1/2*d*x+1/2*c)+1)-2/(2*a+2*b)/(tan(1/2*d*x+1/2*c)-1 
)+1/3*b/(a-b)/(a+b)*sum((-_R^4*b+2*_R^3*a-6*_R^2*b+2*_R*a-b)/(_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 = 3.27 (sec) , antiderivative size = 59362, normalized size of antiderivative = 198.54 \[ \int \frac {\sec ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-(2*b*cos(2*d*x + 2*c)*cos(d*x + c) + 2*b*cos(d*x + c) - ((a^2 - b^2)*d*co 
s(2*d*x + 2*c)^2 + (a^2 - b^2)*d*sin(2*d*x + 2*c)^2 + 2*(a^2 - b^2)*d*cos( 
2*d*x + 2*c) + (a^2 - b^2)*d)*integrate(2*(6*a*b^2*cos(4*d*x + 4*c)^2 - 48 
*a*b^2*cos(3*d*x + 3*c)^2 + 6*a*b^2*cos(2*d*x + 2*c)^2 + 6*a*b^2*sin(4*d*x 
 + 4*c)^2 - 48*a*b^2*sin(3*d*x + 3*c)^2 - 3*b^3*cos(d*x + c)*sin(2*d*x + 2 
*c) + 6*a*b^2*sin(2*d*x + 2*c)^2 - b^3*sin(d*x + c) - (2*a*b^2*cos(4*d*x + 
 4*c) - 2*a*b^2*cos(2*d*x + 2*c) - b^3*sin(5*d*x + 5*c) + 6*b^3*sin(3*d*x 
+ 3*c) - b^3*sin(d*x + c))*cos(6*d*x + 6*c) + (8*a*b^2*cos(3*d*x + 3*c) + 
3*b^3*sin(4*d*x + 4*c) - 3*b^3*sin(2*d*x + 2*c))*cos(5*d*x + 5*c) - (12*a* 
b^2*cos(2*d*x + 2*c) + 3*b^3*sin(d*x + c) - 2*a*b^2 + 2*(8*a^2*b - 9*b^3)* 
sin(3*d*x + 3*c))*cos(4*d*x + 4*c) + 2*(4*a*b^2*cos(d*x + c) - (8*a^2*b - 
9*b^3)*sin(2*d*x + 2*c))*cos(3*d*x + 3*c) + (3*b^3*sin(d*x + c) - 2*a*b^2) 
*cos(2*d*x + 2*c) - (b^3*cos(5*d*x + 5*c) - 6*b^3*cos(3*d*x + 3*c) + b^3*c 
os(d*x + c) + 2*a*b^2*sin(4*d*x + 4*c) - 2*a*b^2*sin(2*d*x + 2*c))*sin(6*d 
*x + 6*c) - (3*b^3*cos(4*d*x + 4*c) - 3*b^3*cos(2*d*x + 2*c) - 8*a*b^2*sin 
(3*d*x + 3*c) + b^3)*sin(5*d*x + 5*c) + (3*b^3*cos(d*x + c) - 12*a*b^2*sin 
(2*d*x + 2*c) + 2*(8*a^2*b - 9*b^3)*cos(3*d*x + 3*c))*sin(4*d*x + 4*c) + 2 
*(4*a*b^2*sin(d*x + c) + 3*b^3 + (8*a^2*b - 9*b^3)*cos(2*d*x + 2*c))*sin(3 
*d*x + 3*c))/(a^2*b^2 - b^4 + (a^2*b^2 - b^4)*cos(6*d*x + 6*c)^2 + 9*(a^2* 
b^2 - b^4)*cos(4*d*x + 4*c)^2 + 64*(a^4 - a^2*b^2)*cos(3*d*x + 3*c)^2 +...
 

Giac [F]

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

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

Output:

sage0*x
 

Mupad [B] (verification not implemented)

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

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

Output:

(a^2*symsum(log((8192*(a^2*b^20*cos(c/2 + (d*x)/2) - 12*a*b^21*sin(c/2 + ( 
d*x)/2) - 7*a^4*b^18*cos(c/2 + (d*x)/2) + 21*a^6*b^16*cos(c/2 + (d*x)/2) - 
 35*a^8*b^14*cos(c/2 + (d*x)/2) + 35*a^10*b^12*cos(c/2 + (d*x)/2) - 21*a^1 
2*b^10*cos(c/2 + (d*x)/2) + 7*a^14*b^8*cos(c/2 + (d*x)/2) - a^16*b^6*cos(c 
/2 + (d*x)/2) + 84*a^3*b^19*sin(c/2 + (d*x)/2) - 252*a^5*b^17*sin(c/2 + (d 
*x)/2) + 420*a^7*b^15*sin(c/2 + (d*x)/2) - 420*a^9*b^13*sin(c/2 + (d*x)/2) 
 + 252*a^11*b^11*sin(c/2 + (d*x)/2) - 84*a^13*b^9*sin(c/2 + (d*x)/2) + 12* 
a^15*b^7*sin(c/2 + (d*x)/2) - 198*root(2187*a^8*b^2*d^6 - 2187*a^6*b^4*d^6 
 + 729*a^4*b^6*d^6 - 729*a^10*d^6 - 1458*a^4*b^4*d^4 - 729*a^6*b^2*d^4 - 8 
1*a^2*b^4*d^2 - b^4, d, k)*a^3*b^20*sin(c/2 + (d*x)/2) + 714*root(2187*a^8 
*b^2*d^6 - 2187*a^6*b^4*d^6 + 729*a^4*b^6*d^6 - 729*a^10*d^6 - 1458*a^4*b^ 
4*d^4 - 729*a^6*b^2*d^4 - 81*a^2*b^4*d^2 - b^4, d, k)*a^5*b^18*sin(c/2 + ( 
d*x)/2) - 1470*root(2187*a^8*b^2*d^6 - 2187*a^6*b^4*d^6 + 729*a^4*b^6*d^6 
- 729*a^10*d^6 - 1458*a^4*b^4*d^4 - 729*a^6*b^2*d^4 - 81*a^2*b^4*d^2 - b^4 
, d, k)*a^7*b^16*sin(c/2 + (d*x)/2) + 1890*root(2187*a^8*b^2*d^6 - 2187*a^ 
6*b^4*d^6 + 729*a^4*b^6*d^6 - 729*a^10*d^6 - 1458*a^4*b^4*d^4 - 729*a^6*b^ 
2*d^4 - 81*a^2*b^4*d^2 - b^4, d, k)*a^9*b^14*sin(c/2 + (d*x)/2) - 1554*roo 
t(2187*a^8*b^2*d^6 - 2187*a^6*b^4*d^6 + 729*a^4*b^6*d^6 - 729*a^10*d^6 - 1 
458*a^4*b^4*d^4 - 729*a^6*b^2*d^4 - 81*a^2*b^4*d^2 - b^4, d, k)*a^11*b^12* 
sin(c/2 + (d*x)/2) + 798*root(2187*a^8*b^2*d^6 - 2187*a^6*b^4*d^6 + 729...
 

Reduce [F]

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

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

Output:

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