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

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

Optimal result

Integrand size = 33, antiderivative size = 62 \[ \int \frac {(a+i a \tan (e+f x))^2}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {4 i a^2}{5 f (c-i c \tan (e+f x))^{5/2}}+\frac {2 i a^2}{3 c f (c-i c \tan (e+f x))^{3/2}} \] Output:

-4/5*I*a^2/f/(c-I*c*tan(f*x+e))^(5/2)+2/3*I*a^2/c/f/(c-I*c*tan(f*x+e))^(3/ 
2)
 

Mathematica [A] (verified)

Time = 2.62 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.87 \[ \int \frac {(a+i a \tan (e+f x))^2}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {2 a^2 (-i+5 \tan (e+f x))}{15 c^2 f (i+\tan (e+f x))^2 \sqrt {c-i c \tan (e+f x)}} \] Input:

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

Output:

(-2*a^2*(-I + 5*Tan[e + f*x]))/(15*c^2*f*(I + Tan[e + f*x])^2*Sqrt[c - I*c 
*Tan[e + f*x]])
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.92, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3042, 4005, 3042, 3968, 53, 2009}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4005

\(\displaystyle a^2 c^2 \int \frac {\sec ^4(e+f x)}{(c-i c \tan (e+f x))^{9/2}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \int \frac {\sec (e+f x)^4}{(c-i c \tan (e+f x))^{9/2}}dx\)

\(\Big \downarrow \) 3968

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

\(\Big \downarrow \) 53

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {i a^2 \left (\frac {2}{3 (c-i c \tan (e+f x))^{3/2}}-\frac {4 c}{5 (c-i c \tan (e+f x))^{5/2}}\right )}{c f}\)

Input:

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

Output:

(I*a^2*((-4*c)/(5*(c - I*c*Tan[e + f*x])^(5/2)) + 2/(3*(c - I*c*Tan[e + f* 
x])^(3/2))))/(c*f)
 

Defintions of rubi rules used

