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

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

Optimal result

Integrand size = 30, antiderivative size = 216 \[ \int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{5/2} \, dx=-\frac {8 i a^3 (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {8 i a^3 (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}+\frac {8 a^3 (i c+d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {8 i a^3 (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^3 (i c-10 d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f} \] Output:

-8*I*a^3*(c-I*d)^(5/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/f+8*I 
*a^3*(c-I*d)^2*(c+d*tan(f*x+e))^(1/2)/f+8/3*a^3*(I*c+d)*(c+d*tan(f*x+e))^( 
3/2)/f+8/5*I*a^3*(c+d*tan(f*x+e))^(5/2)/f+4/63*a^3*(I*c-10*d)*(c+d*tan(f*x 
+e))^(7/2)/d^2/f-2/9*(a^3+I*a^3*tan(f*x+e))*(c+d*tan(f*x+e))^(7/2)/d/f
 

Mathematica [A] (verified)

Time = 3.62 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.23 \[ \int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{5/2} \, dx=\frac {12 (2 c-i d) d (a+i a \tan (e+f x))^3 \sqrt {c+d \tan (e+f x)}+14 d (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{3/2}+\frac {2 i a^3 \left (25 c^2-40 i c d-19 d^2\right ) \sqrt {c+d \tan (e+f x)} \left (-15 (c+i d)^2+10 (c+i d) (c+d \tan (e+f x))-3 (c+d \tan (e+f x))^2\right )}{5 d^2}-\frac {42 i a^3 (c-i d)^{5/2} \left (12 d^2 \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )+\sqrt {c-i d} \sqrt {c+d \tan (e+f x)} (-2 c-9 i d+d \tan (e+f x))\right )}{d^2}}{63 f} \] Input:

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

Output:

(12*(2*c - I*d)*d*(a + I*a*Tan[e + f*x])^3*Sqrt[c + d*Tan[e + f*x]] + 14*d 
*(a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^(3/2) + (((2*I)/5)*a^3*(25* 
c^2 - (40*I)*c*d - 19*d^2)*Sqrt[c + d*Tan[e + f*x]]*(-15*(c + I*d)^2 + 10* 
(c + I*d)*(c + d*Tan[e + f*x]) - 3*(c + d*Tan[e + f*x])^2))/d^2 - ((42*I)* 
a^3*(c - I*d)^(5/2)*(12*d^2*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d] 
] + Sqrt[c - I*d]*Sqrt[c + d*Tan[e + f*x]]*(-2*c - (9*I)*d + d*Tan[e + f*x 
])))/d^2)/(63*f)
 

Rubi [A] (warning: unable to verify)

Time = 1.44 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.13, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4039, 3042, 4075, 3042, 4011, 3042, 4011, 3042, 4011, 3042, 4020, 27, 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 (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{5/2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4039

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4075

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4011

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 a \left (\int \sqrt {c+d \tan (e+f x)} \left (18 a^2 d (c-i d)^2+18 i a^2 d \tan (e+f x) (c-i d)^2\right )dx+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 a \left (\int \sqrt {c+d \tan (e+f x)} \left (18 a^2 d (c-i d)^2+18 i a^2 d \tan (e+f x) (c-i d)^2\right )dx+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 a \left (\int \frac {18 a^2 (c-i d)^3 d-18 a^2 d (i c+d)^3 \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 a \left (\int \frac {18 a^2 (c-i d)^3 d-18 a^2 d (i c+d)^3 \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 4020

\(\displaystyle \frac {2 a \left (\frac {324 i a^4 d^2 (c-i d)^6 \int \frac {1}{3 \sqrt {2} a^2 d \sqrt {18 c+18 d \tan (e+f x)} \left (18 a^2 d (i c+d)^6-18 a^2 (c-i d)^3 d (i c+d)^3 \tan (e+f x)\right )}d\left (-18 a^2 d (i c+d)^3 \tan (e+f x)\right )}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 a \left (\frac {54 i \sqrt {2} a^2 d (c-i d)^6 \int \frac {1}{\sqrt {18 c+18 d \tan (e+f x)} \left (18 a^2 d (i c+d)^6-18 a^2 (c-i d)^3 d (i c+d)^3 \tan (e+f x)\right )}d\left (-18 a^2 d (i c+d)^3 \tan (e+f x)\right )}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {2 a \left (-\frac {108 i \sqrt {2} a^4 d (d+i c)^3 (c-i d)^6 \int \frac {1}{18 a^2 (i c+d)^7+324 i a^6 (c-i d)^6 d^2 \tan ^2(e+f x) (i c+d)^6}d\sqrt {18 c+18 d \tan (e+f x)}}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {2 a \left (-\frac {36 a^2 d (d+i c)^3 \text {arctanh}\left (\frac {3 \sqrt {2} a^2 d (d+i c)^3 \tan (e+f x)}{\sqrt {c-i d}}\right )}{f \sqrt {c-i d}}+\frac {2 a^2 (-10 d+i c) (c+d \tan (e+f x))^{7/2}}{7 d f}+\frac {36 i a^2 d (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {12 a^2 d (d+i c) (c+d \tan (e+f x))^{3/2}}{f}+\frac {36 i a^2 d (c-i d)^2 \sqrt {c+d \tan (e+f x)}}{f}\right )}{9 d}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^{7/2}}{9 d f}\)

Input:

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

Output:

(-2*(a^3 + I*a^3*Tan[e + f*x])*(c + d*Tan[e + f*x])^(7/2))/(9*d*f) + (2*a* 
((-36*a^2*d*(I*c + d)^3*ArcTanh[(3*Sqrt[2]*a^2*d*(I*c + d)^3*Tan[e + f*x]) 
/Sqrt[c - I*d]])/(Sqrt[c - I*d]*f) + ((36*I)*a^2*(c - I*d)^2*d*Sqrt[c + d* 
Tan[e + f*x]])/f + (12*a^2*d*(I*c + d)*(c + d*Tan[e + f*x])^(3/2))/f + ((( 
36*I)/5)*a^2*d*(c + d*Tan[e + f*x])^(5/2))/f + (2*a^2*(I*c - 10*d)*(c + d* 
Tan[e + f*x])^(7/2))/(7*d*f)))/(9*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 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 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 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 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]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1046 vs. \(2 (183 ) = 366\).

Time = 0.53 (sec) , antiderivative size = 1047, normalized size of antiderivative = 4.85

method result size
derivativedivides \(\text {Expression too large to display}\) \(1047\)
default \(\text {Expression too large to display}\) \(1047\)
parts \(\text {Expression too large to display}\) \(4867\)

Input:

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

Output:

2/f*a^3/d^2*(-1/9*I*(c+d*tan(f*x+e))^(9/2)+1/7*I*c*(c+d*tan(f*x+e))^(7/2)+ 
4/5*I*d^2*(c+d*tan(f*x+e))^(5/2)-3/7*d*(c+d*tan(f*x+e))^(7/2)+4/3*I*c*d^2* 
(c+d*tan(f*x+e))^(3/2)+4*I*(c+d*tan(f*x+e))^(1/2)*c^2*d^2-4*I*(c+d*tan(f*x 
+e))^(1/2)*d^4+4/3*d^3*(c+d*tan(f*x+e))^(3/2)+8*(c+d*tan(f*x+e))^(1/2)*c*d 
^3-4*d^2*(1/2/(2*(c^2+d^2)^(1/2)+2*c)^(1/2)/(c^2+d^2)^(1/2)*(1/2*(I*c^3*(c 
^2+d^2)^(1/2)-3*I*c*d^2*(c^2+d^2)^(1/2)+I*c^4-I*d^4+3*c^2*d*(c^2+d^2)^(1/2 
)-d^3*(c^2+d^2)^(1/2)+2*c^3*d+2*c*d^3)*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^ 
(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+2*(I*(2*(c^2+d^2)^(1/ 
2)+2*c)^(1/2)*c^4-I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*d^4+2*(2*(c^2+d^2)^(1/2) 
+2*c)^(1/2)*c^3*d+2*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*d^3-1/2*(I*c^3*(c^2+d^ 
2)^(1/2)-3*I*c*d^2*(c^2+d^2)^(1/2)+I*c^4-I*d^4+3*c^2*d*(c^2+d^2)^(1/2)-d^3 
*(c^2+d^2)^(1/2)+2*c^3*d+2*c*d^3)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d 
^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)+(2*(c^2+d^2)^(1/2)+2 
*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)))+1/2/(2*(c^2+d^2)^(1/2)+2*c)^(1/ 
2)/(c^2+d^2)^(1/2)*(-1/2*(I*c^3*(c^2+d^2)^(1/2)-3*I*c*d^2*(c^2+d^2)^(1/2)+ 
I*c^4-I*d^4+3*c^2*d*(c^2+d^2)^(1/2)-d^3*(c^2+d^2)^(1/2)+2*c^3*d+2*c*d^3)*l 
n((c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)-d*tan(f*x+e)-c-(c^2 
+d^2)^(1/2))+2*(-I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c^4+I*(2*(c^2+d^2)^(1/2)+ 
2*c)^(1/2)*d^4-2*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c^3*d-2*(2*(c^2+d^2)^(1/2)+ 
2*c)^(1/2)*c*d^3+1/2*(I*c^3*(c^2+d^2)^(1/2)-3*I*c*d^2*(c^2+d^2)^(1/2)+I...
                                                                                    
                                                                                    
 

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

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

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

Output:

-2/315*(315*(d^2*f*e^(8*I*f*x + 8*I*e) + 4*d^2*f*e^(6*I*f*x + 6*I*e) + 6*d 
^2*f*e^(4*I*f*x + 4*I*e) + 4*d^2*f*e^(2*I*f*x + 2*I*e) + d^2*f)*sqrt(-(a^6 
*c^5 - 5*I*a^6*c^4*d - 10*a^6*c^3*d^2 + 10*I*a^6*c^2*d^3 + 5*a^6*c*d^4 - I 
*a^6*d^5)/f^2)*log(2*(a^3*c^3 - 2*I*a^3*c^2*d - a^3*c*d^2 - (I*f*e^(2*I*f* 
x + 2*I*e) + I*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f 
*x + 2*I*e) + 1))*sqrt(-(a^6*c^5 - 5*I*a^6*c^4*d - 10*a^6*c^3*d^2 + 10*I*a 
^6*c^2*d^3 + 5*a^6*c*d^4 - I*a^6*d^5)/f^2) + (a^3*c^3 - 3*I*a^3*c^2*d - 3* 
a^3*c*d^2 + I*a^3*d^3)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(a^3*c^2 
- 2*I*a^3*c*d - a^3*d^2)) - 315*(d^2*f*e^(8*I*f*x + 8*I*e) + 4*d^2*f*e^(6* 
I*f*x + 6*I*e) + 6*d^2*f*e^(4*I*f*x + 4*I*e) + 4*d^2*f*e^(2*I*f*x + 2*I*e) 
 + d^2*f)*sqrt(-(a^6*c^5 - 5*I*a^6*c^4*d - 10*a^6*c^3*d^2 + 10*I*a^6*c^2*d 
^3 + 5*a^6*c*d^4 - I*a^6*d^5)/f^2)*log(2*(a^3*c^3 - 2*I*a^3*c^2*d - a^3*c* 
d^2 - (-I*f*e^(2*I*f*x + 2*I*e) - I*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) 
 + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(a^6*c^5 - 5*I*a^6*c^4*d - 10 
*a^6*c^3*d^2 + 10*I*a^6*c^2*d^3 + 5*a^6*c*d^4 - I*a^6*d^5)/f^2) + (a^3*c^3 
 - 3*I*a^3*c^2*d - 3*a^3*c*d^2 + I*a^3*d^3)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f 
*x - 2*I*e)/(a^3*c^2 - 2*I*a^3*c*d - a^3*d^2)) + 2*(-5*I*a^3*c^4 + 65*a^3* 
c^3*d - 801*I*a^3*c^2*d^2 - 1163*a^3*c*d^3 + 496*I*a^3*d^4 + (-5*I*a^3*c^4 
 + 70*a^3*c^3*d - 1206*I*a^3*c^2*d^2 - 2182*a^3*c*d^3 + 1051*I*a^3*d^4)*e^ 
(8*I*f*x + 8*I*e) + (-20*I*a^3*c^4 + 275*a^3*c^3*d - 4269*I*a^3*c^2*d^2...
 

Sympy [F]

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

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

Output:

-I*a**3*(Integral(I*c**2*sqrt(c + d*tan(e + f*x)), x) + Integral(-3*c**2*s 
qrt(c + d*tan(e + f*x))*tan(e + f*x), x) + Integral(c**2*sqrt(c + d*tan(e 
+ f*x))*tan(e + f*x)**3, x) + Integral(-3*d**2*sqrt(c + d*tan(e + f*x))*ta 
n(e + f*x)**3, x) + Integral(d**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**5 
, x) + Integral(-3*I*c**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**2, x) + I 
ntegral(I*d**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**2, x) + Integral(-3* 
I*d**2*sqrt(c + d*tan(e + f*x))*tan(e + f*x)**4, x) + Integral(-6*c*d*sqrt 
(c + d*tan(e + f*x))*tan(e + f*x)**2, x) + Integral(2*c*d*sqrt(c + d*tan(e 
 + f*x))*tan(e + f*x)**4, x) + Integral(2*I*c*d*sqrt(c + d*tan(e + f*x))*t 
an(e + f*x), x) + Integral(-6*I*c*d*sqrt(c + d*tan(e + f*x))*tan(e + f*x)* 
*3, x))
 

Maxima [F(-1)]

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

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

Output:

Timed out
 

Giac [A] (verification not implemented)

Time = 0.85 (sec) , antiderivative size = 350, normalized size of antiderivative = 1.62 \[ \int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{5/2} \, dx=-\frac {2 \, a^{3} {\left (\frac {1260 \, \sqrt {2} {\left (-i \, c^{3} - 3 \, c^{2} d + 3 i \, c d^{2} + d^{3}\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 )}{\sqrt {-c + \sqrt {c^{2} + d^{2}}} {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} + \frac {35 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {9}{2}} d^{16} - 45 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {7}{2}} c d^{16} + 135 \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {7}{2}} d^{17} - 252 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {5}{2}} d^{18} - 420 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} c d^{18} - 1260 i \, \sqrt {d \tan \left (f x + e\right ) + c} c^{2} d^{18} - 420 \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} d^{19} - 2520 \, \sqrt {d \tan \left (f x + e\right ) + c} c d^{19} + 1260 i \, \sqrt {d \tan \left (f x + e\right ) + c} d^{20}}{d^{18}}\right )}}{315 \, f} \] Input:

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

Output:

-2/315*a^3*(1260*sqrt(2)*(-I*c^3 - 3*c^2*d + 3*I*c*d^2 + d^3)*arctan(2*(sq 
rt(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))))/(sqrt(-c + sqrt(c^2 
 + d^2))*(-I*d/(c - sqrt(c^2 + d^2)) + 1)) + (35*I*(d*tan(f*x + e) + c)^(9 
/2)*d^16 - 45*I*(d*tan(f*x + e) + c)^(7/2)*c*d^16 + 135*(d*tan(f*x + e) + 
c)^(7/2)*d^17 - 252*I*(d*tan(f*x + e) + c)^(5/2)*d^18 - 420*I*(d*tan(f*x + 
 e) + c)^(3/2)*c*d^18 - 1260*I*sqrt(d*tan(f*x + e) + c)*c^2*d^18 - 420*(d* 
tan(f*x + e) + c)^(3/2)*d^19 - 2520*sqrt(d*tan(f*x + e) + c)*c*d^19 + 1260 
*I*sqrt(d*tan(f*x + e) + c)*d^20)/d^18)/f
 

Mupad [B] (verification not implemented)

Time = 25.26 (sec) , antiderivative size = 400, normalized size of antiderivative = 1.85 \[ \int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^{5/2} \, dx=-\left (\frac {\left (c-d\,1{}\mathrm {i}\right )\,\left (\frac {a^3\,\left (c-d\,1{}\mathrm {i}\right )\,2{}\mathrm {i}}{d^2\,f}-\frac {a^3\,\left (c+d\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{d^2\,f}\right )}{5}+\frac {a^3\,{\left (c+d\,1{}\mathrm {i}\right )}^2\,2{}\mathrm {i}}{5\,d^2\,f}\right )\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}-\left (\frac {a^3\,\left (c-d\,1{}\mathrm {i}\right )\,2{}\mathrm {i}}{7\,d^2\,f}-\frac {a^3\,\left (c+d\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{7\,d^2\,f}\right )\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}-{\left (c-d\,1{}\mathrm {i}\right )}^2\,\left (\left (c-d\,1{}\mathrm {i}\right )\,\left (\frac {a^3\,\left (c-d\,1{}\mathrm {i}\right )\,2{}\mathrm {i}}{d^2\,f}-\frac {a^3\,\left (c+d\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{d^2\,f}\right )+\frac {a^3\,{\left (c+d\,1{}\mathrm {i}\right )}^2\,2{}\mathrm {i}}{d^2\,f}\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}-\frac {\left (c-d\,1{}\mathrm {i}\right )\,\left (\left (c-d\,1{}\mathrm {i}\right )\,\left (\frac {a^3\,\left (c-d\,1{}\mathrm {i}\right )\,2{}\mathrm {i}}{d^2\,f}-\frac {a^3\,\left (c+d\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{d^2\,f}\right )+\frac {a^3\,{\left (c+d\,1{}\mathrm {i}\right )}^2\,2{}\mathrm {i}}{d^2\,f}\right )\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3}-\frac {a^3\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{9/2}\,2{}\mathrm {i}}{9\,d^2\,f}-\frac {\sqrt {16{}\mathrm {i}}\,a^3\,\mathrm {atan}\left (\frac {\sqrt {16{}\mathrm {i}}\,{\left (d+c\,1{}\mathrm {i}\right )}^{5/2}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{4\,\left (-c^3\,1{}\mathrm {i}-3\,c^2\,d+c\,d^2\,3{}\mathrm {i}+d^3\right )}\right )\,{\left (d+c\,1{}\mathrm {i}\right )}^{5/2}\,2{}\mathrm {i}}{f} \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

a**3*(int(sqrt(tan(e + f*x)*d + c),x)*c**2 - int(sqrt(tan(e + f*x)*d + c)* 
tan(e + f*x)**5,x)*d**2*i - 2*int(sqrt(tan(e + f*x)*d + c)*tan(e + f*x)**4 
,x)*c*d*i - 3*int(sqrt(tan(e + f*x)*d + c)*tan(e + f*x)**4,x)*d**2 - int(s 
qrt(tan(e + f*x)*d + c)*tan(e + f*x)**3,x)*c**2*i - 6*int(sqrt(tan(e + f*x 
)*d + c)*tan(e + f*x)**3,x)*c*d + 3*int(sqrt(tan(e + f*x)*d + c)*tan(e + f 
*x)**3,x)*d**2*i - 3*int(sqrt(tan(e + f*x)*d + c)*tan(e + f*x)**2,x)*c**2 
+ 6*int(sqrt(tan(e + f*x)*d + c)*tan(e + f*x)**2,x)*c*d*i + int(sqrt(tan(e 
 + f*x)*d + c)*tan(e + f*x)**2,x)*d**2 + 3*int(sqrt(tan(e + f*x)*d + c)*ta 
n(e + f*x),x)*c**2*i + 2*int(sqrt(tan(e + f*x)*d + c)*tan(e + f*x),x)*c*d)