\(\int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx\) [1100]

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

Optimal result

Integrand size = 28, antiderivative size = 448 \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=\frac {\left (c^6+6 i c^5 d-15 c^4 d^2-20 i c^3 d^3-105 c^2 d^4+150 i c d^5+55 d^6\right ) x}{8 a^3 (c-i d)^3 (c+i d)^6}-\frac {d^4 \left (15 c^2-18 i c d-7 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 (c+i d)^6 (i c+d)^3 f}+\frac {d \left (c^3+6 i c^2 d-17 c d^2+28 i d^3\right )}{8 a^3 (c-i d) (c+i d)^4 f (c+d \tan (e+f x))^2}-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}+\frac {3 i c-13 d}{24 a (c+i d)^2 f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {3 c^2+18 i c d-55 d^2}{24 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^2}+\frac {d \left (c^4+6 i c^3 d-16 c^2 d^2+94 i c d^3+55 d^4\right )}{8 a^3 (c-i d)^2 (c+i d)^5 f (c+d \tan (e+f x))} \] Output:

1/8*(c^6+6*I*c^5*d-15*c^4*d^2-20*I*c^3*d^3-105*c^2*d^4+150*I*c*d^5+55*d^6) 
*x/a^3/(c-I*d)^3/(c+I*d)^6-d^4*(15*c^2-18*I*c*d-7*d^2)*ln(c*cos(f*x+e)+d*s 
in(f*x+e))/a^3/(c+I*d)^6/(I*c+d)^3/f+1/8*d*(c^3+6*I*c^2*d-17*c*d^2+28*I*d^ 
3)/a^3/(c-I*d)/(c+I*d)^4/f/(c+d*tan(f*x+e))^2-1/6/(I*c-d)/f/(a+I*a*tan(f*x 
+e))^3/(c+d*tan(f*x+e))^2+1/24*(3*I*c-13*d)/a/(c+I*d)^2/f/(a+I*a*tan(f*x+e 
))^2/(c+d*tan(f*x+e))^2+1/24*(3*c^2+18*I*c*d-55*d^2)/(I*c-d)^3/f/(a^3+I*a^ 
3*tan(f*x+e))/(c+d*tan(f*x+e))^2+1/8*d*(c^4+6*I*c^3*d-16*c^2*d^2+94*I*c*d^ 
3+55*d^4)/a^3/(c-I*d)^2/(c+I*d)^5/f/(c+d*tan(f*x+e))
 

Mathematica [A] (verified)

