\(\int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx\) [730]

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

Optimal result

Integrand size = 26, antiderivative size = 106 \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {8 \sqrt [4]{-1} a^3 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {8 a^3 \sqrt {\cot (c+d x)}}{d}-\frac {8 i a^3 \cot ^{\frac {3}{2}}(c+d x)}{5 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (i a^3+a^3 \cot (c+d x)\right )}{5 d} \] Output:

8*(-1)^(1/4)*a^3*arctanh((-1)^(3/4)*cot(d*x+c)^(1/2))/d+8*a^3*cot(d*x+c)^( 
1/2)/d-8/5*I*a^3*cot(d*x+c)^(3/2)/d-2/5*cot(d*x+c)^(3/2)*(I*a^3+a^3*cot(d* 
x+c))/d
 

Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.72 \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {2 a^3 \cot ^{\frac {5}{2}}(c+d x) \left (-1-5 i \tan (c+d x)+20 \tan ^2(c+d x)+20 (-1)^{3/4} \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right ) \tan ^{\frac {5}{2}}(c+d x)\right )}{5 d} \] Input:

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

Output:

(2*a^3*Cot[c + d*x]^(5/2)*(-1 - (5*I)*Tan[c + d*x] + 20*Tan[c + d*x]^2 + 2 
0*(-1)^(3/4)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]]*Tan[c + d*x]^(5/2)))/(5 
*d)
 

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.06, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3042, 4156, 3042, 4039, 27, 3042, 4075, 3042, 4011, 3042, 4016, 221}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \cot (c+d x)^{7/2} (a+i a \tan (c+d x))^3dx\)

\(\Big \downarrow \) 4156

\(\displaystyle \int \sqrt {\cot (c+d x)} (a \cot (c+d x)+i a)^3dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {-\tan \left (c+d x+\frac {\pi }{2}\right )} \left (-a \tan \left (c+d x+\frac {\pi }{2}\right )+i a\right )^3dx\)

\(\Big \downarrow \) 4039

\(\displaystyle -\frac {2}{5} i a \int -2 \sqrt {\cot (c+d x)} (\cot (c+d x) a+i a) (3 \cot (c+d x) a+2 i a)dx-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (a^3 \cot (c+d x)+i a^3\right )}{5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {4}{5} i a \int \sqrt {\cot (c+d x)} (\cot (c+d x) a+i a) (3 \cot (c+d x) a+2 i a)dx-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (a^3 \cot (c+d x)+i a^3\right )}{5 d}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4075

\(\displaystyle \frac {4}{5} i a \left (-\frac {2 a^2 \cot ^{\frac {3}{2}}(c+d x)}{d}+\int \sqrt {\cot (c+d x)} \left (5 i a^2 \cot (c+d x)-5 a^2\right )dx\right )-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (a^3 \cot (c+d x)+i a^3\right )}{5 d}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4011

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4016

\(\displaystyle \frac {4}{5} i a \left (-\frac {50 a^4 \int \frac {1}{5 i a^2-5 a^2 \cot (c+d x)}d\sqrt {\cot (c+d x)}}{d}-\frac {2 a^2 \cot ^{\frac {3}{2}}(c+d x)}{d}-\frac {10 i a^2 \sqrt {\cot (c+d x)}}{d}\right )-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (a^3 \cot (c+d x)+i a^3\right )}{5 d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {4}{5} i a \left (-\frac {10 (-1)^{3/4} a^2 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {2 a^2 \cot ^{\frac {3}{2}}(c+d x)}{d}-\frac {10 i a^2 \sqrt {\cot (c+d x)}}{d}\right )-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \left (a^3 \cot (c+d x)+i a^3\right )}{5 d}\)

Input:

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

Output:

