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

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 = 41, antiderivative size = 62 \[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {2 a (i A+B)}{5 f (c-i c \tan (e+f x))^{5/2}}+\frac {2 a B}{3 c f (c-i c \tan (e+f x))^{3/2}} \] Output:

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

Mathematica [A] (verified)

Time = 2.29 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.94 \[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {2 a \left (\frac {3 (i A+B)}{(c-i c \tan (e+f x))^{5/2}}-\frac {5 B}{c (c-i c \tan (e+f x))^{3/2}}\right )}{15 f} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.02, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {3042, 4071, 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)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4071

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

\(\Big \downarrow \) 53

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(a*c*((-2*(I*A + B))/(5*c*(c - I*c*Tan[e + f*x])^(5/2)) + (2*B)/(3*c^2*(c 
- I*c*Tan[e + f*x])^(3/2))))/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 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.44 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.85

method result size
derivativedivides \(\frac {2 i a \left (-\frac {i B}{3 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}-\frac {c \left (-i B +A \right )}{5 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}\right )}{f c}\) \(53\)
default \(\frac {2 i a \left (-\frac {i B}{3 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}-\frac {c \left (-i B +A \right )}{5 \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}\right )}{f c}\) \(53\)
risch \(-\frac {a \left (3 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+3 B \,{\mathrm e}^{4 i \left (f x +e \right )}+6 i A \,{\mathrm e}^{2 i \left (f x +e \right )}-4 B \,{\mathrm e}^{2 i \left (f x +e \right )}+3 i A -7 B \right ) \sqrt {2}}{60 c^{2} \sqrt {\frac {c}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) \(88\)
parts \(\frac {2 i A a 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 {a \left (i A +B \right ) \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 a B \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}\) \(291\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.48 \[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {\sqrt {2} {\left (3 \, {\left (i \, A + B\right )} a e^{\left (6 i \, f x + 6 i \, e\right )} - {\left (-9 i \, A + B\right )} a e^{\left (4 i \, f x + 4 i \, e\right )} - {\left (-9 i \, A + 11 \, B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (-3 i \, A + 7 \, B\right )} a\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{60 \, c^{3} f} \] Input:

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

Output:

-1/60*sqrt(2)*(3*(I*A + B)*a*e^(6*I*f*x + 6*I*e) - (-9*I*A + B)*a*e^(4*I*f 
*x + 4*I*e) - (-9*I*A + 11*B)*a*e^(2*I*f*x + 2*I*e) - (-3*I*A + 7*B)*a)*sq 
rt(c/(e^(2*I*f*x + 2*I*e) + 1))/(c^3*f)
 

Sympy [F]

\[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=i a \left (\int \left (- \frac {i A}{- 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 \frac {A \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}}\, dx + \int \frac {B \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 {i B \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\right ) \] Input:

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

Output:

I*a*(Integral(-I*A/(-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(A*tan(e + f*x)/(-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(B*tan(e + f*x)**2/(-c**2*sqr 
t(-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(-I*B 
*tan(e + f*x)/(-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))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.74 \[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {2 i \, {\left (5 i \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )} B a + 3 \, {\left (A - i \, B\right )} a 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))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(5/2),x, 
algorithm="maxima")
 

Output:

-2/15*I*(5*I*(-I*c*tan(f*x + e) + c)*B*a + 3*(A - I*B)*a*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)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=\text {Exception raised: TypeError} \] Input:

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

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

Output:

(a*(-(c*(sin(2*e + 2*f*x)*1i - 2*cos(e + f*x)^2))/(2*cos(e + f*x)^2))^(1/2 
)*(7*B - A*3i - A*(2*cos(e + f*x)^2 - 1)*9i + 11*B*(2*cos(e + f*x)^2 - 1) 
+ 9*A*sin(2*e + 2*f*x) + 9*A*sin(4*e + 4*f*x) + 3*A*sin(6*e + 6*f*x) + B*s 
in(2*e + 2*f*x)*11i + B*sin(4*e + 4*f*x)*1i - B*sin(6*e + 6*f*x)*3i - A*(2 
*cos(2*e + 2*f*x)^2 - 1)*9i - A*(2*cos(3*e + 3*f*x)^2 - 1)*3i + B*(2*cos(2 
*e + 2*f*x)^2 - 1) - 3*B*(2*cos(3*e + 3*f*x)^2 - 1)))/(60*c^3*f)
 

Reduce [F]

\[ \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{5/2}} \, dx=-\frac {a \left (\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 \right ) b i +\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 ) a i +\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 ) b +\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 ) a \right )}{\sqrt {c}\, c^{2}} \] Input:

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

Output:

( - a*(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)*b*i + 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)*a*i + 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)*b + 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)*a))/( 
sqrt(c)*c**2)