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

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

Optimal result

Integrand size = 23, antiderivative size = 396 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx=-\frac {9 d^3 e^{-2 i e-2 i f x}}{64 a^3 f^4}-\frac {9 d^3 e^{-4 i e-4 i f x}}{1024 a^3 f^4}-\frac {d^3 e^{-6 i e-6 i f x}}{1728 a^3 f^4}-\frac {9 i d^2 e^{-2 i e-2 i f x} (c+d x)}{32 a^3 f^3}-\frac {9 i d^2 e^{-4 i e-4 i f x} (c+d x)}{256 a^3 f^3}-\frac {i d^2 e^{-6 i e-6 i f x} (c+d x)}{288 a^3 f^3}+\frac {9 d e^{-2 i e-2 i f x} (c+d x)^2}{32 a^3 f^2}+\frac {9 d e^{-4 i e-4 i f x} (c+d x)^2}{128 a^3 f^2}+\frac {d e^{-6 i e-6 i f x} (c+d x)^2}{96 a^3 f^2}+\frac {3 i e^{-2 i e-2 i f x} (c+d x)^3}{16 a^3 f}+\frac {3 i e^{-4 i e-4 i f x} (c+d x)^3}{32 a^3 f}+\frac {i e^{-6 i e-6 i f x} (c+d x)^3}{48 a^3 f}+\frac {(c+d x)^4}{32 a^3 d} \] Output:

-9/64*d^3*exp(-2*I*e-2*I*f*x)/a^3/f^4-9/1024*d^3*exp(-4*I*e-4*I*f*x)/a^3/f 
^4-1/1728*d^3*exp(-6*I*e-6*I*f*x)/a^3/f^4-9/32*I*d^2*exp(-2*I*e-2*I*f*x)*( 
d*x+c)/a^3/f^3-9/256*I*d^2*exp(-4*I*e-4*I*f*x)*(d*x+c)/a^3/f^3-1/288*I*d^2 
*exp(-6*I*e-6*I*f*x)*(d*x+c)/a^3/f^3+9/32*d*exp(-2*I*e-2*I*f*x)*(d*x+c)^2/ 
a^3/f^2+9/128*d*exp(-4*I*e-4*I*f*x)*(d*x+c)^2/a^3/f^2+1/96*d*exp(-6*I*e-6* 
I*f*x)*(d*x+c)^2/a^3/f^2+3/16*I*exp(-2*I*e-2*I*f*x)*(d*x+c)^3/a^3/f+3/32*I 
*exp(-4*I*e-4*I*f*x)*(d*x+c)^3/a^3/f+1/48*I*exp(-6*I*e-6*I*f*x)*(d*x+c)^3/ 
a^3/f+1/32*(d*x+c)^4/a^3/d
 

Mathematica [A] (verified)

Time = 3.38 (sec) , antiderivative size = 667, normalized size of antiderivative = 1.68 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx=\frac {i \sec ^3(e+f x) \left (243 \left (32 i c^3 f^3+8 c^2 d f^2 (5+12 i f x)+4 c d^2 f \left (-9 i+20 f x+24 i f^2 x^2\right )+d^3 \left (-17-36 i f x+40 f^2 x^2+32 i f^3 x^3\right )\right ) \cos (e+f x)+16 \left (36 c^3 f^3 (i+6 f x)+18 c^2 d f^2 \left (1+6 i f x+18 f^2 x^2\right )+6 c d^2 f \left (-i+6 f x+18 i f^2 x^2+36 f^3 x^3\right )+d^3 \left (-1-6 i f x+18 f^2 x^2+36 i f^3 x^3+54 f^4 x^4\right )\right ) \cos (3 (e+f x))-3645 i d^3 \sin (e+f x)+6804 c d^2 f \sin (e+f x)+5832 i c^2 d f^2 \sin (e+f x)-2592 c^3 f^3 \sin (e+f x)+6804 d^3 f x \sin (e+f x)+11664 i c d^2 f^2 x \sin (e+f x)-7776 c^2 d f^3 x \sin (e+f x)+5832 i d^3 f^2 x^2 \sin (e+f x)-7776 c d^2 f^3 x^2 \sin (e+f x)-2592 d^3 f^3 x^3 \sin (e+f x)+16 i d^3 \sin (3 (e+f x))-96 c d^2 f \sin (3 (e+f x))-288 i c^2 d f^2 \sin (3 (e+f x))+576 c^3 f^3 \sin (3 (e+f x))-96 d^3 f x \sin (3 (e+f x))-576 i c d^2 f^2 x \sin (3 (e+f x))+1728 c^2 d f^3 x \sin (3 (e+f x))+3456 i c^3 f^4 x \sin (3 (e+f x))-288 i d^3 f^2 x^2 \sin (3 (e+f x))+1728 c d^2 f^3 x^2 \sin (3 (e+f x))+5184 i c^2 d f^4 x^2 \sin (3 (e+f x))+576 d^3 f^3 x^3 \sin (3 (e+f x))+3456 i c d^2 f^4 x^3 \sin (3 (e+f x))+864 i d^3 f^4 x^4 \sin (3 (e+f x))\right )}{27648 a^3 f^4 (-i+\tan (e+f x))^3} \] Input:

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

