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

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 \cot (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 = 1.69 (sec) , antiderivative size = 664, normalized size of antiderivative = 1.68 \[ \int \frac {(c+d x)^3}{(a+i a \cot (e+f x))^3} \, dx=\frac {(\cos (3 (e+f x))+i \sin (3 (e+f x))) \left (81 i \left (32 c^3 f^3+24 c^2 d f^2 (3 i+4 f x)+12 c d^2 f \left (-7+12 i f x+8 f^2 x^2\right )+d^3 \left (-45 i-84 f x+72 i f^2 x^2+32 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))-4131 i d^3 \sin (e+f x)-8748 c d^2 f \sin (e+f x)+9720 i c^2 d f^2 \sin (e+f x)+7776 c^3 f^3 \sin (e+f x)-8748 d^3 f x \sin (e+f x)+19440 i c d^2 f^2 x \sin (e+f x)+23328 c^2 d f^3 x \sin (e+f x)+9720 i d^3 f^2 x^2 \sin (e+f x)+23328 c d^2 f^3 x^2 \sin (e+f x)+7776 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} \] Input:

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

Output:

((Cos[3*(e + f*x)] + I*Sin[3*(e + f*x)])*((81*I)*(32*c^3*f^3 + 24*c^2*d*f^ 
2*(3*I + 4*f*x) + 12*c*d^2*f*(-7 + (12*I)*f*x + 8*f^2*x^2) + d^3*(-45*I - 
84*f*x + (72*I)*f^2*x^2 + 32*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)] - (4131*I)*d^3*Sin[e + f*x] - 87 
48*c*d^2*f*Sin[e + f*x] + (9720*I)*c^2*d*f^2*Sin[e + f*x] + 7776*c^3*f^3*S 
in[e + f*x] - 8748*d^3*f*x*Sin[e + f*x] + (19440*I)*c*d^2*f^2*x*Sin[e + f* 
x] + 23328*c^2*d*f^3*x*Sin[e + f*x] + (9720*I)*d^3*f^2*x^2*Sin[e + f*x] + 
23328*c*d^2*f^3*x^2*Sin[e + f*x] + 7776*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)]))/(27648*a^3*f^4)
 

Rubi [A] (verified)

Time = 0.68 (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 \cot (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d x)^3}{\left (a-i a \tan \left (e+f x+\frac {\pi }{2}\right )\right )^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*Cot[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.70 (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 {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}}-\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 {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}}\) \(396\)
parallelrisch \(\frac {-6264 \left (-\frac {4 \left (\frac {d x}{2}+c \right ) \left (\frac {1}{2} d^{2} x^{2}+c d x +c^{2}\right ) f^{3}}{29}+i d \left (\frac {1}{3} d^{2} x^{2}+c d x +c^{2}\right ) f^{2}-\frac {139 \left (\frac {d x}{2}+c \right ) d^{2} f}{174}-\frac {737 i d^{3}}{2088}\right ) f x \tan \left (f x +e \right )^{3}+\left (2592 i \left (\frac {d x}{2}+c \right ) \left (\frac {1}{2} d^{2} x^{2}+c d x +c^{2}\right ) x \,f^{4}+\left (216 d^{3} x^{3}+648 c \,d^{2} x^{2}+648 c^{2} d x -6048 c^{3}\right ) f^{3}-6264 i d \left (-\frac {23}{116} d^{2} x^{2}-\frac {23}{58} c d x +c^{2}\right ) f^{2}+\left (-1629 d^{3} x +5004 c \,d^{2}\right ) f +2211 i d^{3}\right ) \tan \left (f x +e \right )^{2}+\left (\left (-648 d^{3} x^{4}-2592 x^{3} c \,d^{2}-3888 x^{2} c^{2} d -2592 x \,c^{3}\right ) f^{4}+\left (-1512 i d^{3} x^{3}-4536 i c \,d^{2} x^{2}-4536 i c^{2} d x -7776 i c^{3}\right ) f^{3}+\left (2214 d^{3} x^{2}+4428 c \,d^{2} x +9720 c^{2} d \right ) f^{2}+8748 i d^{2} \left (\frac {235 d x}{972}+c \right ) f -4131 d^{3}\right ) \tan \left (f x +e \right )-864 i \left (\frac {d x}{2}+c \right ) \left (\frac {1}{2} d^{2} x^{2}+c d x +c^{2}\right ) x \,f^{4}+\left (792 d^{3} x^{3}+2376 c \,d^{2} x^{2}+2376 c^{2} d x +2880 c^{3}\right ) f^{3}+4032 i d \left (\frac {85}{224} d^{2} x^{2}+\frac {85}{112} c d x +c^{2}\right ) f^{2}+\left (-1725 d^{3} x -3936 c \,d^{2}\right ) f -1952 i d^{3}}{6912 f^{4} a^{3} \left (-i-3 \tan \left (f x +e \right )+3 i \tan \left (f x +e \right )^{2}+\tan \left (f x +e \right )^{3}\right )}\) \(476\)
derivativedivides \(\text {Expression too large to display}\) \(4089\)
default \(\text {Expression too large to display}\) \(4089\)

