\(\int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx\) [105]

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

Optimal result

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

23/4*a^(5/2)*arctanh((a+I*a*tan(d*x+c))^(1/2)/a^(1/2))/d-4*2^(1/2)*a^(5/2) 
*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/d-9/4*I*a^2*cot(d*x 
+c)*(a+I*a*tan(d*x+c))^(1/2)/d-1/2*a^2*cot(d*x+c)^2*(a+I*a*tan(d*x+c))^(1/ 
2)/d
 

Mathematica [A] (verified)

Time = 0.67 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.79 \[ \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {-23 a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )+16 \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )+a^2 \cot (c+d x) (9 i+2 \cot (c+d x)) \sqrt {a+i a \tan (c+d x)}}{4 d} \] Input:

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

Output:

-1/4*(-23*a^(5/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[a]] + 16*Sqrt[2] 
*a^(5/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])] + a^2*Cot[c 
 + d*x]*(9*I + 2*Cot[c + d*x])*Sqrt[a + I*a*Tan[c + d*x]])/d
 

Rubi [A] (verified)

Time = 1.02 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.06, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3042, 4036, 27, 3042, 4081, 27, 3042, 4083, 3042, 3961, 219, 4082, 73, 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 ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4036

\(\displaystyle -\frac {1}{2} \int -\frac {1}{2} \cot ^2(c+d x) \sqrt {i \tan (c+d x) a+a} \left (9 i a^2-7 a^2 \tan (c+d x)\right )dx-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4081

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4083

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3961

\(\displaystyle \frac {1}{4} \left (-\frac {\frac {64 a^4 \int \frac {1}{a-i a \tan (c+d x)}d\sqrt {i \tan (c+d x) a+a}}{d}+23 a^2 \int \frac {(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}{\tan (c+d x)}dx}{2 a}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{4} \left (-\frac {23 a^2 \int \frac {(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}{\tan (c+d x)}dx+\frac {32 \sqrt {2} a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}}{2 a}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

\(\Big \downarrow \) 4082

\(\displaystyle \frac {1}{4} \left (-\frac {\frac {23 a^4 \int \frac {\cot (c+d x)}{\sqrt {i \tan (c+d x) a+a}}d\tan (c+d x)}{d}+\frac {32 \sqrt {2} a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}}{2 a}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {1}{4} \left (-\frac {\frac {32 \sqrt {2} a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {46 i a^3 \int \frac {1}{i-\frac {i (i \tan (c+d x) a+a)}{a}}d\sqrt {i \tan (c+d x) a+a}}{d}}{2 a}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {1}{4} \left (-\frac {\frac {32 \sqrt {2} a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {46 a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}}{2 a}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\)

Input:

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

Output:

-1/2*(a^2*Cot[c + d*x]^2*Sqrt[a + I*a*Tan[c + d*x]])/d + (-1/2*((-46*a^(7/ 
2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[a]])/d + (32*Sqrt[2]*a^(7/2)*Ar 
cTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d)/a - ((9*I)*a^2*Cot 
[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d)/4
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

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

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

rule 4081
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*d - B*c)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(f*(n + 
1)*(c^2 + d^2))), x] - Simp[1/(a*(n + 1)*(c^2 + d^2))   Int[(a + b*Tan[e + 
f*x])^m*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*(b*d*m - a*c*(n + 1)) - B*(b*c* 
m + a*d*(n + 1)) - a*(B*c - A*d)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Fr 
eeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 
0] && LtQ[n, -1]
 

rule 4082
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[b*(B/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], 
x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
 

rule 4083
Int[(((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)]))/((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[( 
A*b + a*B)/(b*c + a*d)   Int[(a + b*Tan[e + f*x])^m, x], x] - Simp[(B*c - A 
*d)/(b*c + a*d)   Int[(a + b*Tan[e + f*x])^m*((a - b*Tan[e + f*x])/(c + d*T 
an[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - 
 a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
 
Maple [A] (verified)

Time = 1.55 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.77

method result size
derivativedivides \(\frac {2 a^{4} \left (\frac {-\frac {\frac {9 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{8}-\frac {7 a \sqrt {a +i a \tan \left (d x +c \right )}}{8}}{a^{2} \tan \left (d x +c \right )^{2}}+\frac {23 \,\operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}}{\sqrt {a}}\right )}{8 \sqrt {a}}}{a}-\frac {2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )}{d}\) \(117\)
default \(\frac {2 a^{4} \left (\frac {-\frac {\frac {9 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{8}-\frac {7 a \sqrt {a +i a \tan \left (d x +c \right )}}{8}}{a^{2} \tan \left (d x +c \right )^{2}}+\frac {23 \,\operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}}{\sqrt {a}}\right )}{8 \sqrt {a}}}{a}-\frac {2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )}{d}\) \(117\)

Input:

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

Output:

2/d*a^4*(1/a*(-(9/8*(a+I*a*tan(d*x+c))^(3/2)-7/8*a*(a+I*a*tan(d*x+c))^(1/2 
))/a^2/tan(d*x+c)^2+23/8/a^(1/2)*arctanh((a+I*a*tan(d*x+c))^(1/2)/a^(1/2)) 
)-2/a^(3/2)*2^(1/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(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. 558 vs. \(2 (116) = 232\).

Time = 0.09 (sec) , antiderivative size = 558, normalized size of antiderivative = 3.70 \[ \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx =\text {Too large to display} \] Input:

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

Output:

-1/16*(32*sqrt(2)*sqrt(a^5/d^2)*(d*e^(4*I*d*x + 4*I*c) - 2*d*e^(2*I*d*x + 
2*I*c) + d)*log(4*(a^3*e^(I*d*x + I*c) + sqrt(a^5/d^2)*(d*e^(2*I*d*x + 2*I 
*c) + d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a^2) - 32*sqr 
t(2)*sqrt(a^5/d^2)*(d*e^(4*I*d*x + 4*I*c) - 2*d*e^(2*I*d*x + 2*I*c) + d)*l 
og(4*(a^3*e^(I*d*x + I*c) - sqrt(a^5/d^2)*(d*e^(2*I*d*x + 2*I*c) + d)*sqrt 
(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a^2) - 23*sqrt(a^5/d^2)*(d 
*e^(4*I*d*x + 4*I*c) - 2*d*e^(2*I*d*x + 2*I*c) + d)*log(16*(3*a^3*e^(2*I*d 
*x + 2*I*c) + a^3 + 2*sqrt(2)*sqrt(a^5/d^2)*(d*e^(3*I*d*x + 3*I*c) + d*e^( 
I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/a) + 
 23*sqrt(a^5/d^2)*(d*e^(4*I*d*x + 4*I*c) - 2*d*e^(2*I*d*x + 2*I*c) + d)*lo 
g(16*(3*a^3*e^(2*I*d*x + 2*I*c) + a^3 - 2*sqrt(2)*sqrt(a^5/d^2)*(d*e^(3*I* 
d*x + 3*I*c) + d*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2 
*I*d*x - 2*I*c)/a) - 4*sqrt(2)*(11*a^2*e^(5*I*d*x + 5*I*c) + 4*a^2*e^(3*I* 
d*x + 3*I*c) - 7*a^2*e^(I*d*x + I*c))*sqrt(a/(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 ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.20 \[ \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=\frac {{\left (16 \, \sqrt {2} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 23 \, \sqrt {a} \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right ) + \frac {2 \, {\left (9 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a - 7 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{2}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} - 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a + a^{2}}\right )} a^{2}}{8 \, d} \] Input:

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

Output:

1/8*(16*sqrt(2)*sqrt(a)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a) 
)/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(d*x + c) + a))) - 23*sqrt(a)*log((sqrt(I 
*a*tan(d*x + c) + a) - sqrt(a))/(sqrt(I*a*tan(d*x + c) + a) + sqrt(a))) + 
2*(9*(I*a*tan(d*x + c) + a)^(3/2)*a - 7*sqrt(I*a*tan(d*x + c) + a)*a^2)/(( 
I*a*tan(d*x + c) + a)^2 - 2*(I*a*tan(d*x + c) + a)*a + a^2))*a^2/d
 

Giac [F(-2)]

Exception generated. \[ \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument TypeError: Bad 
Argument TypeDone
 

Mupad [B] (verification not implemented)

Time = 1.03 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.92 \[ \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {\mathrm {atan}\left (\frac {\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{a^3}\right )\,\sqrt {a^5}\,23{}\mathrm {i}}{4\,d}+\frac {7\,a^2\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{4\,d\,{\mathrm {tan}\left (c+d\,x\right )}^2}-\frac {9\,a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{4\,d\,{\mathrm {tan}\left (c+d\,x\right )}^2}+\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2\,a^3}\right )\,\sqrt {a^5}\,4{}\mathrm {i}}{d} \] Input:

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

Output:

(7*a^2*(a + a*tan(c + d*x)*1i)^(1/2))/(4*d*tan(c + d*x)^2) - (atan(((a^5)^ 
(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)*1i)/a^3)*(a^5)^(1/2)*23i)/(4*d) - (9*a 
*(a + a*tan(c + d*x)*1i)^(3/2))/(4*d*tan(c + d*x)^2) + (2^(1/2)*atan((2^(1 
/2)*(a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)*1i)/(2*a^3))*(a^5)^(1/2)*4i) 
/d
 

Reduce [F]

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

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

Output:

sqrt(a)*a**2*( - int(sqrt(tan(c + d*x)*i + 1)*cot(c + d*x)**3*tan(c + d*x) 
**2,x) + 2*int(sqrt(tan(c + d*x)*i + 1)*cot(c + d*x)**3*tan(c + d*x),x)*i 
+ int(sqrt(tan(c + d*x)*i + 1)*cot(c + d*x)**3,x))