Output:

((I/27648)*Sec[e + f*x]^3*(243*((32*I)*c^3*f^3 + 8*c^2*d*f^2*(5 + (12*I)*f 
*x) + 4*c*d^2*f*(-9*I + 20*f*x + (24*I)*f^2*x^2) + d^3*(-17 - (36*I)*f*x + 
 40*f^2*x^2 + (32*I)*f^3*x^3))*Cos[e + f*x] + 16*(36*c^3*f^3*(I + 6*f*x) + 
 18*c^2*d*f^2*(1 + (6*I)*f*x + 18*f^2*x^2) + 6*c*d^2*f*(-I + 6*f*x + (18*I 
)*f^2*x^2 + 36*f^3*x^3) + d^3*(-1 - (6*I)*f*x + 18*f^2*x^2 + (36*I)*f^3*x^ 
3 + 54*f^4*x^4))*Cos[3*(e + f*x)] - (3645*I)*d^3*Sin[e + f*x] + 6804*c*d^2 
*f*Sin[e + f*x] + (5832*I)*c^2*d*f^2*Sin[e + f*x] - 2592*c^3*f^3*Sin[e + f 
*x] + 6804*d^3*f*x*Sin[e + f*x] + (11664*I)*c*d^2*f^2*x*Sin[e + f*x] - 777 
6*c^2*d*f^3*x*Sin[e + f*x] + (5832*I)*d^3*f^2*x^2*Sin[e + f*x] - 7776*c*d^ 
2*f^3*x^2*Sin[e + f*x] - 2592*d^3*f^3*x^3*Sin[e + f*x] + (16*I)*d^3*Sin[3* 
(e + f*x)] - 96*c*d^2*f*Sin[3*(e + f*x)] - (288*I)*c^2*d*f^2*Sin[3*(e + f* 
x)] + 576*c^3*f^3*Sin[3*(e + f*x)] - 96*d^3*f*x*Sin[3*(e + f*x)] - (576*I) 
*c*d^2*f^2*x*Sin[3*(e + f*x)] + 1728*c^2*d*f^3*x*Sin[3*(e + f*x)] + (3456* 
I)*c^3*f^4*x*Sin[3*(e + f*x)] - (288*I)*d^3*f^2*x^2*Sin[3*(e + f*x)] + 172 
8*c*d^2*f^3*x^2*Sin[3*(e + f*x)] + (5184*I)*c^2*d*f^4*x^2*Sin[3*(e + f*x)] 
 + 576*d^3*f^3*x^3*Sin[3*(e + f*x)] + (3456*I)*c*d^2*f^4*x^3*Sin[3*(e + f* 
x)] + (864*I)*d^3*f^4*x^4*Sin[3*(e + f*x)]))/(a^3*f^4*(-I + Tan[e + f*x])^ 
3)
 

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 396, 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, 4212, 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 {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4212

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {9 i d^2 (c+d x) e^{-2 i e-2 i f x}}{32 a^3 f^3}-\frac {9 i d^2 (c+d x) e^{-4 i e-4 i f x}}{256 a^3 f^3}-\frac {i d^2 (c+d x) e^{-6 i e-6 i f x}}{288 a^3 f^3}+\frac {9 d (c+d x)^2 e^{-2 i e-2 i f x}}{32 a^3 f^2}+\frac {9 d (c+d x)^2 e^{-4 i e-4 i f x}}{128 a^3 f^2}+\frac {d (c+d x)^2 e^{-6 i e-6 i f x}}{96 a^3 f^2}+\frac {3 i (c+d x)^3 e^{-2 i e-2 i f x}}{16 a^3 f}+\frac {3 i (c+d x)^3 e^{-4 i e-4 i f x}}{32 a^3 f}+\frac {i (c+d x)^3 e^{-6 i e-6 i f x}}{48 a^3 f}+\frac {(c+d x)^4}{32 a^3 d}-\frac {9 d^3 e^{-2 i e-2 i f x}}{64 a^3 f^4}-\frac {9 d^3 e^{-4 i e-4 i f x}}{1024 a^3 f^4}-\frac {d^3 e^{-6 i e-6 i f x}}{1728 a^3 f^4}\)