(-2*Cot[c + d*x]^(3/2)*(I*a^3 + a^3*Cot[c + d*x]))/(5*d) + ((4*I)/5)*a*((- 
10*(-1)^(3/4)*a^2*ArcTanh[(-1)^(3/4)*Sqrt[Cot[c + d*x]]])/d - ((10*I)*a^2* 
Sqrt[Cot[c + d*x]])/d - (2*a^2*Cot[c + d*x]^(3/2))/d)
 

Defintions of rubi rules used

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 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

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

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 4016
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ 
)]], x_Symbol] :> Simp[2*(c^2/f)   Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b 
*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 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]
 

rule 4156
Int[(cot[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x 
_)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p)   Int[(d*Cot[e + f*x])^(m - n*p 
)*(b + a*Cot[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && 
  !IntegerQ[m] && IntegersQ[n, p]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 210 vs. \(2 (88 ) = 176\).

Time = 0.60 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.99

method result size
derivativedivides \(\frac {a^{3} \left (8 \sqrt {\cot \left (d x +c \right )}-\frac {2 \cot \left (d x +c \right )^{\frac {5}{2}}}{5}-2 i \cot \left (d x +c \right )^{\frac {3}{2}}-\sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )+i \sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )\right )}{d}\) \(211\)
default \(\frac {a^{3} \left (8 \sqrt {\cot \left (d x +c \right )}-\frac {2 \cot \left (d x +c \right )^{\frac {5}{2}}}{5}-2 i \cot \left (d x +c \right )^{\frac {3}{2}}-\sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )+i \sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )\right )}{d}\) \(211\)

Input:

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

Output:

1/d*a^3*(8*cot(d*x+c)^(1/2)-2/5*cot(d*x+c)^(5/2)-2*I*cot(d*x+c)^(3/2)-2^(1 
/2)*(ln((cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2)+1)/(cot(d*x+c)-2^(1/2)*cot(d* 
x+c)^(1/2)+1))+2*arctan(1+2^(1/2)*cot(d*x+c)^(1/2))+2*arctan(-1+2^(1/2)*co 
t(d*x+c)^(1/2)))+I*2^(1/2)*(ln((cot(d*x+c)-2^(1/2)*cot(d*x+c)^(1/2)+1)/(co 
t(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2)+1))+2*arctan(1+2^(1/2)*cot(d*x+c)^(1/2)) 
+2*arctan(-1+2^(1/2)*cot(d*x+c)^(1/2))))
 

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. 340 vs. \(2 (86) = 172\).

