\(\int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx\) [817]

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

Optimal result

Integrand size = 45, antiderivative size = 267 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=-\frac {5 i a^{7/2} A c^{7/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {5 a^3 A c^3 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {5 a^2 A c^2 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a A c \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 f} \] Output:

-5/8*I*a^(7/2)*A*c^(7/2)*arctan(c^(1/2)*(a+I*a*tan(f*x+e))^(1/2)/a^(1/2)/( 
c-I*c*tan(f*x+e))^(1/2))/f+5/16*a^3*A*c^3*tan(f*x+e)*(a+I*a*tan(f*x+e))^(1 
/2)*(c-I*c*tan(f*x+e))^(1/2)/f+5/24*a^2*A*c^2*tan(f*x+e)*(a+I*a*tan(f*x+e) 
)^(3/2)*(c-I*c*tan(f*x+e))^(3/2)/f+1/6*a*A*c*tan(f*x+e)*(a+I*a*tan(f*x+e)) 
^(5/2)*(c-I*c*tan(f*x+e))^(5/2)/f+1/7*B*(a+I*a*tan(f*x+e))^(7/2)*(c-I*c*ta 
n(f*x+e))^(7/2)/f
                                                                                    
                                                                                    
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(535\) vs. \(2(267)=534\).

Time = 18.84 (sec) , antiderivative size = 535, normalized size of antiderivative = 2.00 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=-\frac {5 i A c^4 e^{-i (4 e+f x)} \sqrt {e^{i f x}} \sqrt {\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}} \arctan \left (e^{i (e+f x)}\right ) (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{8 \sqrt {\frac {c}{1+e^{2 i (e+f x)}}} f \sec ^{\frac {9}{2}}(e+f x) (\cos (f x)+i \sin (f x))^{7/2} (A \cos (e+f x)+B \sin (e+f x))}+\frac {\cos ^4(e+f x) \sqrt {\sec (e+f x) (c \cos (e+f x)-i c \sin (e+f x))} \left (\sec ^6(e+f x) \left (\frac {1}{7} B c^3 \cos (3 e)-\frac {1}{7} i B c^3 \sin (3 e)\right )+A c^3 \sec (e) \sec ^5(e+f x) \left (\frac {1}{6} \cos (3 e)-\frac {1}{6} i \sin (3 e)\right ) \sin (f x)+A c^3 \sec (e) \sec ^3(e+f x) \left (\frac {5}{24} \cos (3 e)-\frac {5}{24} i \sin (3 e)\right ) \sin (f x)+A c^3 \sec (e) \sec (e+f x) \left (\frac {5}{16} \cos (3 e)-\frac {5}{16} i \sin (3 e)\right ) \sin (f x)+\sec ^4(e+f x) \left (\frac {1}{6} A c^3 \cos (3 e)-\frac {1}{6} i A c^3 \sin (3 e)\right ) \tan (e)+\sec ^2(e+f x) \left (\frac {5}{24} A c^3 \cos (3 e)-\frac {5}{24} i A c^3 \sin (3 e)\right ) \tan (e)+\left (\frac {5}{16} A c^3 \cos (3 e)-\frac {5}{16} i A c^3 \sin (3 e)\right ) \tan (e)\right ) (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{f (\cos (f x)+i \sin (f x))^3 (A \cos (e+f x)+B \sin (e+f x))} \] Input:

Integrate[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e 
 + f*x])^(7/2),x]
 

Output:

(((-5*I)/8)*A*c^4*Sqrt[E^(I*f*x)]*Sqrt[E^(I*(e + f*x))/(1 + E^((2*I)*(e + 
f*x)))]*ArcTan[E^(I*(e + f*x))]*(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e 
+ f*x]))/(E^(I*(4*e + f*x))*Sqrt[c/(1 + E^((2*I)*(e + f*x)))]*f*Sec[e + f* 
x]^(9/2)*(Cos[f*x] + I*Sin[f*x])^(7/2)*(A*Cos[e + f*x] + B*Sin[e + f*x])) 
+ (Cos[e + f*x]^4*Sqrt[Sec[e + f*x]*(c*Cos[e + f*x] - I*c*Sin[e + f*x])]*( 
Sec[e + f*x]^6*((B*c^3*Cos[3*e])/7 - (I/7)*B*c^3*Sin[3*e]) + A*c^3*Sec[e]* 
Sec[e + f*x]^5*(Cos[3*e]/6 - (I/6)*Sin[3*e])*Sin[f*x] + A*c^3*Sec[e]*Sec[e 
 + f*x]^3*((5*Cos[3*e])/24 - ((5*I)/24)*Sin[3*e])*Sin[f*x] + A*c^3*Sec[e]* 
Sec[e + f*x]*((5*Cos[3*e])/16 - ((5*I)/16)*Sin[3*e])*Sin[f*x] + Sec[e + f* 
x]^4*((A*c^3*Cos[3*e])/6 - (I/6)*A*c^3*Sin[3*e])*Tan[e] + Sec[e + f*x]^2*( 
(5*A*c^3*Cos[3*e])/24 - ((5*I)/24)*A*c^3*Sin[3*e])*Tan[e] + ((5*A*c^3*Cos[ 
3*e])/16 - ((5*I)/16)*A*c^3*Sin[3*e])*Tan[e])*(a + I*a*Tan[e + f*x])^(7/2) 
*(A + B*Tan[e + f*x]))/(f*(Cos[f*x] + I*Sin[f*x])^3*(A*Cos[e + f*x] + B*Si 
n[e + f*x]))
 

Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 261, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {3042, 4071, 90, 40, 40, 40, 45, 218}

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 (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x))dx\)

