\(\int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx\) [59]

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

Optimal result

Integrand size = 24, antiderivative size = 109 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {8 i (a+i a \tan (c+d x))^9}{9 a^4 d}+\frac {6 i (a+i a \tan (c+d x))^{10}}{5 a^5 d}-\frac {6 i (a+i a \tan (c+d x))^{11}}{11 a^6 d}+\frac {i (a+i a \tan (c+d x))^{12}}{12 a^7 d} \] Output:

-8/9*I*(a+I*a*tan(d*x+c))^9/a^4/d+6/5*I*(a+I*a*tan(d*x+c))^10/a^5/d-6/11*I 
*(a+I*a*tan(d*x+c))^11/a^6/d+1/12*I*(a+I*a*tan(d*x+c))^12/a^7/d
 

Mathematica [A] (verified)

Time = 0.78 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.74 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {a^5 \sec ^{12}(c+d x) (78 \cos (c+d x)+221 \cos (3 (c+d x))-3 i (18 \sin (c+d x)+73 \sin (3 (c+d x)))) (-i \cos (9 (c+d x))+\sin (9 (c+d x)))}{1980 d} \] Input:

Integrate[Sec[c + d*x]^8*(a + I*a*Tan[c + d*x])^5,x]
 

Output:

(a^5*Sec[c + d*x]^12*(78*Cos[c + d*x] + 221*Cos[3*(c + d*x)] - (3*I)*(18*S 
in[c + d*x] + 73*Sin[3*(c + d*x)]))*((-I)*Cos[9*(c + d*x)] + Sin[9*(c + d* 
x)]))/(1980*d)
 

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.86, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 49, 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 \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sec (c+d x)^8 (a+i a \tan (c+d x))^5dx\)

\(\Big \downarrow \) 3968

\(\displaystyle -\frac {i \int (a-i a \tan (c+d x))^3 (i \tan (c+d x) a+a)^8d(i a \tan (c+d x))}{a^7 d}\)

\(\Big \downarrow \) 49

\(\displaystyle -\frac {i \int \left (-(i \tan (c+d x) a+a)^{11}+6 a (i \tan (c+d x) a+a)^{10}-12 a^2 (i \tan (c+d x) a+a)^9+8 a^3 (i \tan (c+d x) a+a)^8\right )d(i a \tan (c+d x))}{a^7 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {i \left (\frac {8}{9} a^3 (a+i a \tan (c+d x))^9-\frac {6}{5} a^2 (a+i a \tan (c+d x))^{10}-\frac {1}{12} (a+i a \tan (c+d x))^{12}+\frac {6}{11} a (a+i a \tan (c+d x))^{11}\right )}{a^7 d}\)

Input:

Int[Sec[c + d*x]^8*(a + I*a*Tan[c + d*x])^5,x]
 

Output:

((-I)*((8*a^3*(a + I*a*Tan[c + d*x])^9)/9 - (6*a^2*(a + I*a*Tan[c + d*x])^ 
10)/5 + (6*a*(a + I*a*Tan[c + d*x])^11)/11 - (a + I*a*Tan[c + d*x])^12/12) 
)/(a^7*d)
 

Defintions of rubi rules used

rule 49
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

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 3968
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[1/(a^(m - 2)*b*f)   Subst[Int[(a - x)^(m/2 - 1)*(a + x 
)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && 
 EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 376 vs. \(2 (93 ) = 186\).

Time = 0.41 (sec) , antiderivative size = 377, normalized size of antiderivative = 3.46

\[\frac {i a^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{12 \cos \left (d x +c \right )^{12}}+\frac {\sin \left (d x +c \right )^{6}}{20 \cos \left (d x +c \right )^{10}}+\frac {\sin \left (d x +c \right )^{6}}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{6}}{120 \cos \left (d x +c \right )^{6}}\right )+5 a^{5} \left (\frac {\sin \left (d x +c \right )^{5}}{11 \cos \left (d x +c \right )^{11}}+\frac {2 \sin \left (d x +c \right )^{5}}{33 \cos \left (d x +c \right )^{9}}+\frac {8 \sin \left (d x +c \right )^{5}}{231 \cos \left (d x +c \right )^{7}}+\frac {16 \sin \left (d x +c \right )^{5}}{1155 \cos \left (d x +c \right )^{5}}\right )-10 i a^{5} \left (\frac {\sin \left (d x +c \right )^{4}}{10 \cos \left (d x +c \right )^{10}}+\frac {3 \sin \left (d x +c \right )^{4}}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{4}}{20 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{4}}{40 \cos \left (d x +c \right )^{4}}\right )-10 a^{5} \left (\frac {\sin \left (d x +c \right )^{3}}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \sin \left (d x +c \right )^{3}}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \sin \left (d x +c \right )^{3}}{315 \cos \left (d x +c \right )^{3}}\right )+\frac {5 i a^{5}}{8 \cos \left (d x +c \right )^{8}}-a^{5} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )}{d}\]