Time = 4.84 (sec) , antiderivative size = 418, normalized size of antiderivative = 0.93 \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=-\frac {\frac {8 (c+i d)}{(-i+\tan (e+f x))^3 (c+d \tan (e+f x))^2}+\frac {6 i c-26 d}{(-i+\tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {2 \left (3 c^2+18 i c d-55 d^2\right )}{(c+i d) (-i+\tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {6 \left (\left (3 c^2+18 i c d-55 d^2\right ) \left (-\frac {i \log (i-\tan (e+f x))}{2 (c+i d)^2}+\frac {i \log (i+\tan (e+f x))}{2 (c-i d)^2}+\frac {d \left (2 c \log (c+d \tan (e+f x))-\frac {c^2+d^2}{c+d \tan (e+f x)}\right )}{\left (c^2+d^2\right )^2}\right )-\left (c^3+6 i c^2 d-17 c d^2+28 i d^3\right ) \left (\frac {\log (i-\tan (e+f x))}{(-i c+d)^3}+\frac {\log (i+\tan (e+f x))}{(i c+d)^3}+\frac {d \left (\left (6 c^2-2 d^2\right ) \log (c+d \tan (e+f x))-\frac {\left (c^2+d^2\right ) \left (5 c^2+d^2+4 c d \tan (e+f x)\right )}{(c+d \tan (e+f x))^2}\right )}{\left (c^2+d^2\right )^3}\right )\right )}{c+i d}}{48 a^3 (c+i d)^2 f} \] Input:

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

Output:

-1/48*((8*(c + I*d))/((-I + Tan[e + f*x])^3*(c + d*Tan[e + f*x])^2) + ((6* 
I)*c - 26*d)/((-I + Tan[e + f*x])^2*(c + d*Tan[e + f*x])^2) - (2*(3*c^2 + 
(18*I)*c*d - 55*d^2))/((c + I*d)*(-I + Tan[e + f*x])*(c + d*Tan[e + f*x])^ 
2) - (6*((3*c^2 + (18*I)*c*d - 55*d^2)*(((-1/2*I)*Log[I - Tan[e + f*x]])/( 
c + I*d)^2 + ((I/2)*Log[I + Tan[e + f*x]])/(c - I*d)^2 + (d*(2*c*Log[c + d 
*Tan[e + f*x]] - (c^2 + d^2)/(c + d*Tan[e + f*x])))/(c^2 + d^2)^2) - (c^3 
+ (6*I)*c^2*d - 17*c*d^2 + (28*I)*d^3)*(Log[I - Tan[e + f*x]]/((-I)*c + d) 
^3 + Log[I + Tan[e + f*x]]/(I*c + d)^3 + (d*((6*c^2 - 2*d^2)*Log[c + d*Tan 
[e + f*x]] - ((c^2 + d^2)*(5*c^2 + d^2 + 4*c*d*Tan[e + f*x]))/(c + d*Tan[e 
 + f*x])^2))/(c^2 + d^2)^3)))/(c + I*d))/(a^3*(c + I*d)^2*f)
 

Rubi [A] (verified)

Time = 2.43 (sec) , antiderivative size = 489, normalized size of antiderivative = 1.09, number of steps used = 17, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.607, Rules used = {3042, 4042, 25, 3042, 4079, 27, 3042, 4079, 27, 3042, 4012, 3042, 4012, 3042, 4014, 3042, 4013}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3}dx\)

\(\Big \downarrow \) 4042

\(\displaystyle -\frac {\int -\frac {a (3 i c-8 d)+5 i a d \tan (e+f x)}{(i \tan (e+f x) a+a)^2 (c+d \tan (e+f x))^3}dx}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {a (3 i c-8 d)+5 i a d \tan (e+f x)}{(i \tan (e+f x) a+a)^2 (c+d \tan (e+f x))^3}dx}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {a (3 i c-8 d)+5 i a d \tan (e+f x)}{(i \tan (e+f x) a+a)^2 (c+d \tan (e+f x))^3}dx}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4079