\(\Big \downarrow \) 4071

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

\(\Big \downarrow \) 90

\(\displaystyle \frac {a c \left (A \int (i \tan (e+f x) a+a)^{5/2} (c-i c \tan (e+f x))^{5/2}d\tan (e+f x)+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \int (i \tan (e+f x) a+a)^{3/2} (c-i c \tan (e+f x))^{3/2}d\tan (e+f x)+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \int \sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}d\tan (e+f x)+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (\frac {1}{2} a c \int \frac {1}{\sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}}d\tan (e+f x)+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 45

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (a c \int \frac {1}{i a+\frac {i c (i \tan (e+f x) a+a)}{c-i c \tan (e+f x)}}d\frac {\sqrt {i \tan (e+f x) a+a}}{\sqrt {c-i c \tan (e+f x)}}+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}-i \sqrt {a} \sqrt {c} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

Input:

Int[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x 
])^(7/2),x]
 

Output:

(a*c*((B*(a + I*a*Tan[e + f*x])^(7/2)*(c - I*c*Tan[e + f*x])^(7/2))/(7*a*c 
) + A*((Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(5/2)*(c - I*c*Tan[e + f*x])^( 
5/2))/6 + (5*a*c*((Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(3/2)*(c - I*c*Tan[ 
e + f*x])^(3/2))/4 + (3*a*c*((-I)*Sqrt[a]*Sqrt[c]*ArcTan[(Sqrt[c]*Sqrt[a + 
 I*a*Tan[e + f*x]])/(Sqrt[a]*Sqrt[c - I*c*Tan[e + f*x]])] + (Tan[e + f*x]* 
Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c - I*c*Tan[e + f*x]])/2))/4))/6)))/f
 

Defintions of rubi rules used

rule 40
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x* 
(a + b*x)^m*((c + d*x)^m/(2*m + 1)), x] + Simp[2*a*c*(m/(2*m + 1))   Int[(a 
 + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[ 
b*c + a*d, 0] && IGtQ[m + 1/2, 0]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

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

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

Time = 0.83 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.01

method result size
parts \(\frac {A \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (8 \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+26 \tan \left (f x +e \right )^{3} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+15 \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +33 \tan \left (f x +e \right ) \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\right )}{48 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}+\frac {B \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (1+\tan \left (f x +e \right )^{2}\right ) \left (\tan \left (f x +e \right )^{4}+2 \tan \left (f x +e \right )^{2}+1\right )}{7 f}\) \(269\)
derivativedivides \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (48 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+56 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}+182 A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{3}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+105 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +231 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{336 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(314\)
default \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (48 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+56 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}+182 A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{3}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+105 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +231 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{336 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(314\)

Input:

int((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/2),x,m 
ethod=_RETURNVERBOSE)
 

Output:

1/48*A/f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^3*c^3*(8 
*tan(f*x+e)^5*(a*c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)+26*tan(f*x+e)^3*(a* 
c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)+15*ln((a*c*tan(f*x+e)+(a*c)^(1/2)*(a 
*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2))*a*c+33*tan(f*x+e)*(a*c*(1+tan(f*x 
+e)^2))^(1/2)*(a*c)^(1/2))/(a*c*(1+tan(f*x+e)^2))^(1/2)/(a*c)^(1/2)+1/7*B/ 
f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^3*c^3*(1+tan(f* 
x+e)^2)*(tan(f*x+e)^4+2*tan(f*x+e)^2+1)
 

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. 693 vs. \(2 (207) = 414\).

Time = 0.11 (sec) , antiderivative size = 693, normalized size of antiderivative = 2.60 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx =\text {Too large to display} \] Input:

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="fricas")
 

Output:

1/672*(105*sqrt(A^2*a^7*c^7/f^2)*(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f* 
x + 10*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e 
^(4*I*f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)*log(4*(2*(A*a^3*c^3*e^(3 
*I*f*x + 3*I*e) + A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 
 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)) - sqrt(A^2*a^7*c^7/f^2)*(I*f*e^(2*I 
*f*x + 2*I*e) - I*f))/(A*a^3*c^3*e^(2*I*f*x + 2*I*e) + A*a^3*c^3)) - 105*s 
qrt(A^2*a^7*c^7/f^2)*(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) 
+ 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 
4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)*log(4*(2*(A*a^3*c^3*e^(3*I*f*x + 3*I 
*e) + A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/ 
(e^(2*I*f*x + 2*I*e) + 1)) - sqrt(A^2*a^7*c^7/f^2)*(-I*f*e^(2*I*f*x + 2*I* 
e) + I*f))/(A*a^3*c^3*e^(2*I*f*x + 2*I*e) + A*a^3*c^3)) + 4*(-105*I*A*a^3* 
c^3*e^(13*I*f*x + 13*I*e) - 700*I*A*a^3*c^3*e^(11*I*f*x + 11*I*e) - 1981*I 
*A*a^3*c^3*e^(9*I*f*x + 9*I*e) + 3072*B*a^3*c^3*e^(7*I*f*x + 7*I*e) + 1981 
*I*A*a^3*c^3*e^(5*I*f*x + 5*I*e) + 700*I*A*a^3*c^3*e^(3*I*f*x + 3*I*e) + 1 
05*I*A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/( 
e^(2*I*f*x + 2*I*e) + 1)))/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10 
*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I* 
f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)
 

Sympy [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Timed out} \] Input:

integrate((a+I*a*tan(f*x+e))**(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**( 
7/2),x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1901 vs. \(2 (207) = 414\).

Time = 2.30 (sec) , antiderivative size = 1901, normalized size of antiderivative = 7.12 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Too large to display} \] Input:

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="maxima")
 

