\(\int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx\) [24]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (warning: unable to verify)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
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 = 126 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=4 i a^3 x+\frac {4 a^3 \log (\cos (c+d x))}{d}-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.35 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.87 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {4 a^3 \log (i+\tan (c+d x))}{d}-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {3 a^3 \tan ^4(c+d x)}{4 d}-\frac {i a^3 \tan ^5(c+d x)}{5 d} \] Input:

Integrate[Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^3,x]
 

Output:

(-4*a^3*Log[I + Tan[c + d*x]])/d - ((4*I)*a^3*Tan[c + d*x])/d + (2*a^3*Tan 
[c + d*x]^2)/d + (((4*I)/3)*a^3*Tan[c + d*x]^3)/d - (3*a^3*Tan[c + d*x]^4) 
/(4*d) - ((I/5)*a^3*Tan[c + d*x]^5)/d
 

Rubi [A] (verified)

Time = 0.81 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.05, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4039, 3042, 4075, 3042, 4011, 3042, 4011, 3042, 4008, 3042, 3956}

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 \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (c+d x)^3 (a+i a \tan (c+d x))^3dx\)

\(\Big \downarrow \) 4039

\(\displaystyle \frac {1}{5} a \int \tan ^3(c+d x) (i \tan (c+d x) a+a) (11 i \tan (c+d x) a+9 a)dx-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} a \int \tan (c+d x)^3 (i \tan (c+d x) a+a) (11 i \tan (c+d x) a+9 a)dx-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 4075

\(\displaystyle \frac {1}{5} a \left (-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\int \tan ^3(c+d x) \left (20 i \tan (c+d x) a^2+20 a^2\right )dx\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} a \left (-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\int \tan (c+d x)^3 \left (20 i \tan (c+d x) a^2+20 a^2\right )dx\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {1}{5} a \left (\int \tan ^2(c+d x) \left (20 a^2 \tan (c+d x)-20 i a^2\right )dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} a \left (\int \tan (c+d x)^2 \left (20 a^2 \tan (c+d x)-20 i a^2\right )dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {1}{5} a \left (\int \tan (c+d x) \left (-20 i \tan (c+d x) a^2-20 a^2\right )dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}+\frac {10 a^2 \tan ^2(c+d x)}{d}\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} a \left (\int \tan (c+d x) \left (-20 i \tan (c+d x) a^2-20 a^2\right )dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}+\frac {10 a^2 \tan ^2(c+d x)}{d}\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 4008

\(\displaystyle \frac {1}{5} a \left (-20 a^2 \int \tan (c+d x)dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}+\frac {10 a^2 \tan ^2(c+d x)}{d}-\frac {20 i a^2 \tan (c+d x)}{d}+20 i a^2 x\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} a \left (-20 a^2 \int \tan (c+d x)dx-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}+\frac {10 a^2 \tan ^2(c+d x)}{d}-\frac {20 i a^2 \tan (c+d x)}{d}+20 i a^2 x\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {1}{5} a \left (-\frac {11 a^2 \tan ^4(c+d x)}{4 d}+\frac {20 i a^2 \tan ^3(c+d x)}{3 d}+\frac {10 a^2 \tan ^2(c+d x)}{d}-\frac {20 i a^2 \tan (c+d x)}{d}+\frac {20 a^2 \log (\cos (c+d x))}{d}+20 i a^2 x\right )-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\)

Input:

Int[Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^3,x]
 

Output:

-1/5*(Tan[c + d*x]^4*(a^3 + I*a^3*Tan[c + d*x]))/d + (a*((20*I)*a^2*x + (2 
0*a^2*Log[Cos[c + d*x]])/d - ((20*I)*a^2*Tan[c + d*x])/d + (10*a^2*Tan[c + 
 d*x]^2)/d + (((20*I)/3)*a^2*Tan[c + d*x]^3)/d - (11*a^2*Tan[c + d*x]^4)/( 
4*d)))/5
 

Defintions of rubi rules used

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

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4008
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) 
*(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), 
x] + Simp[(b*c + a*d)   Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, 
f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
 

rule 4011
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int 
[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] 
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 
 0] && GtQ[m, 0]
 

rule 4039
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + 
 d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[a/(d*(m + n - 1)) 
Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^n*Simp[b*c*(m - 2) + 
a*d*(m + 2*n) + (a*c*(m - 2) + b*d*(3*m + 2*n - 4))*Tan[e + f*x], x], x], x 
] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 
 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 1] && NeQ[m + n - 1, 0] 
 && (IntegerQ[m] || IntegersQ[2*m, 2*n])
 