\(\displaystyle \frac {-\frac {\int \frac {2 \left (\left (3 c^2+12 i d c-29 d^2\right ) a^2+2 (3 c+13 i d) d \tan (e+f x) a^2\right )}{(i \tan (e+f x) a+a) (c+d \tan (e+f x))^3}dx}{4 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {-\frac {\int \frac {\left (3 c^2+12 i d c-29 d^2\right ) a^2+2 (3 c+13 i d) d \tan (e+f x) a^2}{(i \tan (e+f x) a+a) (c+d \tan (e+f x))^3}dx}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\int \frac {\left (3 c^2+12 i d c-29 d^2\right ) a^2+2 (3 c+13 i d) d \tan (e+f x) a^2}{(i \tan (e+f x) a+a) (c+d \tan (e+f x))^3}dx}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4079

\(\displaystyle \frac {-\frac {\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {\int -\frac {3 \left (\left (i c^3-6 d c^2-21 i d^2 c+56 d^3\right ) a^3+d \left (3 i c^2-18 d c-55 i d^2\right ) \tan (e+f x) a^3\right )}{(c+d \tan (e+f x))^3}dx}{2 a^2 (-d+i c)}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {-\frac {\frac {3 \int \frac {\left (i c^3-6 d c^2-21 i d^2 c+56 d^3\right ) a^3+d \left (3 i c^2-18 d c-55 i d^2\right ) \tan (e+f x) a^3}{(c+d \tan (e+f x))^3}dx}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {3 \int \frac {\left (i c^3-6 d c^2-21 i d^2 c+56 d^3\right ) a^3+d \left (3 i c^2-18 d c-55 i d^2\right ) \tan (e+f x) a^3}{(c+d \tan (e+f x))^3}dx}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4012

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\int \frac {\left (i c^4-6 d c^3-18 i d^2 c^2+38 d^3 c-55 i d^4\right ) a^3+2 d \left (i c^3-6 d c^2-17 i d^2 c-28 d^3\right ) \tan (e+f x) a^3}{(c+d \tan (e+f x))^2}dx}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\int \frac {\left (i c^4-6 d c^3-18 i d^2 c^2+38 d^3 c-55 i d^4\right ) a^3+2 d \left (i c^3-6 d c^2-17 i d^2 c-28 d^3\right ) \tan (e+f x) a^3}{(c+d \tan (e+f x))^2}dx}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4012

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\frac {\int \frac {a^3 \left (i c^5-6 d c^4-16 i d^2 c^3+26 d^3 c^2-89 i d^4 c-56 d^5\right )-a^3 d \left (6 c^3 d-i \left (c^4-16 d^2 c^2+94 i d^3 c+55 d^4\right )\right ) \tan (e+f x)}{c+d \tan (e+f x)}dx}{c^2+d^2}+\frac {a^3 d \left (i c^4-6 c^3 d-16 i c^2 d^2-94 c d^3+55 i d^4\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))}}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\frac {\int \frac {a^3 \left (i c^5-6 d c^4-16 i d^2 c^3+26 d^3 c^2-89 i d^4 c-56 d^5\right )-a^3 d \left (6 c^3 d-i \left (c^4-16 d^2 c^2+94 i d^3 c+55 d^4\right )\right ) \tan (e+f x)}{c+d \tan (e+f x)}dx}{c^2+d^2}+\frac {a^3 d \left (i c^4-6 c^3 d-16 i c^2 d^2-94 c d^3+55 i d^4\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))}}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4014

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\frac {\frac {8 a^3 d^4 \left (15 c^2-18 i c d-7 d^2\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)}dx}{c^2+d^2}-\frac {a^3 x \left (6 c^5 d-i \left (c^6-15 c^4 d^2-20 i c^3 d^3-105 c^2 d^4+150 i c d^5+55 d^6\right )\right )}{c^2+d^2}}{c^2+d^2}+\frac {a^3 d \left (i c^4-6 c^3 d-16 i c^2 d^2-94 c d^3+55 i d^4\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))}}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {\frac {\frac {8 a^3 d^4 \left (15 c^2-18 i c d-7 d^2\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)}dx}{c^2+d^2}-\frac {a^3 x \left (6 c^5 d-i \left (c^6-15 c^4 d^2-20 i c^3 d^3-105 c^2 d^4+150 i c d^5+55 d^6\right )\right )}{c^2+d^2}}{c^2+d^2}+\frac {a^3 d \left (i c^4-6 c^3 d-16 i c^2 d^2-94 c d^3+55 i d^4\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))}}{c^2+d^2}+\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}\right )}{2 a^2 (-d+i c)}+\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

\(\Big \downarrow \) 4013

\(\displaystyle \frac {-\frac {\frac {a^2 \left (3 i c^2-18 c d-55 i d^2\right )}{2 f (c+i d) (a+i a \tan (e+f x)) (c+d \tan (e+f x))^2}+\frac {3 \left (\frac {a^3 d \left (i c^3-6 c^2 d-17 i c d^2-28 d^3\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}+\frac {\frac {a^3 d \left (i c^4-6 c^3 d-16 i c^2 d^2-94 c d^3+55 i d^4\right )}{f \left (c^2+d^2\right ) (c+d \tan (e+f x))}+\frac {\frac {8 a^3 d^4 \left (15 c^2-18 i c d-7 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{f \left (c^2+d^2\right )}-\frac {a^3 x \left (6 c^5 d-i \left (c^6-15 c^4 d^2-20 i c^3 d^3-105 c^2 d^4+150 i c d^5+55 d^6\right )\right )}{c^2+d^2}}{c^2+d^2}}{c^2+d^2}\right )}{2 a^2 (-d+i c)}}{2 a^2 (-d+i c)}-\frac {a (3 c+13 i d)}{4 f (c+i d) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}}{6 a^2 (-d+i c)}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^2}\)

Input:

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

Output:

-1/6*1/((I*c - d)*f*(a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^2) + (-1 
/4*(a*(3*c + (13*I)*d))/((c + I*d)*f*(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e 
 + f*x])^2) - ((a^2*((3*I)*c^2 - 18*c*d - (55*I)*d^2))/(2*(c + I*d)*f*(a + 
 I*a*Tan[e + f*x])*(c + d*Tan[e + f*x])^2) + (3*((a^3*d*(I*c^3 - 6*c^2*d - 
 (17*I)*c*d^2 - 28*d^3))/((c^2 + d^2)*f*(c + d*Tan[e + f*x])^2) + ((-((a^3 
*(6*c^5*d - I*(c^6 - 15*c^4*d^2 - (20*I)*c^3*d^3 - 105*c^2*d^4 + (150*I)*c 
*d^5 + 55*d^6))*x)/(c^2 + d^2)) + (8*a^3*d^4*(15*c^2 - (18*I)*c*d - 7*d^2) 
*Log[c*Cos[e + f*x] + d*Sin[e + f*x]])/((c^2 + d^2)*f))/(c^2 + d^2) + (a^3 
*d*(I*c^4 - 6*c^3*d - (16*I)*c^2*d^2 - 94*c*d^3 + (55*I)*d^4))/((c^2 + d^2 
)*f*(c + d*Tan[e + f*x])))/(c^2 + d^2)))/(2*a^2*(I*c - d)))/(2*a^2*(I*c - 
d)))/(6*a^2*(I*c - d))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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

rule 4013
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* 
(x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si 
n[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] && EqQ[a*c + b*d, 0]
 

rule 4014
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a 
*d)/(a^2 + b^2)   Int[(b - a*Tan[e + f*x])/(a + b*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] && N 
eQ[a*c + b*d, 0]
 

rule 4042
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e 
 + f*x])^(n + 1)/(2*f*m*(b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d))   In 
t[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m 
 + n + 1) + b*d*(m + n + 1)*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] 
 && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])
 