Input:

int(sec(d*x+c)^8*(a+I*a*tan(d*x+c))^5,x)
 

Output:

1/d*(I*a^5*(1/12*sin(d*x+c)^6/cos(d*x+c)^12+1/20*sin(d*x+c)^6/cos(d*x+c)^1 
0+1/40*sin(d*x+c)^6/cos(d*x+c)^8+1/120*sin(d*x+c)^6/cos(d*x+c)^6)+5*a^5*(1 
/11*sin(d*x+c)^5/cos(d*x+c)^11+2/33*sin(d*x+c)^5/cos(d*x+c)^9+8/231*sin(d* 
x+c)^5/cos(d*x+c)^7+16/1155*sin(d*x+c)^5/cos(d*x+c)^5)-10*I*a^5*(1/10*sin( 
d*x+c)^4/cos(d*x+c)^10+3/40*sin(d*x+c)^4/cos(d*x+c)^8+1/20*sin(d*x+c)^4/co 
s(d*x+c)^6+1/40*sin(d*x+c)^4/cos(d*x+c)^4)-10*a^5*(1/9*sin(d*x+c)^3/cos(d* 
x+c)^9+2/21*sin(d*x+c)^3/cos(d*x+c)^7+8/105*sin(d*x+c)^3/cos(d*x+c)^5+16/3 
15*sin(d*x+c)^3/cos(d*x+c)^3)+5/8*I*a^5/cos(d*x+c)^8-a^5*(-16/35-1/7*sec(d 
*x+c)^6-6/35*sec(d*x+c)^4-8/35*sec(d*x+c)^2)*tan(d*x+c))
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (85) = 170\).

Time = 0.08 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.45 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {1024 \, {\left (-495 i \, a^{5} e^{\left (16 i \, d x + 16 i \, c\right )} - 792 i \, a^{5} e^{\left (14 i \, d x + 14 i \, c\right )} - 924 i \, a^{5} e^{\left (12 i \, d x + 12 i \, c\right )} - 792 i \, a^{5} e^{\left (10 i \, d x + 10 i \, c\right )} - 495 i \, a^{5} e^{\left (8 i \, d x + 8 i \, c\right )} - 220 i \, a^{5} e^{\left (6 i \, d x + 6 i \, c\right )} - 66 i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )} - 12 i \, a^{5} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{5}\right )}}{495 \, {\left (d e^{\left (24 i \, d x + 24 i \, c\right )} + 12 \, d e^{\left (22 i \, d x + 22 i \, c\right )} + 66 \, d e^{\left (20 i \, d x + 20 i \, c\right )} + 220 \, d e^{\left (18 i \, d x + 18 i \, c\right )} + 495 \, d e^{\left (16 i \, d x + 16 i \, c\right )} + 792 \, d e^{\left (14 i \, d x + 14 i \, c\right )} + 924 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 792 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 495 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 220 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 66 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 12 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:

integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c))^5,x, algorithm="fricas")
 

Output:

