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

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

Optimal result

Integrand size = 26, antiderivative size = 106 \[ \int \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, 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}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.06, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4156, 3042, 4036, 27, 3042, 4074, 27, 3042, 4012, 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 \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4156

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4036

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4074

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4012

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4016

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

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 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 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 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 4074
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b 
*c - a*d)*(A*b - a*B)*((a + b*Tan[e + f*x])^(m + 1)/(b*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*A*c 
+ b*B*c + A*b*d - a*B*d - (A*b*c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], 
 x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && LtQ[m 
, -1] && NeQ[a^2 + b^2, 0]
 

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. 211 vs. \(2 (88 ) = 176\).

Time = 0.24 (sec) , antiderivative size = 212, normalized size of antiderivative = 2.00

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {2 i}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}+\frac {8 i}{\sqrt {\cot \left (d x +c \right )}}-\frac {2}{\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}\) \(212\)
default \(\frac {a^{3} \left (-\frac {2 i}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}+\frac {8 i}{\sqrt {\cot \left (d x +c \right )}}-\frac {2}{\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}\) \(212\)

Input:

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

Output:

1/d*a^3*(-2/5*I/cot(d*x+c)^(5/2)+8*I/cot(d*x+c)^(1/2)-2/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) 
*cot(d*x+c)^(1/2)))+I*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)*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. 390 vs. \(2 (86) = 172\).

Time = 0.08 (sec) , antiderivative size = 390, normalized size of antiderivative = 3.68 \[ \int \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=-\frac {5 \, \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, 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 (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, 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 (6 i \, d x + 6 i \, c\right )} + 6 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 11 \, 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 (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:

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

Output:

-1/20*(5*sqrt(64*I*a^6/d^2)*(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I* 
c) + 3*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) + s 
qrt(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^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*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^(6*I*d*x + 6*I*c) + 
6*a^3*e^(4*I*d*x + 4*I*c) - 11*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^(6*I*d*x + 6*I*c) 
+ 3*d*e^(4*I*d*x + 4*I*c) + 3*d*e^(2*I*d*x + 2*I*c) + d)
 

Sympy [F]

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

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

Output:

-I*a**3*(Integral(I/sqrt(cot(c + d*x)), x) + Integral(-3*tan(c + d*x)/sqrt 
(cot(c + d*x)), x) + Integral(tan(c + d*x)**3/sqrt(cot(c + d*x)), x) + Int 
egral(-3*I*tan(c + d*x)**2/sqrt(cot(c + d*x)), x))
 

Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.52 \[ \int \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, 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} - 2 \, {\left (i \, a^{3} + \frac {5 \, a^{3}}{\tan \left (d x + c\right )} - \frac {20 i \, a^{3}}{\tan \left (d x + c\right )^{2}}\right )} \tan \left (d x + c\right )^{\frac {5}{2}}}{5 \, d} \] Input:

integrate((a+I*a*tan(d*x+c))^3/cot(d*x+c)^(1/2),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 - 2*(I*a^3 + 5*a^3/tan(d*x + c) - 20*I*a^3/tan(d*x + c)^2)*tan(d*x + 
c)^(5/2))/d
 

Giac [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.55 \[ \int \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=-\frac {2 \, {\left (i \, \tan \left (d x + c\right )^{\frac {5}{2}} + \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 ) + 5 \, \tan \left (d x + c\right )^{\frac {3}{2}} - 20 i \, \sqrt {\tan \left (d x + c\right )}\right )} a^{3}}{5 \, d} \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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