Input:

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

Output:

(-9*d^3*E^((-2*I)*e - (2*I)*f*x))/(64*a^3*f^4) - (9*d^3*E^((-4*I)*e - (4*I 
)*f*x))/(1024*a^3*f^4) - (d^3*E^((-6*I)*e - (6*I)*f*x))/(1728*a^3*f^4) - ( 
((9*I)/32)*d^2*E^((-2*I)*e - (2*I)*f*x)*(c + d*x))/(a^3*f^3) - (((9*I)/256 
)*d^2*E^((-4*I)*e - (4*I)*f*x)*(c + d*x))/(a^3*f^3) - ((I/288)*d^2*E^((-6* 
I)*e - (6*I)*f*x)*(c + d*x))/(a^3*f^3) + (9*d*E^((-2*I)*e - (2*I)*f*x)*(c 
+ d*x)^2)/(32*a^3*f^2) + (9*d*E^((-4*I)*e - (4*I)*f*x)*(c + d*x)^2)/(128*a 
^3*f^2) + (d*E^((-6*I)*e - (6*I)*f*x)*(c + d*x)^2)/(96*a^3*f^2) + (((3*I)/ 
16)*E^((-2*I)*e - (2*I)*f*x)*(c + d*x)^3)/(a^3*f) + (((3*I)/32)*E^((-4*I)* 
e - (4*I)*f*x)*(c + d*x)^3)/(a^3*f) + ((I/48)*E^((-6*I)*e - (6*I)*f*x)*(c 
+ d*x)^3)/(a^3*f) + (c + d*x)^4/(32*a^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 4212
Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), 
x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (1/(2*a) + E^(2*(a/b)*(e + f* 
x))/(2*a))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 + b^2 
, 0] && ILtQ[n, 0]
 
Maple [A] (verified)

Time = 1.11 (sec) , antiderivative size = 396, normalized size of antiderivative = 1.00

method result size
risch \(\frac {d^{3} x^{4}}{32 a^{3}}+\frac {d^{2} c \,x^{3}}{8 a^{3}}+\frac {3 d \,c^{2} x^{2}}{16 a^{3}}+\frac {c^{3} x}{8 a^{3}}+\frac {c^{4}}{32 a^{3} d}+\frac {3 i \left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}-6 i d^{3} f^{2} x^{2}+12 c^{2} d \,f^{3} x -12 i c \,d^{2} f^{2} x +4 c^{3} f^{3}-6 i c^{2} d \,f^{2}-6 d^{3} f x -6 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-2 i \left (f x +e \right )}}{64 a^{3} f^{4}}+\frac {3 i \left (32 d^{3} x^{3} f^{3}+96 c \,d^{2} f^{3} x^{2}-24 i d^{3} f^{2} x^{2}+96 c^{2} d \,f^{3} x -48 i c \,d^{2} f^{2} x +32 c^{3} f^{3}-24 i c^{2} d \,f^{2}-12 d^{3} f x -12 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-4 i \left (f x +e \right )}}{1024 a^{3} f^{4}}+\frac {i \left (36 d^{3} x^{3} f^{3}+108 c \,d^{2} f^{3} x^{2}-18 i d^{3} f^{2} x^{2}+108 c^{2} d \,f^{3} x -36 i c \,d^{2} f^{2} x +36 c^{3} f^{3}-18 i c^{2} d \,f^{2}-6 d^{3} f x -6 c \,d^{2} f +i d^{3}\right ) {\mathrm e}^{-6 i \left (f x +e \right )}}{1728 a^{3} f^{4}}\) \(396\)