Input:

int((d*x+c)^3/(a+I*a*cot(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+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))-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))+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))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 360, normalized size of antiderivative = 0.91 \[ \int \frac {(c+d x)^3}{(a+i a \cot (e+f x))^3} \, dx=\frac {864 \, d^{3} f^{4} x^{4} + 3456 \, c d^{2} f^{4} x^{3} + 5184 \, c^{2} d f^{4} x^{2} + 3456 \, c^{3} f^{4} x - 16 \, {\left (-36 i \, d^{3} f^{3} x^{3} - 36 i \, c^{3} f^{3} + 18 \, c^{2} d f^{2} + 6 i \, c d^{2} f - d^{3} + 18 \, {\left (-6 i \, c d^{2} f^{3} + d^{3} f^{2}\right )} x^{2} + 6 \, {\left (-18 i \, c^{2} d f^{3} + 6 \, c d^{2} f^{2} + i \, d^{3} f\right )} x\right )} e^{\left (6 i \, f x + 6 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 (4 i \, f x + 4 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 (2 i \, f x + 2 i \, e\right )}}{27648 \, a^{3} f^{4}} \] Input:

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

Output:

1/27648*(864*d^3*f^4*x^4 + 3456*c*d^2*f^4*x^3 + 5184*c^2*d*f^4*x^2 + 3456* 
c^3*f^4*x - 16*(-36*I*d^3*f^3*x^3 - 36*I*c^3*f^3 + 18*c^2*d*f^2 + 6*I*c*d^ 
2*f - d^3 + 18*(-6*I*c*d^2*f^3 + d^3*f^2)*x^2 + 6*(-18*I*c^2*d*f^3 + 6*c*d 
^2*f^2 + I*d^3*f)*x)*e^(6*I*f*x + 6*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^(4*I*f*x + 4*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^(2*I*f*x + 2*I*e))/(a^3*f^4)
 

Sympy [A] (verification not implemented)

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

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

Output:

Piecewise((((21233664*I*a**6*c**3*f**11*exp(2*I*e) + 63700992*I*a**6*c**2* 
d*f**11*x*exp(2*I*e) - 31850496*a**6*c**2*d*f**10*exp(2*I*e) + 63700992*I* 
a**6*c*d**2*f**11*x**2*exp(2*I*e) - 63700992*a**6*c*d**2*f**10*x*exp(2*I*e 
) - 31850496*I*a**6*c*d**2*f**9*exp(2*I*e) + 21233664*I*a**6*d**3*f**11*x* 
*3*exp(2*I*e) - 31850496*a**6*d**3*f**10*x**2*exp(2*I*e) - 31850496*I*a**6 
*d**3*f**9*x*exp(2*I*e) + 15925248*a**6*d**3*f**8*exp(2*I*e))*exp(2*I*f*x) 
 + (-10616832*I*a**6*c**3*f**11*exp(4*I*e) - 31850496*I*a**6*c**2*d*f**11* 
x*exp(4*I*e) + 7962624*a**6*c**2*d*f**10*exp(4*I*e) - 31850496*I*a**6*c*d* 
*2*f**11*x**2*exp(4*I*e) + 15925248*a**6*c*d**2*f**10*x*exp(4*I*e) + 39813 
12*I*a**6*c*d**2*f**9*exp(4*I*e) - 10616832*I*a**6*d**3*f**11*x**3*exp(4*I 
*e) + 7962624*a**6*d**3*f**10*x**2*exp(4*I*e) + 3981312*I*a**6*d**3*f**9*x 
*exp(4*I*e) - 995328*a**6*d**3*f**8*exp(4*I*e))*exp(4*I*f*x) + (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) - 11 
79648*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) - 393216*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))/(113246208*a**9*f**12), Ne(a**9*f** 
12, 0)), (x**4*(-d**3*exp(6*I*e) + 3*d**3*exp(4*I*e) - 3*d**3*exp(2*I*e))/ 
(32*a**3) + x**3*(-c*d**2*exp(6*I*e) + 3*c*d**2*exp(4*I*e) - 3*c*d**2*e...
 

Maxima [F(-2)]

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

integrate((d*x+c)^3/(a+I*a*cot(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.19 (sec) , antiderivative size = 593, normalized size of antiderivative = 1.50 \[ \int \frac {(c+d x)^3}{(a+i a \cot (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 11.16 (sec) , antiderivative size = 418, normalized size of antiderivative = 1.06 \[ \int \frac {(c+d x)^3}{(a+i a \cot (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*cot(e + f*x)*1i)^3,x)
 

Output:

exp(e*2i + f*x*2i)*((d^3*x^3*3i)/(16*a^3*f) - ((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*x*(2*c^2*f^2 - d^2 + c*d*f*2 
i)*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*x^3*3i)/(32*a^3*f) - ((d^3*9i - 96*c^3*f^3 - c^2*d*f^2*72 
i + 36*c*d^2*f)*1i)/(1024*a^3*f^4) + (d*x*(8*c^2*f^2 - d^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*x^3*1i)/(48*a^3*f) - ((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*x*(18*c^2*f^2 - d^2 + c*d*f*6i)*1i)/(28 
8*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 \cot (e+f x))^3} \, dx=\frac {3 \left (\int \frac {\sin \left (f x +e \right )^{3}}{4 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} i -\cos \left (f x +e \right ) i +4 \sin \left (f x +e \right )^{3}-3 \sin \left (f x +e \right )}d x \right ) c^{3} f -3 \left (\int \frac {x^{3}}{\cot \left (f x +e \right )^{3} i +3 \cot \left (f x +e \right )^{2}-3 \cot \left (f x +e \right ) i -1}d x \right ) d^{3} f -9 \left (\int \frac {x^{2}}{\cot \left (f x +e \right )^{3} i +3 \cot \left (f x +e \right )^{2}-3 \cot \left (f x +e \right ) i -1}d x \right ) c \,d^{2} f -9 \left (\int \frac {x}{\cot \left (f x +e \right )^{3} i +3 \cot \left (f x +e \right )^{2}-3 \cot \left (f x +e \right ) i -1}d x \right ) c^{2} d f +3 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) c^{3} i -\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6} i -6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-15 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} i +20 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+15 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} i -6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-i \right ) c^{3} i +3 c^{3} f x}{3 a^{3} f} \] Input:

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

Output:

(3*int(sin(e + f*x)**3/(4*cos(e + f*x)*sin(e + f*x)**2*i - cos(e + f*x)*i 
+ 4*sin(e + f*x)**3 - 3*sin(e + f*x)),x)*c**3*f - 3*int(x**3/(cot(e + f*x) 
**3*i + 3*cot(e + f*x)**2 - 3*cot(e + f*x)*i - 1),x)*d**3*f - 9*int(x**2/( 
cot(e + f*x)**3*i + 3*cot(e + f*x)**2 - 3*cot(e + f*x)*i - 1),x)*c*d**2*f 
- 9*int(x/(cot(e + f*x)**3*i + 3*cot(e + f*x)**2 - 3*cot(e + f*x)*i - 1),x 
)*c**2*d*f + 3*log(tan((e + f*x)/2)**2 + 1)*c**3*i - log(tan((e + f*x)/2)* 
*6*i - 6*tan((e + f*x)/2)**5 - 15*tan((e + f*x)/2)**4*i + 20*tan((e + f*x) 
/2)**3 + 15*tan((e + f*x)/2)**2*i - 6*tan((e + f*x)/2) - i)*c**3*i + 3*c** 
3*f*x)/(3*a**3*f)