rule 53
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, 
x] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0] && LeQ[7*m + 4*n + 4, 0]) 
|| LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 3968
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[1/(a^(m - 2)*b*f)   Subst[Int[(a - x)^(m/2 - 1)*(a + x 
)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && 
 EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
 

rule 4005
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m   Int[Sec[e + f*x]^(2*m)*(c + 
 d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ 
b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[ 
m, 0] || GtQ[m, n]))
 
Maple [A] (verified)

Time = 0.34 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.76

method result size
derivativedivides \(\frac {2 i a^{2} \left (-\frac {2 c}{5 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}+\frac {1}{3 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}\right )}{f c}\) \(47\)
default \(\frac {2 i a^{2} \left (-\frac {2 c}{5 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}+\frac {1}{3 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}\right )}{f c}\) \(47\)
risch \(-\frac {i a^{2} \left (3 \,{\mathrm e}^{4 i \left (f x +e \right )}+{\mathrm e}^{2 i \left (f x +e \right )}-2\right ) \sqrt {2}}{30 c^{2} \sqrt {\frac {c}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) \(55\)
parts \(\frac {2 i a^{2} c \left (\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{16 c^{\frac {7}{2}}}-\frac {1}{8 c^{3} \sqrt {c -i c \tan \left (f x +e \right )}}-\frac {1}{12 c^{2} \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}-\frac {1}{10 c \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}\right )}{f}+\frac {2 i a^{2} \left (-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{8 c^{\frac {5}{2}}}-\frac {1}{5 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}+\frac {1}{4 c^{2} \sqrt {c -i c \tan \left (f x +e \right )}}+\frac {1}{6 c \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}\right )}{f}-\frac {2 i a^{2} \left (-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{16 c^{\frac {3}{2}}}-\frac {1}{4 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {1}{8 c \sqrt {c -i c \tan \left (f x +e \right )}}+\frac {c}{10 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}\right )}{f c}\) \(292\)

Input:

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

Output:

2*I/f*a^2/c*(-2/5*c/(c-I*c*tan(f*x+e))^(5/2)+1/3/(c-I*c*tan(f*x+e))^(3/2))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.23 \[ \int \frac {(a+i a \tan (e+f x))^2}{(c-i c \tan (e+f x))^{5/2}} \, dx=\frac {\sqrt {2} {\left (-3 i \, a^{2} e^{\left (6 i \, f x + 6 i \, e\right )} - 4 i \, a^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + i \, a^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, a^{2}\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{30 \, c^{3} f} \] Input:

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

Output:

1/30*sqrt(2)*(-3*I*a^2*e^(6*I*f*x + 6*I*e) - 4*I*a^2*e^(4*I*f*x + 4*I*e) + 
 I*a^2*e^(2*I*f*x + 2*I*e) + 2*I*a^2)*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1))/(c 
^3*f)
                                                                                    
                                                                                    
 

Sympy [F]

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

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

Output:

-a**2*(Integral(tan(e + f*x)**2/(-c**2*sqrt(-I*c*tan(e + f*x) + c)*tan(e + 
 f*x)**2 - 2*I*c**2*sqrt(-I*c*tan(e + f*x) + c)*tan(e + f*x) + c**2*sqrt(- 
I*c*tan(e + f*x) + c)), x) + Integral(-2*I*tan(e + f*x)/(-c**2*sqrt(-I*c*t 
an(e + f*x) + c)*tan(e + f*x)**2 - 2*I*c**2*sqrt(-I*c*tan(e + f*x) + c)*ta 
n(e + f*x) + c**2*sqrt(-I*c*tan(e + f*x) + c)), x) + Integral(-1/(-c**2*sq 
rt(-I*c*tan(e + f*x) + c)*tan(e + f*x)**2 - 2*I*c**2*sqrt(-I*c*tan(e + f*x 
) + c)*tan(e + f*x) + c**2*sqrt(-I*c*tan(e + f*x) + c)), x))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.71 \[ \int \frac {(a+i a \tan (e+f x))^2}{(c-i c \tan (e+f x))^{5/2}} \, dx=\frac {2 i \, {\left (5 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )} a^{2} - 6 \, a^{2} c\right )}}{15 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {5}{2}} c f} \] Input:

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

Output:

2/15*I*(5*(-I*c*tan(f*x + e) + c)*a^2 - 6*a^2*c)/((-I*c*tan(f*x + e) + c)^ 
(5/2)*c*f)
 

Giac [F(-2)]

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

integrate((a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^(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 = 2.64 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.98 \[ \int \frac {(a+i a \tan (e+f x))^2}{(c-i c \tan (e+f x))^{5/2}} \, dx=\frac {a^2\,\sqrt {\frac {c\,\left (\cos \left (2\,e+2\,f\,x\right )+1-\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,e+2\,f\,x\right )+1}}\,\left (\cos \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}-\cos \left (4\,e+4\,f\,x\right )\,4{}\mathrm {i}-\cos \left (6\,e+6\,f\,x\right )\,3{}\mathrm {i}-\sin \left (2\,e+2\,f\,x\right )+4\,\sin \left (4\,e+4\,f\,x\right )+3\,\sin \left (6\,e+6\,f\,x\right )+2{}\mathrm {i}\right )}{30\,c^3\,f} \] Input:

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

Output:

(a^2*((c*(cos(2*e + 2*f*x) - sin(2*e + 2*f*x)*1i + 1))/(cos(2*e + 2*f*x) + 
 1))^(1/2)*(cos(2*e + 2*f*x)*1i - cos(4*e + 4*f*x)*4i - cos(6*e + 6*f*x)*3 
i - sin(2*e + 2*f*x) + 4*sin(4*e + 4*f*x) + 3*sin(6*e + 6*f*x) + 2i))/(30* 
c^3*f)
 

Reduce [F]

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

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

Output:

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