rule 4079
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + 
(f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim 
p[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*( 
b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d))   Int[(a + b*Tan[e + f*x])^(m 
 + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m 
- b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Free 
Q[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] 
 && LtQ[m, 0] &&  !GtQ[n, 0]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1091 vs. \(2 (412 ) = 824\).

Time = 1.22 (sec) , antiderivative size = 1092, normalized size of antiderivative = 2.44

method result size
derivativedivides \(\text {Expression too large to display}\) \(1092\)
default \(\text {Expression too large to display}\) \(1092\)
risch \(\text {Expression too large to display}\) \(1144\)
norman \(\text {Expression too large to display}\) \(2223\)

Input:

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

Output:

-I/f/a^3*d^6/(I*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))^2*c^2+15*I/f/a^3*d^4/(I* 
d-c)^3/(c+I*d)^6*ln(c+d*tan(f*x+e))*c^2-5*I/f/a^3*d^4/(I*d-c)^3/(c+I*d)^6/ 
(c+d*tan(f*x+e))*c^3-5*I/f/a^3*d^6/(I*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))*c- 
1/2*I/f/a^3*d^4/(I*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))^2*c^4+18/f/a^3*d^5/(I 
*d-c)^3/(c+I*d)^6*ln(c+d*tan(f*x+e))*c+9/8*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+e 
))*c^2*d+39/32*I/f/a^3/(c+I*d)^6*ln(1+tan(f*x+e)^2)*c*d^2+9/16*I/f/a^3/(c+ 
I*d)^6*arctan(tan(f*x+e))*c^2*d-1/2*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+e))^3*c^ 
2*d-7*I/f/a^3*d^6/(I*d-c)^3/(c+I*d)^6*ln(c+d*tan(f*x+e))-1/2*I/f/a^3*d^8/( 
I*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))^2+15/8*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+e 
))^2*c*d^2-3/f/a^3*d^5/(I*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))*c^2-7/8/f/a^3/ 
(c+I*d)^6/(-I+tan(f*x+e))^2*d^3+1/8/f/a^3/(c+I*d)^6/(-I+tan(f*x+e))*c^3-11 
1/32/f/a^3/(c+I*d)^6*ln(1+tan(f*x+e)^2)*d^3-1/6/f/a^3/(c+I*d)^6/(-I+tan(f* 
x+e))^3*c^3-1/32*I/f/a^3/(I*d-c)^3*ln(1+tan(f*x+e)^2)+1/16/f/a^3/(c+I*d)^6 
*arctan(tan(f*x+e))*c^3+9/32/f/a^3/(c+I*d)^6*ln(1+tan(f*x+e)^2)*c^2*d+9/8/ 
f/a^3/(c+I*d)^6/(-I+tan(f*x+e))^2*c^2*d+1/6*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+ 
e))^3*d^3-31/8*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+e))*d^3-1/32*I/f/a^3/(c+I*d)^ 
6*ln(1+tan(f*x+e)^2)*c^3-111/16*I/f/a^3/(c+I*d)^6*arctan(tan(f*x+e))*d^3-1 
/8*I/f/a^3/(c+I*d)^6/(-I+tan(f*x+e))^2*c^3+1/2/f/a^3/(c+I*d)^6/(-I+tan(f*x 
+e))^3*c*d^2-39/16/f/a^3/(c+I*d)^6*arctan(tan(f*x+e))*c*d^2-3/f/a^3*d^7/(I 
*d-c)^3/(c+I*d)^6/(c+d*tan(f*x+e))-39/8/f/a^3/(c+I*d)^6/(-I+tan(f*x+e))...
                                                                                    
                                                                                    
 

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. 1139 vs. \(2 (388) = 776\).