Time = 0.09 (sec) , antiderivative size = 340, normalized size of antiderivative = 3.21 \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {5 \, \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 5 \, \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (13 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 19 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 8 \, a^{3}\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{20 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:

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

Output:

-1/20*(5*sqrt(64*I*a^6/d^2)*(d*e^(4*I*d*x + 4*I*c) - 2*d*e^(2*I*d*x + 2*I* 
c) + d)*log(1/4*(8*I*a^3*e^(2*I*d*x + 2*I*c) + sqrt(64*I*a^6/d^2)*(d*e^(2* 
I*d*x + 2*I*c) - d)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) 
- 1)))*e^(-2*I*d*x - 2*I*c)/a^3) - 5*sqrt(64*I*a^6/d^2)*(d*e^(4*I*d*x + 4* 
I*c) - 2*d*e^(2*I*d*x + 2*I*c) + d)*log(1/4*(8*I*a^3*e^(2*I*d*x + 2*I*c) - 
 sqrt(64*I*a^6/d^2)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt((I*e^(2*I*d*x + 2*I*c 
) + I)/(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c)/a^3) - 16*(13*a^3* 
e^(4*I*d*x + 4*I*c) - 19*a^3*e^(2*I*d*x + 2*I*c) + 8*a^3)*sqrt((I*e^(2*I*d 
*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)))/(d*e^(4*I*d*x + 4*I*c) - 2*d* 
e^(2*I*d*x + 2*I*c) + d)
 

Sympy [F(-1)]

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

integrate(cot(d*x+c)**(7/2)*(a+I*a*tan(d*x+c))**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.49 \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {5 \, {\left (\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \left (i + 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \left (i + 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{3} + \frac {40 \, a^{3}}{\sqrt {\tan \left (d x + c\right )}} - \frac {10 i \, a^{3}}{\tan \left (d x + c\right )^{\frac {3}{2}}} - \frac {2 \, a^{3}}{\tan \left (d x + c\right )^{\frac {5}{2}}}}{5 \, d} \] Input:

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

Output:

1/5*(5*((2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2/sqrt(tan(d*x + c 
)))) + (2*I - 2)*sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2/sqrt(tan(d*x + c 
)))) - (I + 1)*sqrt(2)*log(sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1 
) + (I + 1)*sqrt(2)*log(-sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1)) 
*a^3 + 40*a^3/sqrt(tan(d*x + c)) - 10*I*a^3/tan(d*x + c)^(3/2) - 2*a^3/tan 
(d*x + c)^(5/2))/d
 

Giac [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.55 \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=-\frac {2 \, {\left (\left (10 i - 10\right ) \, \sqrt {2} \arctan \left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right ) - \frac {20 \, \tan \left (d x + c\right )^{2} - 5 i \, \tan \left (d x + c\right ) - 1}{\tan \left (d x + c\right )^{\frac {5}{2}}}\right )} a^{3}}{5 \, d} \] Input:

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

Output:

-2/5*((10*I - 10)*sqrt(2)*arctan(-(1/2*I - 1/2)*sqrt(2)*sqrt(tan(d*x + c)) 
) - (20*tan(d*x + c)^2 - 5*I*tan(d*x + c) - 1)/tan(d*x + c)^(5/2))*a^3/d
 

Mupad [F(-1)]

Timed out. \[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^{7/2}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3 \,d x \] Input:

int(cot(c + d*x)^(7/2)*(a + a*tan(c + d*x)*1i)^3,x)
 

Output:

int(cot(c + d*x)^(7/2)*(a + a*tan(c + d*x)*1i)^3, x)
 

Reduce [F]

\[ \int \cot ^{\frac {7}{2}}(c+d x) (a+i a \tan (c+d x))^3 \, dx=\frac {a^{3} \left (-2 \sqrt {\cot \left (d x +c \right )}\, \cot \left (d x +c \right )^{2}+10 \sqrt {\cot \left (d x +c \right )}+5 \left (\int \frac {\sqrt {\cot \left (d x +c \right )}}{\cot \left (d x +c \right )}d x \right ) d -5 \left (\int \sqrt {\cot \left (d x +c \right )}\, \cot \left (d x +c \right )^{3} \tan \left (d x +c \right )^{3}d x \right ) d i -15 \left (\int \sqrt {\cot \left (d x +c \right )}\, \cot \left (d x +c \right )^{3} \tan \left (d x +c \right )^{2}d x \right ) d +15 \left (\int \sqrt {\cot \left (d x +c \right )}\, \cot \left (d x +c \right )^{3} \tan \left (d x +c \right )d x \right ) d i \right )}{5 d} \] Input:

int(cot(d*x+c)^(7/2)*(a+I*a*tan(d*x+c))^3,x)
 

Output:

(a**3*( - 2*sqrt(cot(c + d*x))*cot(c + d*x)**2 + 10*sqrt(cot(c + d*x)) + 5 
*int(sqrt(cot(c + d*x))/cot(c + d*x),x)*d - 5*int(sqrt(cot(c + d*x))*cot(c 
 + d*x)**3*tan(c + d*x)**3,x)*d*i - 15*int(sqrt(cot(c + d*x))*cot(c + d*x) 
**3*tan(c + d*x)**2,x)*d + 15*int(sqrt(cot(c + d*x))*cot(c + d*x)**3*tan(c 
 + d*x),x)*d*i))/(5*d)