\(\int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx\) [1135]

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

Optimal result

Integrand size = 30, antiderivative size = 351 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx=-\frac {i \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{4 a^2 (c-i d)^{5/2} f}+\frac {\left (2 i c^2-14 c d-47 i d^2\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{8 a^2 (c+i d)^{9/2} f}+\frac {d \left (6 c^2+27 i c d+49 d^2\right )}{24 a^2 (c-i d) (c+i d)^3 f (c+d \tan (e+f x))^{3/2}}+\frac {2 i c-9 d}{8 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}+\frac {d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{8 a^2 (c-i d)^2 (c+i d)^4 f \sqrt {c+d \tan (e+f x)}} \] Output:

-1/4*I*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/a^2/(c-I*d)^(5/2)/f+1 
/8*(2*I*c^2-14*c*d-47*I*d^2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2)) 
/a^2/(c+I*d)^(9/2)/f+1/24*d*(6*c^2+27*I*c*d+49*d^2)/a^2/(c-I*d)/(c+I*d)^3/ 
f/(c+d*tan(f*x+e))^(3/2)+1/8*(2*I*c-9*d)/a^2/(c+I*d)^2/f/(1+I*tan(f*x+e))/ 
(c+d*tan(f*x+e))^(3/2)-1/4/(I*c-d)/f/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e)) 
^(3/2)+1/8*d*(2*c^3+9*I*c^2*d+88*c*d^2-45*I*d^3)/a^2/(c-I*d)^2/(c+I*d)^4/f 
/(c+d*tan(f*x+e))^(1/2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.90 (sec) , antiderivative size = 188, normalized size of antiderivative = 0.54 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx=-\frac {-\frac {2 i (c+i d)^2 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {c+d \tan (e+f x)}{c-i d}\right )}{c-i d}+\frac {i \left (2 c^2+14 i c d-47 d^2\right ) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {c+d \tan (e+f x)}{c+i d}\right )}{c+i d}+\frac {6 i (c+i d)}{(-i+\tan (e+f x))^2}-\frac {3 (2 c+9 i d)}{-i+\tan (e+f x)}}{24 a^2 (c+i d)^2 f (c+d \tan (e+f x))^{3/2}} \] Input:

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

Output:

-1/24*(((-2*I)*(c + I*d)^2*Hypergeometric2F1[-3/2, 1, -1/2, (c + d*Tan[e + 
 f*x])/(c - I*d)])/(c - I*d) + (I*(2*c^2 + (14*I)*c*d - 47*d^2)*Hypergeome 
tric2F1[-3/2, 1, -1/2, (c + d*Tan[e + f*x])/(c + I*d)])/(c + I*d) + ((6*I) 
*(c + I*d))/(-I + Tan[e + f*x])^2 - (3*(2*c + (9*I)*d))/(-I + Tan[e + f*x] 
))/(a^2*(c + I*d)^2*f*(c + d*Tan[e + f*x])^(3/2))
 

Rubi [A] (warning: unable to verify)