Time = 0.14 (sec) , antiderivative size = 1139, normalized size of antiderivative = 2.54 \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/96*(2*c^8 + 4*I*c^7*d + 4*c^6*d^2 + 12*I*c^5*d^3 + 12*I*c^3*d^5 - 4*c^2 
*d^6 + 4*I*c*d^7 - 2*d^8 - 12*(I*c^8 - 4*c^7*d - 4*I*c^6*d^2 - 4*c^5*d^3 - 
 250*I*c^4*d^4 - 764*c^3*d^5 + 924*I*c^2*d^6 + 516*c*d^7 - 111*I*d^8)*f*x* 
e^(10*I*f*x + 10*I*e) + 6*(3*c^8 + 6*I*c^7*d + 18*c^6*d^2 + 66*I*c^5*d^3 + 
 180*c^4*d^4 - 270*I*c^3*d^5 + 62*c^2*d^6 - 330*I*c*d^7 - 103*d^8 - 4*(I*c 
^8 - 6*c^7*d - 14*I*c^6*d^2 + 14*c^5*d^3 - 240*I*c^4*d^4 - 274*c^3*d^5 - 1 
14*I*c^2*d^6 - 294*c*d^7 + 111*I*d^8)*f*x)*e^(8*I*f*x + 8*I*e) + 3*(15*c^8 
 + 48*I*c^7*d + 24*c^6*d^2 + 312*I*c^5*d^3 + 150*c^4*d^4 + 96*I*c^3*d^5 + 
864*c^2*d^6 + 216*I*c*d^7 + 339*d^8 - 4*(I*c^8 - 8*c^7*d - 28*I*c^6*d^2 + 
56*c^5*d^3 - 170*I*c^4*d^4 + 136*c^3*d^5 - 252*I*c^2*d^6 + 72*c*d^7 - 111* 
I*d^8)*f*x)*e^(6*I*f*x + 6*I*e) + 2*(19*c^8 + 70*I*c^7*d - 34*c^6*d^2 + 21 
0*I*c^5*d^3 - 216*c^4*d^4 + 210*I*c^3*d^5 - 254*c^2*d^6 + 70*I*c*d^7 - 91* 
d^8)*e^(4*I*f*x + 4*I*e) + (13*c^8 + 36*I*c^7*d + 16*c^6*d^2 + 108*I*c^5*d 
^3 - 30*c^4*d^4 + 108*I*c^3*d^5 - 56*c^2*d^6 + 36*I*c*d^7 - 23*d^8)*e^(2*I 
*f*x + 2*I*e) - 96*((15*c^4*d^4 - 48*I*c^3*d^5 - 58*c^2*d^6 + 32*I*c*d^7 + 
 7*d^8)*e^(10*I*f*x + 10*I*e) + 2*(15*c^4*d^4 - 18*I*c^3*d^5 + 8*c^2*d^6 - 
 18*I*c*d^7 - 7*d^8)*e^(8*I*f*x + 8*I*e) + (15*c^4*d^4 + 12*I*c^3*d^5 + 14 
*c^2*d^6 + 4*I*c*d^7 + 7*d^8)*e^(6*I*f*x + 6*I*e))*log(((I*c + d)*e^(2*I*f 
*x + 2*I*e) + I*c - d)/(I*c + d)))/((I*a^3*c^11 - a^3*c^10*d + 5*I*a^3*c^9 
*d^2 - 5*a^3*c^8*d^3 + 10*I*a^3*c^7*d^4 - 10*a^3*c^6*d^5 + 10*I*a^3*c^5...
 

Sympy [F(-1)]

Timed out. \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=\text {Timed out} \] Input:

integrate(1/(a+I*a*tan(f*x+e))**3/(c+d*tan(f*x+e))**3,x)
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=\text {Exception raised: RuntimeError} \] Input:

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