Output:

-(420*A*a^3*c^3*cos(13/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 28 
00*A*a^3*c^3*cos(11/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 7924* 
A*a^3*c^3*cos(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 12288*I*B 
*a^3*c^3*cos(7/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 7924*A*a^3 
*c^3*cos(5/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 2800*A*a^3*c^3 
*cos(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 420*A*a^3*c^3*cos( 
1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 420*I*A*a^3*c^3*sin(13/ 
2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2800*I*A*a^3*c^3*sin(11/2 
*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 7924*I*A*a^3*c^3*sin(9/2*a 
rctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 12288*B*a^3*c^3*sin(7/2*arct 
an2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 7924*I*A*a^3*c^3*sin(5/2*arctan 
2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 2800*I*A*a^3*c^3*sin(3/2*arctan2( 
sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 420*I*A*a^3*c^3*sin(1/2*arctan2(sin 
(2*f*x + 2*e), cos(2*f*x + 2*e))) + 210*(A*a^3*c^3*cos(14*f*x + 14*e) + 7* 
A*a^3*c^3*cos(12*f*x + 12*e) + 21*A*a^3*c^3*cos(10*f*x + 10*e) + 35*A*a^3* 
c^3*cos(8*f*x + 8*e) + 35*A*a^3*c^3*cos(6*f*x + 6*e) + 21*A*a^3*c^3*cos(4* 
f*x + 4*e) + 7*A*a^3*c^3*cos(2*f*x + 2*e) + I*A*a^3*c^3*sin(14*f*x + 14*e) 
 + 7*I*A*a^3*c^3*sin(12*f*x + 12*e) + 21*I*A*a^3*c^3*sin(10*f*x + 10*e) + 
35*I*A*a^3*c^3*sin(8*f*x + 8*e) + 35*I*A*a^3*c^3*sin(6*f*x + 6*e) + 21*I*A 
*a^3*c^3*sin(4*f*x + 4*e) + 7*I*A*a^3*c^3*sin(2*f*x + 2*e) + A*a^3*c^3)...
 

Giac [F]

\[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\int { {\left (B \tan \left (f x + e\right ) + A\right )} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{\frac {7}{2}} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {7}{2}} \,d x } \] Input:

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="giac")
 

Output:

integrate((B*tan(f*x + e) + A)*(I*a*tan(f*x + e) + a)^(7/2)*(-I*c*tan(f*x 
+ e) + c)^(7/2), x)
 

Mupad [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\int \left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2} \,d x \] Input:

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x) 
*1i)^(7/2),x)
 

Output:

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x) 
*1i)^(7/2), x)
 

Reduce [F]

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

int((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/2),x)
 

Output:

(sqrt(c)*sqrt(a)*a**3*c**3*(sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x)* 
i + 1)*tan(e + f*x)**6*b + 3*sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x) 
*i + 1)*tan(e + f*x)**4*b + 3*sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x 
)*i + 1)*tan(e + f*x)**2*b + sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x) 
*i + 1)*b + 7*int(sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x)*i + 1)*tan 
(e + f*x)**6,x)*a*f + 21*int(sqrt(tan(e + f*x)*i + 1)*sqrt( - tan(e + f*x) 
*i + 1)*tan(e + f*x)**4,x)*a*f + 21*int(sqrt(tan(e + f*x)*i + 1)*sqrt( - t 
an(e + f*x)*i + 1)*tan(e + f*x)**2,x)*a*f + 7*int(sqrt(tan(e + f*x)*i + 1) 
*sqrt( - tan(e + f*x)*i + 1),x)*a*f))/(7*f)