Input:

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

Output:

1/32/a^3*d^3*x^4+1/8/a^3*d^2*c*x^3+3/16/a^3*d*c^2*x^2+1/8/a^3*c^3*x+1/32/a 
^3/d*c^4+3/64*I*(4*d^3*x^3*f^3-6*I*d^3*f^2*x^2+12*c*d^2*f^3*x^2-12*I*c*d^2 
*f^2*x+12*c^2*d*f^3*x-6*I*c^2*d*f^2+4*c^3*f^3-6*d^3*f*x+3*I*d^3-6*c*d^2*f) 
/a^3/f^4*exp(-2*I*(f*x+e))+3/1024*I*(32*d^3*x^3*f^3-24*I*d^3*f^2*x^2+96*c* 
d^2*f^3*x^2-48*I*c*d^2*f^2*x+96*c^2*d*f^3*x-24*I*c^2*d*f^2+32*c^3*f^3-12*d 
^3*f*x+3*I*d^3-12*c*d^2*f)/a^3/f^4*exp(-4*I*(f*x+e))+1/1728*I*(36*d^3*x^3* 
f^3-18*I*d^3*f^2*x^2+108*c*d^2*f^3*x^2-36*I*c*d^2*f^2*x+108*c^2*d*f^3*x-18 
*I*c^2*d*f^2+36*c^3*f^3-6*d^3*f*x+I*d^3-6*c*d^2*f)/a^3/f^4*exp(-6*I*(f*x+e 
))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 370, normalized size of antiderivative = 0.93 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx=\frac {{\left (576 i \, d^{3} f^{3} x^{3} + 576 i \, c^{3} f^{3} + 288 \, c^{2} d f^{2} - 96 i \, c d^{2} f - 16 \, d^{3} - 288 \, {\left (-6 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} - 96 \, {\left (-18 i \, c^{2} d f^{3} - 6 \, c d^{2} f^{2} + i \, d^{3} f\right )} x + 864 \, {\left (d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x\right )} e^{\left (6 i \, f x + 6 i \, e\right )} - 1296 \, {\left (-4 i \, d^{3} f^{3} x^{3} - 4 i \, c^{3} f^{3} - 6 \, c^{2} d f^{2} + 6 i \, c d^{2} f + 3 \, d^{3} + 6 \, {\left (-2 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 6 \, {\left (-2 i \, c^{2} d f^{3} - 2 \, c d^{2} f^{2} + i \, d^{3} f\right )} x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 81 \, {\left (-32 i \, d^{3} f^{3} x^{3} - 32 i \, c^{3} f^{3} - 24 \, c^{2} d f^{2} + 12 i \, c d^{2} f + 3 \, d^{3} + 24 \, {\left (-4 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 12 \, {\left (-8 i \, c^{2} d f^{3} - 4 \, c d^{2} f^{2} + i \, d^{3} f\right )} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{27648 \, a^{3} f^{4}} \] Input:

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

Output:

1/27648*(576*I*d^3*f^3*x^3 + 576*I*c^3*f^3 + 288*c^2*d*f^2 - 96*I*c*d^2*f 
- 16*d^3 - 288*(-6*I*c*d^2*f^3 - d^3*f^2)*x^2 - 96*(-18*I*c^2*d*f^3 - 6*c* 
d^2*f^2 + I*d^3*f)*x + 864*(d^3*f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^ 
2 + 4*c^3*f^4*x)*e^(6*I*f*x + 6*I*e) - 1296*(-4*I*d^3*f^3*x^3 - 4*I*c^3*f^ 
3 - 6*c^2*d*f^2 + 6*I*c*d^2*f + 3*d^3 + 6*(-2*I*c*d^2*f^3 - d^3*f^2)*x^2 + 
 6*(-2*I*c^2*d*f^3 - 2*c*d^2*f^2 + I*d^3*f)*x)*e^(4*I*f*x + 4*I*e) - 81*(- 
32*I*d^3*f^3*x^3 - 32*I*c^3*f^3 - 24*c^2*d*f^2 + 12*I*c*d^2*f + 3*d^3 + 24 
*(-4*I*c*d^2*f^3 - d^3*f^2)*x^2 + 12*(-8*I*c^2*d*f^3 - 4*c*d^2*f^2 + I*d^3 
*f)*x)*e^(2*I*f*x + 2*I*e))*e^(-6*I*f*x - 6*I*e)/(a^3*f^4)
 

Sympy [A] (verification not implemented)

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

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

Output:

Piecewise((((2359296*I*a**6*c**3*f**11*exp(6*I*e) + 7077888*I*a**6*c**2*d* 
f**11*x*exp(6*I*e) + 1179648*a**6*c**2*d*f**10*exp(6*I*e) + 7077888*I*a**6 
*c*d**2*f**11*x**2*exp(6*I*e) + 2359296*a**6*c*d**2*f**10*x*exp(6*I*e) - 3 
93216*I*a**6*c*d**2*f**9*exp(6*I*e) + 2359296*I*a**6*d**3*f**11*x**3*exp(6 
*I*e) + 1179648*a**6*d**3*f**10*x**2*exp(6*I*e) - 393216*I*a**6*d**3*f**9* 
x*exp(6*I*e) - 65536*a**6*d**3*f**8*exp(6*I*e))*exp(-6*I*f*x) + (10616832* 
I*a**6*c**3*f**11*exp(8*I*e) + 31850496*I*a**6*c**2*d*f**11*x*exp(8*I*e) + 
 7962624*a**6*c**2*d*f**10*exp(8*I*e) + 31850496*I*a**6*c*d**2*f**11*x**2* 
exp(8*I*e) + 15925248*a**6*c*d**2*f**10*x*exp(8*I*e) - 3981312*I*a**6*c*d* 
*2*f**9*exp(8*I*e) + 10616832*I*a**6*d**3*f**11*x**3*exp(8*I*e) + 7962624* 
a**6*d**3*f**10*x**2*exp(8*I*e) - 3981312*I*a**6*d**3*f**9*x*exp(8*I*e) - 
995328*a**6*d**3*f**8*exp(8*I*e))*exp(-4*I*f*x) + (21233664*I*a**6*c**3*f* 
*11*exp(10*I*e) + 63700992*I*a**6*c**2*d*f**11*x*exp(10*I*e) + 31850496*a* 
*6*c**2*d*f**10*exp(10*I*e) + 63700992*I*a**6*c*d**2*f**11*x**2*exp(10*I*e 
) + 63700992*a**6*c*d**2*f**10*x*exp(10*I*e) - 31850496*I*a**6*c*d**2*f**9 
*exp(10*I*e) + 21233664*I*a**6*d**3*f**11*x**3*exp(10*I*e) + 31850496*a**6 
*d**3*f**10*x**2*exp(10*I*e) - 31850496*I*a**6*d**3*f**9*x*exp(10*I*e) - 1 
5925248*a**6*d**3*f**8*exp(10*I*e))*exp(-2*I*f*x))*exp(-12*I*e)/(113246208 
*a**9*f**12), Ne(a**9*f**12*exp(12*I*e), 0)), (x**4*(3*d**3*exp(4*I*e) + 3 
*d**3*exp(2*I*e) + d**3)*exp(-6*I*e)/(32*a**3) + x**3*(3*c*d**2*exp(4*I...
 

Maxima [F(-2)]

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

integrate((d*x+c)^3/(a+I*a*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.34 (sec) , antiderivative size = 548, normalized size of antiderivative = 1.38 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx=\frac {{\left (864 \, d^{3} f^{4} x^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 3456 \, c d^{2} f^{4} x^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + 5184 \, c^{2} d f^{4} x^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 5184 i \, d^{3} f^{3} x^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 2592 i \, d^{3} f^{3} x^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 576 i \, d^{3} f^{3} x^{3} + 3456 \, c^{3} f^{4} x e^{\left (6 i \, f x + 6 i \, e\right )} + 15552 i \, c d^{2} f^{3} x^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 7776 i \, c d^{2} f^{3} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 1728 i \, c d^{2} f^{3} x^{2} + 15552 i \, c^{2} d f^{3} x e^{\left (4 i \, f x + 4 i \, e\right )} + 7776 \, d^{3} f^{2} x^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 7776 i \, c^{2} d f^{3} x e^{\left (2 i \, f x + 2 i \, e\right )} + 1944 \, d^{3} f^{2} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 1728 i \, c^{2} d f^{3} x + 288 \, d^{3} f^{2} x^{2} + 5184 i \, c^{3} f^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 15552 \, c d^{2} f^{2} x e^{\left (4 i \, f x + 4 i \, e\right )} + 2592 i \, c^{3} f^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 3888 \, c d^{2} f^{2} x e^{\left (2 i \, f x + 2 i \, e\right )} + 576 i \, c^{3} f^{3} + 576 \, c d^{2} f^{2} x + 7776 \, c^{2} d f^{2} e^{\left (4 i \, f x + 4 i \, e\right )} - 7776 i \, d^{3} f x e^{\left (4 i \, f x + 4 i \, e\right )} + 1944 \, c^{2} d f^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - 972 i \, d^{3} f x e^{\left (2 i \, f x + 2 i \, e\right )} + 288 \, c^{2} d f^{2} - 96 i \, d^{3} f x - 7776 i \, c d^{2} f e^{\left (4 i \, f x + 4 i \, e\right )} - 972 i \, c d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - 96 i \, c d^{2} f - 3888 \, d^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 243 \, d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 16 \, d^{3}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{27648 \, a^{3} f^{4}} \] Input:

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

Output:

1/27648*(864*d^3*f^4*x^4*e^(6*I*f*x + 6*I*e) + 3456*c*d^2*f^4*x^3*e^(6*I*f 
*x + 6*I*e) + 5184*c^2*d*f^4*x^2*e^(6*I*f*x + 6*I*e) + 5184*I*d^3*f^3*x^3* 
e^(4*I*f*x + 4*I*e) + 2592*I*d^3*f^3*x^3*e^(2*I*f*x + 2*I*e) + 576*I*d^3*f 
^3*x^3 + 3456*c^3*f^4*x*e^(6*I*f*x + 6*I*e) + 15552*I*c*d^2*f^3*x^2*e^(4*I 
*f*x + 4*I*e) + 7776*I*c*d^2*f^3*x^2*e^(2*I*f*x + 2*I*e) + 1728*I*c*d^2*f^ 
3*x^2 + 15552*I*c^2*d*f^3*x*e^(4*I*f*x + 4*I*e) + 7776*d^3*f^2*x^2*e^(4*I* 
f*x + 4*I*e) + 7776*I*c^2*d*f^3*x*e^(2*I*f*x + 2*I*e) + 1944*d^3*f^2*x^2*e 
^(2*I*f*x + 2*I*e) + 1728*I*c^2*d*f^3*x + 288*d^3*f^2*x^2 + 5184*I*c^3*f^3 
*e^(4*I*f*x + 4*I*e) + 15552*c*d^2*f^2*x*e^(4*I*f*x + 4*I*e) + 2592*I*c^3* 
f^3*e^(2*I*f*x + 2*I*e) + 3888*c*d^2*f^2*x*e^(2*I*f*x + 2*I*e) + 576*I*c^3 
*f^3 + 576*c*d^2*f^2*x + 7776*c^2*d*f^2*e^(4*I*f*x + 4*I*e) - 7776*I*d^3*f 
*x*e^(4*I*f*x + 4*I*e) + 1944*c^2*d*f^2*e^(2*I*f*x + 2*I*e) - 972*I*d^3*f* 
x*e^(2*I*f*x + 2*I*e) + 288*c^2*d*f^2 - 96*I*d^3*f*x - 7776*I*c*d^2*f*e^(4 
*I*f*x + 4*I*e) - 972*I*c*d^2*f*e^(2*I*f*x + 2*I*e) - 96*I*c*d^2*f - 3888* 
d^3*e^(4*I*f*x + 4*I*e) - 243*d^3*e^(2*I*f*x + 2*I*e) - 16*d^3)*e^(-6*I*f* 
x - 6*I*e)/(a^3*f^4)
 

Mupad [B] (verification not implemented)

Time = 9.27 (sec) , antiderivative size = 411, normalized size of antiderivative = 1.04 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^3} \, dx={\mathrm {e}}^{-e\,2{}\mathrm {i}-f\,x\,2{}\mathrm {i}}\,\left (\frac {\left (12\,c^3\,f^3-c^2\,d\,f^2\,18{}\mathrm {i}-18\,c\,d^2\,f+d^3\,9{}\mathrm {i}\right )\,1{}\mathrm {i}}{64\,a^3\,f^4}+\frac {d^3\,x^3\,3{}\mathrm {i}}{16\,a^3\,f}-\frac {d\,x\,\left (-2\,c^2\,f^2+c\,d\,f\,2{}\mathrm {i}+d^2\right )\,9{}\mathrm {i}}{32\,a^3\,f^3}-\frac {d^2\,x^2\,\left (-2\,c\,f+d\,1{}\mathrm {i}\right )\,9{}\mathrm {i}}{32\,a^3\,f^2}\right )+{\mathrm {e}}^{-e\,4{}\mathrm {i}-f\,x\,4{}\mathrm {i}}\,\left (\frac {\left (96\,c^3\,f^3-c^2\,d\,f^2\,72{}\mathrm {i}-36\,c\,d^2\,f+d^3\,9{}\mathrm {i}\right )\,1{}\mathrm {i}}{1024\,a^3\,f^4}+\frac {d^3\,x^3\,3{}\mathrm {i}}{32\,a^3\,f}-\frac {d\,x\,\left (-8\,c^2\,f^2+c\,d\,f\,4{}\mathrm {i}+d^2\right )\,9{}\mathrm {i}}{256\,a^3\,f^3}-\frac {d^2\,x^2\,\left (-4\,c\,f+d\,1{}\mathrm {i}\right )\,9{}\mathrm {i}}{128\,a^3\,f^2}\right )+{\mathrm {e}}^{-e\,6{}\mathrm {i}-f\,x\,6{}\mathrm {i}}\,\left (\frac {\left (36\,c^3\,f^3-c^2\,d\,f^2\,18{}\mathrm {i}-6\,c\,d^2\,f+d^3\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{1728\,a^3\,f^4}+\frac {d^3\,x^3\,1{}\mathrm {i}}{48\,a^3\,f}-\frac {d\,x\,\left (-18\,c^2\,f^2+c\,d\,f\,6{}\mathrm {i}+d^2\right )\,1{}\mathrm {i}}{288\,a^3\,f^3}-\frac {d^2\,x^2\,\left (-6\,c\,f+d\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{96\,a^3\,f^2}\right )+\frac {c^3\,x}{8\,a^3}+\frac {d^3\,x^4}{32\,a^3}+\frac {3\,c^2\,d\,x^2}{16\,a^3}+\frac {c\,d^2\,x^3}{8\,a^3} \] Input:

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

Output:

exp(- e*2i - f*x*2i)*(((d^3*9i + 12*c^3*f^3 - c^2*d*f^2*18i - 18*c*d^2*f)* 
1i)/(64*a^3*f^4) + (d^3*x^3*3i)/(16*a^3*f) - (d*x*(d^2 - 2*c^2*f^2 + c*d*f 
*2i)*9i)/(32*a^3*f^3) - (d^2*x^2*(d*1i - 2*c*f)*9i)/(32*a^3*f^2)) + exp(- 
e*4i - f*x*4i)*(((d^3*9i + 96*c^3*f^3 - c^2*d*f^2*72i - 36*c*d^2*f)*1i)/(1 
024*a^3*f^4) + (d^3*x^3*3i)/(32*a^3*f) - (d*x*(d^2 - 8*c^2*f^2 + c*d*f*4i) 
*9i)/(256*a^3*f^3) - (d^2*x^2*(d*1i - 4*c*f)*9i)/(128*a^3*f^2)) + exp(- e* 
6i - f*x*6i)*(((d^3*1i + 36*c^3*f^3 - c^2*d*f^2*18i - 6*c*d^2*f)*1i)/(1728 
*a^3*f^4) + (d^3*x^3*1i)/(48*a^3*f) - (d*x*(d^2 - 18*c^2*f^2 + c*d*f*6i)*1 
i)/(288*a^3*f^3) - (d^2*x^2*(d*1i - 6*c*f)*1i)/(96*a^3*f^2)) + (c^3*x)/(8* 
a^3) + (d^3*x^4)/(32*a^3) + (3*c^2*d*x^2)/(16*a^3) + (c*d^2*x^3)/(8*a^3)
 

Reduce [F]

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

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

Output:

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