Output:

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 

Giac [A] (verification not implemented)

Time = 0.89 (sec) , antiderivative size = 658, normalized size of antiderivative = 1.47 \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

-1/16*I*(c^3 + 9*I*c^2*d - 39*c*d^2 - 111*I*d^3)*log(tan(f*x + e) - I)/(a^ 
3*c^6*f + 6*I*a^3*c^5*d*f - 15*a^3*c^4*d^2*f - 20*I*a^3*c^3*d^3*f + 15*a^3 
*c^2*d^4*f + 6*I*a^3*c*d^5*f - a^3*d^6*f) - I*(15*c^2*d^5 - 18*I*c*d^6 - 7 
*d^7)*log(abs(d*tan(f*x + e) + c))/(a^3*c^9*d*f + 3*I*a^3*c^8*d^2*f + 8*I* 
a^3*c^6*d^4*f - 6*a^3*c^5*d^5*f + 6*I*a^3*c^4*d^6*f - 8*a^3*c^3*d^7*f - 3* 
a^3*c*d^9*f - I*a^3*d^10*f) + 1/16*I*log(tan(f*x + e) + I)/(a^3*c^3*f - 3* 
I*a^3*c^2*d*f - 3*a^3*c*d^2*f + I*a^3*d^3*f) - 1/24*I*(-10*I*c^8 + 36*c^7* 
d + 6*I*c^6*d^2 + 216*c^5*d^3 - 234*I*c^4*d^4 + 108*c^3*d^5 - 262*I*c^2*d^ 
6 - 72*c*d^7 - 12*I*d^8 + 3*(I*c^6*d^2 - 6*c^5*d^3 - 15*I*c^4*d^4 - 100*c^ 
3*d^5 + 39*I*c^2*d^6 - 94*c*d^7 + 55*I*d^8)*tan(f*x + e)^4 + 3*(2*I*c^7*d 
- 9*c^6*d^2 - 12*I*c^5*d^3 - 185*c^4*d^4 + 306*I*c^3*d^5 - 39*c^2*d^6 + 32 
0*I*c*d^7 + 137*d^8)*tan(f*x + e)^3 + (3*I*c^8 + 53*I*c^6*d^2 - 270*c^5*d^ 
3 + 1239*I*c^4*d^4 + 900*c^3*d^5 + 891*I*c^2*d^6 + 1170*c*d^7 - 298*I*d^8) 
*tan(f*x + e)^2 + (9*c^8 + 34*I*c^7*d + 9*c^6*d^2 + 408*I*c^5*d^3 + 963*c^ 
4*d^4 - 198*I*c^3*d^5 + 927*c^2*d^6 - 572*I*c*d^7 - 36*d^8)*tan(f*x + e))/ 
((d*tan(f*x + e) + c)^2*a^3*(c + I*d)^6*(c - I*d)^3*f*(tan(f*x + e) - I)^3 
)
 

Mupad [B] (verification not implemented)