Time = 1.90 (sec) , antiderivative size = 380, normalized size of antiderivative = 1.08, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.533, Rules used = {3042, 4042, 27, 3042, 4079, 3042, 4012, 3042, 4012, 3042, 4022, 3042, 4020, 25, 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 \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4042

\(\displaystyle -\frac {\int -\frac {a (4 i c-11 d)+7 i a d \tan (e+f x)}{2 (i \tan (e+f x) a+a) (c+d \tan (e+f x))^{5/2}}dx}{4 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {a (4 i c-11 d)+7 i a d \tan (e+f x)}{(i \tan (e+f x) a+a) (c+d \tan (e+f x))^{5/2}}dx}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {a (4 i c-11 d)+7 i a d \tan (e+f x)}{(i \tan (e+f x) a+a) (c+d \tan (e+f x))^{5/2}}dx}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 4079

\(\displaystyle \frac {-\frac {\int \frac {\left (4 c^2+18 i d c-49 d^2\right ) a^2+5 (2 c+9 i d) d \tan (e+f x) a^2}{(c+d \tan (e+f x))^{5/2}}dx}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\int \frac {\left (4 c^2+18 i d c-49 d^2\right ) a^2+5 (2 c+9 i d) d \tan (e+f x) a^2}{(c+d \tan (e+f x))^{5/2}}dx}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 4012

\(\displaystyle \frac {-\frac {\frac {\int \frac {\left (4 c^3+18 i d c^2-39 d^2 c+45 i d^3\right ) a^2+d \left (6 c^2+27 i d c+49 d^2\right ) \tan (e+f x) a^2}{(c+d \tan (e+f x))^{3/2}}dx}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {\int \frac {\left (4 c^3+18 i d c^2-39 d^2 c+45 i d^3\right ) a^2+d \left (6 c^2+27 i d c+49 d^2\right ) \tan (e+f x) a^2}{(c+d \tan (e+f x))^{3/2}}dx}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 4012

\(\displaystyle \frac {-\frac {\frac {\frac {\int \frac {\left (4 c^4+18 i d c^3-33 d^2 c^2+72 i d^3 c+49 d^4\right ) a^2+d \left (2 c^3+9 i d c^2+88 d^2 c-45 i d^3\right ) \tan (e+f x) a^2}{\sqrt {c+d \tan (e+f x)}}dx}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {\frac {\int \frac {\left (4 c^4+18 i d c^3-33 d^2 c^2+72 i d^3 c+49 d^4\right ) a^2+d \left (2 c^3+9 i d c^2+88 d^2 c-45 i d^3\right ) \tan (e+f x) a^2}{\sqrt {c+d \tan (e+f x)}}dx}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 4022

\(\displaystyle \frac {-\frac {\frac {\frac {a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+2 a^2 (c+i d)^4 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {\frac {a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+2 a^2 (c+i d)^4 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 4020

\(\displaystyle \frac {-\frac {\frac {\frac {\frac {2 i a^2 (c+i d)^4 \int -\frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}-\frac {i a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \int -\frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {-\frac {\frac {\frac {\frac {i a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \int \frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}-\frac {2 i a^2 (c+i d)^4 \int \frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {-\frac {\frac {\frac {\frac {2 a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \int \frac {1}{-\frac {i \tan ^2(e+f x)}{d}-\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}+\frac {4 a^2 (c+i d)^4 \int \frac {1}{\frac {i \tan ^2(e+f x)}{d}+\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {-\frac {\frac {\frac {\frac {2 a^2 (c-i d)^2 \left (2 c^2+14 i c d-47 d^2\right ) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f \sqrt {c+i d}}+\frac {4 a^2 (c+i d)^4 \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f \sqrt {c-i d}}}{c^2+d^2}+\frac {2 a^2 d \left (2 c^3+9 i c^2 d+88 c d^2-45 i d^3\right )}{f \left (c^2+d^2\right ) \sqrt {c+d \tan (e+f x)}}}{c^2+d^2}+\frac {2 a^2 d \left (6 c^2+27 i c d+49 d^2\right )}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}}{2 a^2 (-d+i c)}-\frac {2 c+9 i d}{f (c+i d) (1+i \tan (e+f x)) (c+d \tan (e+f x))^{3/2}}}{8 a^2 (-d+i c)}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{3/2}}\)

Input:

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

Output:

-1/4*1/((I*c - d)*f*(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^(3/2)) + 
 (-((2*c + (9*I)*d)/((c + I*d)*f*(1 + I*Tan[e + f*x])*(c + d*Tan[e + f*x]) 
^(3/2))) - ((2*a^2*d*(6*c^2 + (27*I)*c*d + 49*d^2))/(3*(c^2 + d^2)*f*(c + 
d*Tan[e + f*x])^(3/2)) + (((4*a^2*(c + I*d)^4*ArcTan[Tan[e + f*x]/Sqrt[c - 
 I*d]])/(Sqrt[c - I*d]*f) + (2*a^2*(c - I*d)^2*(2*c^2 + (14*I)*c*d - 47*d^ 
2)*ArcTan[Tan[e + f*x]/Sqrt[c + I*d]])/(Sqrt[c + I*d]*f))/(c^2 + d^2) + (2 
*a^2*d*(2*c^3 + (9*I)*c^2*d + 88*c*d^2 - (45*I)*d^3))/((c^2 + d^2)*f*Sqrt[ 
c + d*Tan[e + f*x]]))/(c^2 + d^2))/(2*a^2*(I*c - d)))/(8*a^2*(I*c - d))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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

rule 4022
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2   Int[(a + b*Tan[e + f*x])^m*( 
1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2   Int[(a + b*Tan[e + f*x])^m 
*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c 
 - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]
 

rule 4042
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e 
 + f*x])^(n + 1)/(2*f*m*(b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d))   In 
t[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m 
 + n + 1) + b*d*(m + n + 1)*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] 
 && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])
 

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

Time = 0.39 (sec) , antiderivative size = 518, normalized size of antiderivative = 1.48

method result size
derivativedivides \(\frac {2 d^{3} \left (-\frac {-2 i c d -4 c^{2}-2 d^{2}}{\left (i d -c \right )^{2} \left (i d +c \right )^{5} \sqrt {c +d \tan \left (f x +e \right )}}-\frac {-c^{2}-d^{2}}{3 \left (i d +c \right )^{4} \left (i d -c \right )^{2} \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {i \left (5 i c^{4} d -10 i c^{2} d^{3}+i d^{5}+c^{5}-10 c^{3} d^{2}+5 c \,d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 \left (i d -c \right )^{\frac {5}{2}} \left (i d +c \right )^{5} d^{3}}+\frac {i \left (\frac {-\frac {d \left (2 i c^{6}-9 i c^{4} d^{2}-24 i c^{2} d^{4}-13 i d^{6}-15 c^{5} d -30 c^{3} d^{3}-15 c \,d^{5}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{7}-28 i c^{5} d^{2}-62 i c^{3} d^{4}-32 i c \,d^{6}-19 c^{6} d -23 c^{4} d^{3}+11 c^{2} d^{5}+15 d^{7}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (16 i c^{6} d -15 i c^{4} d^{3}-78 i c^{2} d^{5}-47 i d^{7}+2 c^{7}-57 c^{5} d^{2}-120 c^{3} d^{4}-61 c \,d^{6}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 \left (i d -c \right )^{2} \left (i d +c \right )^{5} d^{3}}\right )}{f \,a^{2}}\) \(518\)
default \(\frac {2 d^{3} \left (-\frac {-2 i c d -4 c^{2}-2 d^{2}}{\left (i d -c \right )^{2} \left (i d +c \right )^{5} \sqrt {c +d \tan \left (f x +e \right )}}-\frac {-c^{2}-d^{2}}{3 \left (i d +c \right )^{4} \left (i d -c \right )^{2} \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {i \left (5 i c^{4} d -10 i c^{2} d^{3}+i d^{5}+c^{5}-10 c^{3} d^{2}+5 c \,d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 \left (i d -c \right )^{\frac {5}{2}} \left (i d +c \right )^{5} d^{3}}+\frac {i \left (\frac {-\frac {d \left (2 i c^{6}-9 i c^{4} d^{2}-24 i c^{2} d^{4}-13 i d^{6}-15 c^{5} d -30 c^{3} d^{3}-15 c \,d^{5}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{7}-28 i c^{5} d^{2}-62 i c^{3} d^{4}-32 i c \,d^{6}-19 c^{6} d -23 c^{4} d^{3}+11 c^{2} d^{5}+15 d^{7}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (16 i c^{6} d -15 i c^{4} d^{3}-78 i c^{2} d^{5}-47 i d^{7}+2 c^{7}-57 c^{5} d^{2}-120 c^{3} d^{4}-61 c \,d^{6}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 \left (i d -c \right )^{2} \left (i d +c \right )^{5} d^{3}}\right )}{f \,a^{2}}\) \(518\)

Input:

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

Output:

2/f/a^2*d^3*(-1/(I*d-c)^2/(c+I*d)^5*(-2*I*c*d-4*c^2-2*d^2)/(c+d*tan(f*x+e) 
)^(1/2)-1/3*(-c^2-d^2)/(c+I*d)^4/(I*d-c)^2/(c+d*tan(f*x+e))^(3/2)+1/8*I/(I 
*d-c)^(5/2)/(c+I*d)^5*(5*c*d^4-10*I*c^2*d^3+I*d^5-10*c^3*d^2+5*I*c^4*d+c^5 
)/d^3*arctan((c+d*tan(f*x+e))^(1/2)/(I*d-c)^(1/2))+1/8*I/(I*d-c)^2/(c+I*d) 
^5/d^3*((-1/2*d*(2*I*c^6-9*I*c^4*d^2-24*I*c^2*d^4-13*I*d^6-15*c^5*d-30*c^3 
*d^3-15*c*d^5)/(2*I*c*d+c^2-d^2)*(c+d*tan(f*x+e))^(3/2)+1/2*d*(2*I*c^7-28* 
I*c^5*d^2-62*I*c^3*d^4-32*I*c*d^6-19*c^6*d-23*c^4*d^3+11*c^2*d^5+15*d^7)/( 
2*I*c*d+c^2-d^2)*(c+d*tan(f*x+e))^(1/2))/(-d*tan(f*x+e)+I*d)^2-1/2*(-57*c^ 
5*d^2-120*c^3*d^4-61*c*d^6+16*I*c^6*d-15*I*c^4*d^3-78*I*c^2*d^5-47*I*d^7+2 
*c^7)/(2*I*c*d+c^2-d^2)/(-c-I*d)^(1/2)*arctan((c+d*tan(f*x+e))^(1/2)/(-c-I 
*d)^(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. 3246 vs. \(2 (281) = 562\).

Time = 5.37 (sec) , antiderivative size = 3246, normalized size of antiderivative = 9.25 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx=\text {Too large to display} \] Input:

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(5/2),x, algorithm="fric 
as")
 

Output:

Too large to include
 

Sympy [F]

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

integrate(1/(a+I*a*tan(f*x+e))**2/(c+d*tan(f*x+e))**(5/2),x)
 

Output:

-Integral(1/(c**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**2 - 2*I*c**2*sqrt 
(c + d*tan(e + f*x))*tan(e + f*x) - c**2*sqrt(c + d*tan(e + f*x)) + 2*c*d* 
sqrt(c + d*tan(e + f*x))*tan(e + f*x)**3 - 4*I*c*d*sqrt(c + d*tan(e + f*x) 
)*tan(e + f*x)**2 - 2*c*d*sqrt(c + d*tan(e + f*x))*tan(e + f*x) + d**2*sqr 
t(c + d*tan(e + f*x))*tan(e + f*x)**4 - 2*I*d**2*sqrt(c + d*tan(e + f*x))* 
tan(e + f*x)**3 - d**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**2), x)/a**2
 

Maxima [F(-2)]

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

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(5/2),x, algorithm="maxi 
ma")
 

Output:

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 623 vs. \(2 (281) = 562\).

Time = 0.67 (sec) , antiderivative size = 623, normalized size of antiderivative = 1.77 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx=-\frac {\frac {24 \, \sqrt {2} {\left (2 \, c^{2} + 14 i \, c d - 47 \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{\sqrt {2} c \sqrt {-c + \sqrt {c^{2} + d^{2}}} + i \, \sqrt {2} \sqrt {-c + \sqrt {c^{2} + d^{2}}} d - \sqrt {2} \sqrt {c^{2} + d^{2}} \sqrt {-c + \sqrt {c^{2} + d^{2}}}}\right )}{-8 \, {\left (i \, c^{4} - 4 \, c^{3} d - 6 i \, c^{2} d^{2} + 4 \, c d^{3} + i \, d^{4}\right )} \sqrt {-c + \sqrt {c^{2} + d^{2}}} {\left (\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} + \frac {24 \, \sqrt {2} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{\sqrt {2} c \sqrt {-c + \sqrt {c^{2} + d^{2}}} - i \, \sqrt {2} \sqrt {-c + \sqrt {c^{2} + d^{2}}} d - \sqrt {2} \sqrt {c^{2} + d^{2}} \sqrt {-c + \sqrt {c^{2} + d^{2}}}}\right )}{-4 \, {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} \sqrt {-c + \sqrt {c^{2} + d^{2}}} {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} - \frac {16 \, {\left (12 \, {\left (d \tan \left (f x + e\right ) + c\right )} c d^{3} + c^{2} d^{3} - 6 \, {\left (i \, d \tan \left (f x + e\right ) + i \, c\right )} d^{4} + d^{5}\right )}}{{\left (c^{6} + 2 i \, c^{5} d + c^{4} d^{2} + 4 i \, c^{3} d^{3} - c^{2} d^{4} + 2 i \, c d^{5} - d^{6}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}}} - \frac {3 \, {\left (2 \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} c d - 2 \, \sqrt {d \tan \left (f x + e\right ) + c} c^{2} d + 13 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} d^{2} - 17 i \, \sqrt {d \tan \left (f x + e\right ) + c} c d^{2} + 15 \, \sqrt {d \tan \left (f x + e\right ) + c} d^{3}\right )}}{{\left (c^{4} + 4 i \, c^{3} d - 6 \, c^{2} d^{2} - 4 i \, c d^{3} + d^{4}\right )} {\left (d \tan \left (f x + e\right ) - i \, d\right )}^{2}}}{24 \, a^{2} f} \] Input:

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

Output:

-1/24*(24*sqrt(2)*(2*c^2 + 14*I*c*d - 47*d^2)*arctan(2*(sqrt(d*tan(f*x + e 
) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(sqrt(2)*c*sqrt(-c + 
sqrt(c^2 + d^2)) + I*sqrt(2)*sqrt(-c + sqrt(c^2 + d^2))*d - sqrt(2)*sqrt(c 
^2 + d^2)*sqrt(-c + sqrt(c^2 + d^2))))/((-8*I*c^4 + 32*c^3*d + 48*I*c^2*d^ 
2 - 32*c*d^3 - 8*I*d^4)*sqrt(-c + sqrt(c^2 + d^2))*(I*d/(c - sqrt(c^2 + d^ 
2)) + 1)) + 24*sqrt(2)*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d 
^2)*sqrt(d*tan(f*x + e) + c))/(sqrt(2)*c*sqrt(-c + sqrt(c^2 + d^2)) - I*sq 
rt(2)*sqrt(-c + sqrt(c^2 + d^2))*d - sqrt(2)*sqrt(c^2 + d^2)*sqrt(-c + sqr 
t(c^2 + d^2))))/((4*I*c^2 + 8*c*d - 4*I*d^2)*sqrt(-c + sqrt(c^2 + d^2))*(- 
I*d/(c - sqrt(c^2 + d^2)) + 1)) - 16*(12*(d*tan(f*x + e) + c)*c*d^3 + c^2* 
d^3 - 6*(I*d*tan(f*x + e) + I*c)*d^4 + d^5)/((c^6 + 2*I*c^5*d + c^4*d^2 + 
4*I*c^3*d^3 - c^2*d^4 + 2*I*c*d^5 - d^6)*(d*tan(f*x + e) + c)^(3/2)) - 3*( 
2*(d*tan(f*x + e) + c)^(3/2)*c*d - 2*sqrt(d*tan(f*x + e) + c)*c^2*d + 13*I 
*(d*tan(f*x + e) + c)^(3/2)*d^2 - 17*I*sqrt(d*tan(f*x + e) + c)*c*d^2 + 15 
*sqrt(d*tan(f*x + e) + c)*d^3)/((c^4 + 4*I*c^3*d - 6*c^2*d^2 - 4*I*c*d^3 + 
 d^4)*(d*tan(f*x + e) - I*d)^2))/(a^2*f)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^{5/2}} \, dx=\text {Hanged} \] Input:

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

Output:

\text{Hanged}
 

Reduce [F]

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

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

Output:

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