-1024/495*(-495*I*a^5*e^(16*I*d*x + 16*I*c) - 792*I*a^5*e^(14*I*d*x + 14*I 
*c) - 924*I*a^5*e^(12*I*d*x + 12*I*c) - 792*I*a^5*e^(10*I*d*x + 10*I*c) - 
495*I*a^5*e^(8*I*d*x + 8*I*c) - 220*I*a^5*e^(6*I*d*x + 6*I*c) - 66*I*a^5*e 
^(4*I*d*x + 4*I*c) - 12*I*a^5*e^(2*I*d*x + 2*I*c) - I*a^5)/(d*e^(24*I*d*x 
+ 24*I*c) + 12*d*e^(22*I*d*x + 22*I*c) + 66*d*e^(20*I*d*x + 20*I*c) + 220* 
d*e^(18*I*d*x + 18*I*c) + 495*d*e^(16*I*d*x + 16*I*c) + 792*d*e^(14*I*d*x 
+ 14*I*c) + 924*d*e^(12*I*d*x + 12*I*c) + 792*d*e^(10*I*d*x + 10*I*c) + 49 
5*d*e^(8*I*d*x + 8*I*c) + 220*d*e^(6*I*d*x + 6*I*c) + 66*d*e^(4*I*d*x + 4* 
I*c) + 12*d*e^(2*I*d*x + 2*I*c) + d)
 

Sympy [F]

\[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=i a^{5} \left (\int \left (- i \sec ^{8}{\left (c + d x \right )}\right )\, dx + \int 5 \tan {\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int \left (- 10 \tan ^{3}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\right )\, dx + \int \tan ^{5}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int 10 i \tan ^{2}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int \left (- 5 i \tan ^{4}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\right )\, dx\right ) \] Input:

integrate(sec(d*x+c)**8*(a+I*a*tan(d*x+c))**5,x)
 

Output:

I*a**5*(Integral(-I*sec(c + d*x)**8, x) + Integral(5*tan(c + d*x)*sec(c + 
d*x)**8, x) + Integral(-10*tan(c + d*x)**3*sec(c + d*x)**8, x) + Integral( 
tan(c + d*x)**5*sec(c + d*x)**8, x) + Integral(10*I*tan(c + d*x)**2*sec(c 
+ d*x)**8, x) + Integral(-5*I*tan(c + d*x)**4*sec(c + d*x)**8, x))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.47 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {-165 i \, a^{5} \tan \left (d x + c\right )^{12} - 900 \, a^{5} \tan \left (d x + c\right )^{11} + 1386 i \, a^{5} \tan \left (d x + c\right )^{10} - 1100 \, a^{5} \tan \left (d x + c\right )^{9} + 5445 i \, a^{5} \tan \left (d x + c\right )^{8} + 3960 \, a^{5} \tan \left (d x + c\right )^{7} + 4620 i \, a^{5} \tan \left (d x + c\right )^{6} + 8712 \, a^{5} \tan \left (d x + c\right )^{5} - 2475 i \, a^{5} \tan \left (d x + c\right )^{4} + 4620 \, a^{5} \tan \left (d x + c\right )^{3} - 4950 i \, a^{5} \tan \left (d x + c\right )^{2} - 1980 \, a^{5} \tan \left (d x + c\right )}{1980 \, d} \] Input:

integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c))^5,x, algorithm="maxima")
 

Output:

-1/1980*(-165*I*a^5*tan(d*x + c)^12 - 900*a^5*tan(d*x + c)^11 + 1386*I*a^5 
*tan(d*x + c)^10 - 1100*a^5*tan(d*x + c)^9 + 5445*I*a^5*tan(d*x + c)^8 + 3 
960*a^5*tan(d*x + c)^7 + 4620*I*a^5*tan(d*x + c)^6 + 8712*a^5*tan(d*x + c) 
^5 - 2475*I*a^5*tan(d*x + c)^4 + 4620*a^5*tan(d*x + c)^3 - 4950*I*a^5*tan( 
d*x + c)^2 - 1980*a^5*tan(d*x + c))/d
 

Giac [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.47 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {-165 i \, a^{5} \tan \left (d x + c\right )^{12} - 900 \, a^{5} \tan \left (d x + c\right )^{11} + 1386 i \, a^{5} \tan \left (d x + c\right )^{10} - 1100 \, a^{5} \tan \left (d x + c\right )^{9} + 5445 i \, a^{5} \tan \left (d x + c\right )^{8} + 3960 \, a^{5} \tan \left (d x + c\right )^{7} + 4620 i \, a^{5} \tan \left (d x + c\right )^{6} + 8712 \, a^{5} \tan \left (d x + c\right )^{5} - 2475 i \, a^{5} \tan \left (d x + c\right )^{4} + 4620 \, a^{5} \tan \left (d x + c\right )^{3} - 4950 i \, a^{5} \tan \left (d x + c\right )^{2} - 1980 \, a^{5} \tan \left (d x + c\right )}{1980 \, d} \] Input:

integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c))^5,x, algorithm="giac")
 

Output:

-1/1980*(-165*I*a^5*tan(d*x + c)^12 - 900*a^5*tan(d*x + c)^11 + 1386*I*a^5 
*tan(d*x + c)^10 - 1100*a^5*tan(d*x + c)^9 + 5445*I*a^5*tan(d*x + c)^8 + 3 
960*a^5*tan(d*x + c)^7 + 4620*I*a^5*tan(d*x + c)^6 + 8712*a^5*tan(d*x + c) 
^5 - 2475*I*a^5*tan(d*x + c)^4 + 4620*a^5*tan(d*x + c)^3 - 4950*I*a^5*tan( 
d*x + c)^2 - 1980*a^5*tan(d*x + c))/d
 

Mupad [B] (verification not implemented)

Time = 0.80 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.34 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {a^5\,\left (-{\cos \left (c+d\,x\right )}^{12}\,1749{}\mathrm {i}+2048\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^{11}+1024\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^9+768\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^7+640\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^5+{\cos \left (c+d\,x\right )}^4\,3960{}\mathrm {i}-3400\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^3-{\cos \left (c+d\,x\right )}^2\,2376{}\mathrm {i}+900\,\sin \left (c+d\,x\right )\,\cos \left (c+d\,x\right )+165{}\mathrm {i}\right )}{1980\,d\,{\cos \left (c+d\,x\right )}^{12}} \] Input:

int((a + a*tan(c + d*x)*1i)^5/cos(c + d*x)^8,x)
 

Output:

(a^5*(900*cos(c + d*x)*sin(c + d*x) - 3400*cos(c + d*x)^3*sin(c + d*x) + 6 
40*cos(c + d*x)^5*sin(c + d*x) + 768*cos(c + d*x)^7*sin(c + d*x) + 1024*co 
s(c + d*x)^9*sin(c + d*x) + 2048*cos(c + d*x)^11*sin(c + d*x) - cos(c + d* 
x)^2*2376i + cos(c + d*x)^4*3960i - cos(c + d*x)^12*1749i + 165i))/(1980*d 
*cos(c + d*x)^12)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 229, normalized size of antiderivative = 2.10 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {\sin \left (d x +c \right ) a^{5} \left (-2048 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{10}+11264 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{8}-25344 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}+29568 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-14520 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+1980 \cos \left (d x +c \right )-1749 \sin \left (d x +c \right )^{11} i +10494 \sin \left (d x +c \right )^{9} i -26235 \sin \left (d x +c \right )^{7} i +34980 \sin \left (d x +c \right )^{5} i -22275 \sin \left (d x +c \right )^{3} i +4950 \sin \left (d x +c \right ) i \right )}{1980 d \left (\sin \left (d x +c \right )^{12}-6 \sin \left (d x +c \right )^{10}+15 \sin \left (d x +c \right )^{8}-20 \sin \left (d x +c \right )^{6}+15 \sin \left (d x +c \right )^{4}-6 \sin \left (d x +c \right )^{2}+1\right )} \] Input:

int(sec(d*x+c)^8*(a+I*a*tan(d*x+c))^5,x)
                                                                                    
                                                                                    
 

Output:

(sin(c + d*x)*a**5*( - 2048*cos(c + d*x)*sin(c + d*x)**10 + 11264*cos(c + 
d*x)*sin(c + d*x)**8 - 25344*cos(c + d*x)*sin(c + d*x)**6 + 29568*cos(c + 
d*x)*sin(c + d*x)**4 - 14520*cos(c + d*x)*sin(c + d*x)**2 + 1980*cos(c + d 
*x) - 1749*sin(c + d*x)**11*i + 10494*sin(c + d*x)**9*i - 26235*sin(c + d* 
x)**7*i + 34980*sin(c + d*x)**5*i - 22275*sin(c + d*x)**3*i + 4950*sin(c + 
 d*x)*i))/(1980*d*(sin(c + d*x)**12 - 6*sin(c + d*x)**10 + 15*sin(c + d*x) 
**8 - 20*sin(c + d*x)**6 + 15*sin(c + d*x)**4 - 6*sin(c + d*x)**2 + 1))