Time = 10.40 (sec) , antiderivative size = 3368, normalized size of antiderivative = 7.52 \[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

symsum(log((a^3*d^8 + a^3*c*d^7*6i - 15*a^3*c^2*d^6 - a^3*c^3*d^5*20i + 15 
*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2)*(10159*c*d^9 - c^9*d - d^10*3 
080i + c^2*d^8*10692i - 2652*c^3*d^7 + c^4*d^6*1236i + 186*c^5*d^5 + c^6*d 
^4*124i + 68*c^7*d^3 - c^8*d^2*12i) - root(a^9*c^9*d^9*e^3*56320i + a^9*c^ 
11*d^7*e^3*36864i + a^9*c^7*d^11*e^3*36864i + 29696*a^9*c^12*d^6*e^3 - 296 
96*a^9*c^6*d^12*e^3 + 16896*a^9*c^10*d^8*e^3 - 16896*a^9*c^8*d^10*e^3 + 15 
360*a^9*c^14*d^4*e^3 - 15360*a^9*c^4*d^14*e^3 + a^9*c^13*d^5*e^3*6144i + a 
^9*c^5*d^13*e^3*6144i - a^9*c^15*d^3*e^3*4096i - a^9*c^3*d^15*e^3*4096i + 
2304*a^9*c^16*d^2*e^3 - 2304*a^9*c^2*d^16*e^3 - a^9*c^17*d*e^3*1536i - a^9 
*c*d^17*e^3*1536i + 256*a^9*d^18*e^3 - 256*a^9*c^18*e^3 - a^3*c*d^11*e*648 
84i - a^3*c^11*d*e*12i + a^3*c^3*d^9*e*137380i + 136578*a^3*c^2*d^10*e - 5 
8575*a^3*c^4*d^8*e - 1060*a^3*c^6*d^6*e + a^3*c^7*d^5*e*360i - a^3*c^5*d^7 
*e*360i - 255*a^3*c^8*d^4*e + a^3*c^9*d^3*e*220i + 66*a^3*c^10*d^2*e - 124 
33*a^3*d^12*e - a^3*c^12*e - 1026*c^2*d^7 + c^3*d^6*430i + 117*c^4*d^5 - c 
^5*d^4*15i + c*d^8*1725i + 777*d^9, e, k)*(root(a^9*c^9*d^9*e^3*56320i + a 
^9*c^11*d^7*e^3*36864i + a^9*c^7*d^11*e^3*36864i + 29696*a^9*c^12*d^6*e^3 
- 29696*a^9*c^6*d^12*e^3 + 16896*a^9*c^10*d^8*e^3 - 16896*a^9*c^8*d^10*e^3 
 + 15360*a^9*c^14*d^4*e^3 - 15360*a^9*c^4*d^14*e^3 + a^9*c^13*d^5*e^3*6144 
i + a^9*c^5*d^13*e^3*6144i - a^9*c^15*d^3*e^3*4096i - a^9*c^3*d^15*e^3*409 
6i + 2304*a^9*c^16*d^2*e^3 - 2304*a^9*c^2*d^16*e^3 - a^9*c^17*d*e^3*153...
 

Reduce [F]

\[ \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3} \, dx=-\frac {\int \frac {1}{\tan \left (f x +e \right )^{6} d^{3} i +3 \tan \left (f x +e \right )^{5} c \,d^{2} i +3 \tan \left (f x +e \right )^{5} d^{3}+3 \tan \left (f x +e \right )^{4} c^{2} d i +9 \tan \left (f x +e \right )^{4} c \,d^{2}-3 \tan \left (f x +e \right )^{4} d^{3} i +\tan \left (f x +e \right )^{3} c^{3} i +9 \tan \left (f x +e \right )^{3} c^{2} d -9 \tan \left (f x +e \right )^{3} c \,d^{2} i -\tan \left (f x +e \right )^{3} d^{3}+3 \tan \left (f x +e \right )^{2} c^{3}-9 \tan \left (f x +e \right )^{2} c^{2} d i -3 \tan \left (f x +e \right )^{2} c \,d^{2}-3 \tan \left (f x +e \right ) c^{3} i -3 \tan \left (f x +e \right ) c^{2} d -c^{3}}d x}{a^{3}} \] Input:

int(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e))^3,x)
 

Output:

( - int(1/(tan(e + f*x)**6*d**3*i + 3*tan(e + f*x)**5*c*d**2*i + 3*tan(e + 
 f*x)**5*d**3 + 3*tan(e + f*x)**4*c**2*d*i + 9*tan(e + f*x)**4*c*d**2 - 3* 
tan(e + f*x)**4*d**3*i + tan(e + f*x)**3*c**3*i + 9*tan(e + f*x)**3*c**2*d 
 - 9*tan(e + f*x)**3*c*d**2*i - tan(e + f*x)**3*d**3 + 3*tan(e + f*x)**2*c 
**3 - 9*tan(e + f*x)**2*c**2*d*i - 3*tan(e + f*x)**2*c*d**2 - 3*tan(e + f* 
x)*c**3*i - 3*tan(e + f*x)*c**2*d - c**3),x))/a**3