rule 4075
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) 
+ (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B 
*d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f* 
x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, 
d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1]
 
Maple [A] (warning: unable to verify)

Time = 0.45 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.66

method result size
derivativedivides \(\frac {a^{3} \left (-4 i \tan \left (d x +c \right )-\frac {i \tan \left (d x +c \right )^{5}}{5}-\frac {3 \tan \left (d x +c \right )^{4}}{4}+\frac {4 i \tan \left (d x +c \right )^{3}}{3}+2 \tan \left (d x +c \right )^{2}-2 \ln \left (1+\tan \left (d x +c \right )^{2}\right )+4 i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) \(83\)
default \(\frac {a^{3} \left (-4 i \tan \left (d x +c \right )-\frac {i \tan \left (d x +c \right )^{5}}{5}-\frac {3 \tan \left (d x +c \right )^{4}}{4}+\frac {4 i \tan \left (d x +c \right )^{3}}{3}+2 \tan \left (d x +c \right )^{2}-2 \ln \left (1+\tan \left (d x +c \right )^{2}\right )+4 i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) \(83\)
parallelrisch \(\frac {-12 i a^{3} \tan \left (d x +c \right )^{5}+80 i a^{3} \tan \left (d x +c \right )^{3}-45 \tan \left (d x +c \right )^{4} a^{3}+240 i a^{3} x d -240 i a^{3} \tan \left (d x +c \right )+120 \tan \left (d x +c \right )^{2} a^{3}-120 a^{3} \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{60 d}\) \(97\)
risch \(-\frac {8 i a^{3} c}{d}+\frac {2 a^{3} \left (240 \,{\mathrm e}^{8 i \left (d x +c \right )}+585 \,{\mathrm e}^{6 i \left (d x +c \right )}+695 \,{\mathrm e}^{4 i \left (d x +c \right )}+385 \,{\mathrm e}^{2 i \left (d x +c \right )}+83\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(99\)
norman \(4 i a^{3} x +\frac {2 a^{3} \tan \left (d x +c \right )^{2}}{d}-\frac {3 a^{3} \tan \left (d x +c \right )^{4}}{4 d}-\frac {4 i a^{3} \tan \left (d x +c \right )}{d}+\frac {4 i a^{3} \tan \left (d x +c \right )^{3}}{3 d}-\frac {i a^{3} \tan \left (d x +c \right )^{5}}{5 d}-\frac {2 a^{3} \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{d}\) \(109\)
parts \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}-\frac {i a^{3} \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {3 i a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}-\frac {3 a^{3} \left (\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}\) \(155\)

Input:

int(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.70 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {2 \, {\left (240 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 585 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 695 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 385 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 83 \, a^{3} + 30 \, {\left (a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{15 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:

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

Output:

2/15*(240*a^3*e^(8*I*d*x + 8*I*c) + 585*a^3*e^(6*I*d*x + 6*I*c) + 695*a^3* 
e^(4*I*d*x + 4*I*c) + 385*a^3*e^(2*I*d*x + 2*I*c) + 83*a^3 + 30*(a^3*e^(10 
*I*d*x + 10*I*c) + 5*a^3*e^(8*I*d*x + 8*I*c) + 10*a^3*e^(6*I*d*x + 6*I*c) 
+ 10*a^3*e^(4*I*d*x + 4*I*c) + 5*a^3*e^(2*I*d*x + 2*I*c) + a^3)*log(e^(2*I 
*d*x + 2*I*c) + 1))/(d*e^(10*I*d*x + 10*I*c) + 5*d*e^(8*I*d*x + 8*I*c) + 1 
0*d*e^(6*I*d*x + 6*I*c) + 10*d*e^(4*I*d*x + 4*I*c) + 5*d*e^(2*I*d*x + 2*I* 
c) + d)
 

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.64 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {4 a^{3} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {480 a^{3} e^{8 i c} e^{8 i d x} + 1170 a^{3} e^{6 i c} e^{6 i d x} + 1390 a^{3} e^{4 i c} e^{4 i d x} + 770 a^{3} e^{2 i c} e^{2 i d x} + 166 a^{3}}{15 d e^{10 i c} e^{10 i d x} + 75 d e^{8 i c} e^{8 i d x} + 150 d e^{6 i c} e^{6 i d x} + 150 d e^{4 i c} e^{4 i d x} + 75 d e^{2 i c} e^{2 i d x} + 15 d} \] Input:

integrate(tan(d*x+c)**3*(a+I*a*tan(d*x+c))**3,x)
 

Output:

4*a**3*log(exp(2*I*d*x) + exp(-2*I*c))/d + (480*a**3*exp(8*I*c)*exp(8*I*d* 
x) + 1170*a**3*exp(6*I*c)*exp(6*I*d*x) + 1390*a**3*exp(4*I*c)*exp(4*I*d*x) 
 + 770*a**3*exp(2*I*c)*exp(2*I*d*x) + 166*a**3)/(15*d*exp(10*I*c)*exp(10*I 
*d*x) + 75*d*exp(8*I*c)*exp(8*I*d*x) + 150*d*exp(6*I*c)*exp(6*I*d*x) + 150 
*d*exp(4*I*c)*exp(4*I*d*x) + 75*d*exp(2*I*c)*exp(2*I*d*x) + 15*d)
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.75 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {12 i \, a^{3} \tan \left (d x + c\right )^{5} + 45 \, a^{3} \tan \left (d x + c\right )^{4} - 80 i \, a^{3} \tan \left (d x + c\right )^{3} - 120 \, a^{3} \tan \left (d x + c\right )^{2} - 240 i \, {\left (d x + c\right )} a^{3} + 120 \, a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 240 i \, a^{3} \tan \left (d x + c\right )}{60 \, d} \] Input:

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

Output:

-1/60*(12*I*a^3*tan(d*x + c)^5 + 45*a^3*tan(d*x + c)^4 - 80*I*a^3*tan(d*x 
+ c)^3 - 120*a^3*tan(d*x + c)^2 - 240*I*(d*x + c)*a^3 + 120*a^3*log(tan(d* 
x + c)^2 + 1) + 240*I*a^3*tan(d*x + c))/d
 

Giac [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.81 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {4 \, a^{3} \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {12 i \, a^{3} d^{4} \tan \left (d x + c\right )^{5} + 45 \, a^{3} d^{4} \tan \left (d x + c\right )^{4} - 80 i \, a^{3} d^{4} \tan \left (d x + c\right )^{3} - 120 \, a^{3} d^{4} \tan \left (d x + c\right )^{2} + 240 i \, a^{3} d^{4} \tan \left (d x + c\right )}{60 \, d^{5}} \] Input:

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

Output:

-4*a^3*log(tan(d*x + c) + I)/d - 1/60*(12*I*a^3*d^4*tan(d*x + c)^5 + 45*a^ 
3*d^4*tan(d*x + c)^4 - 80*I*a^3*d^4*tan(d*x + c)^3 - 120*a^3*d^4*tan(d*x + 
 c)^2 + 240*I*a^3*d^4*tan(d*x + c))/d^5
 

Mupad [B] (verification not implemented)

Time = 0.88 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.69 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {4\,a^3\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )+a^3\,\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}-2\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^2-\frac {a^3\,{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}}{3}+\frac {3\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^4}{4}+\frac {a^3\,{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}}{5}}{d} \] Input:

int(tan(c + d*x)^3*(a + a*tan(c + d*x)*1i)^3,x)
 

Output:

-(4*a^3*log(tan(c + d*x) + 1i) + a^3*tan(c + d*x)*4i - 2*a^3*tan(c + d*x)^ 
2 - (a^3*tan(c + d*x)^3*4i)/3 + (3*a^3*tan(c + d*x)^4)/4 + (a^3*tan(c + d* 
x)^5*1i)/5)/d
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.62 \[ \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {a^{3} \left (-120 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )-12 \tan \left (d x +c \right )^{5} i -45 \tan \left (d x +c \right )^{4}+80 \tan \left (d x +c \right )^{3} i +120 \tan \left (d x +c \right )^{2}-240 \tan \left (d x +c \right ) i +240 d i x \right )}{60 d} \] Input:

int(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^3,x)
 

Output:

(a**3*( - 120*log(tan(c + d*x)**2 + 1) - 12*tan(c + d*x)**5*i - 45*tan(c + 
 d*x)**4 + 80*tan(c + d*x)**3*i + 120*tan(c + d*x)**2 - 240*tan(c + d*x)*i 
 + 240*d*i*x))/(60*d)