\(\int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx\) [953]

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

Optimal result

Integrand size = 31, antiderivative size = 162 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\frac {5 x}{32 a c^4}-\frac {i}{16 a f (c-i c \tan (e+f x))^4}-\frac {i}{12 a c f (c-i c \tan (e+f x))^3}-\frac {3 i}{32 a f \left (c^2-i c^2 \tan (e+f x)\right )^2}-\frac {i}{8 a f \left (c^4-i c^4 \tan (e+f x)\right )}+\frac {i}{32 a f \left (c^4+i c^4 \tan (e+f x)\right )} \] Output:

5/32*x/a/c^4-1/16*I/a/f/(c-I*c*tan(f*x+e))^4-1/12*I/a/c/f/(c-I*c*tan(f*x+e 
))^3-3/32*I/a/f/(c^2-I*c^2*tan(f*x+e))^2-1/8*I/a/f/(c^4-I*c^4*tan(f*x+e))+ 
1/32*I/a/f/(c^4+I*c^4*tan(f*x+e))
 

Mathematica [A] (verified)

Time = 0.56 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.86 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\frac {i c^2 \left (-\frac {5 i \arctan (\tan (e+f x))}{32 c^6}-\frac {1}{16 c^2 (c-i c \tan (e+f x))^4}-\frac {1}{12 c^3 (c-i c \tan (e+f x))^3}-\frac {3}{32 c^4 (c-i c \tan (e+f x))^2}-\frac {1}{8 c^5 (c-i c \tan (e+f x))}+\frac {1}{32 c^5 (c+i c \tan (e+f x))}\right )}{a f} \] Input:

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

Output:

(I*c^2*((((-5*I)/32)*ArcTan[Tan[e + f*x]])/c^6 - 1/(16*c^2*(c - I*c*Tan[e 
+ f*x])^4) - 1/(12*c^3*(c - I*c*Tan[e + f*x])^3) - 3/(32*c^4*(c - I*c*Tan[ 
e + f*x])^2) - 1/(8*c^5*(c - I*c*Tan[e + f*x])) + 1/(32*c^5*(c + I*c*Tan[e 
 + f*x]))))/(a*f)
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.86, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 4005, 3042, 3968, 54, 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 {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4005

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3968

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

\(\Big \downarrow \) 54

\(\displaystyle \frac {i c^2 \int \left (\frac {1}{8 c^5 (c-i c \tan (e+f x))^2}+\frac {1}{32 c^5 (i \tan (e+f x) c+c)^2}+\frac {3}{16 c^4 (c-i c \tan (e+f x))^3}+\frac {1}{4 c^3 (c-i c \tan (e+f x))^4}+\frac {1}{4 c^2 (c-i c \tan (e+f x))^5}+\frac {5}{32 c^5 \left (\tan ^2(e+f x) c^2+c^2\right )}\right )d(-i c \tan (e+f x))}{a f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {i c^2 \left (-\frac {5 i \arctan (\tan (e+f x))}{32 c^6}-\frac {1}{8 c^5 (c-i c \tan (e+f x))}+\frac {1}{32 c^5 (c+i c \tan (e+f x))}-\frac {3}{32 c^4 (c-i c \tan (e+f x))^2}-\frac {1}{12 c^3 (c-i c \tan (e+f x))^3}-\frac {1}{16 c^2 (c-i c \tan (e+f x))^4}\right )}{a f}\)

Input:

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

Output:

(I*c^2*((((-5*I)/32)*ArcTan[Tan[e + f*x]])/c^6 - 1/(16*c^2*(c - I*c*Tan[e 
+ f*x])^4) - 1/(12*c^3*(c - I*c*Tan[e + f*x])^3) - 3/(32*c^4*(c - I*c*Tan[ 
e + f*x])^2) - 1/(8*c^5*(c - I*c*Tan[e + f*x])) + 1/(32*c^5*(c + I*c*Tan[e 
 + f*x]))))/(a*f)
 

Defintions of rubi rules used

rule 54
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E 
xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && 
 ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && LtQ[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.26 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.71

method result size
risch \(\frac {5 x}{32 a \,c^{4}}-\frac {i {\mathrm e}^{8 i \left (f x +e \right )}}{256 a \,c^{4} f}-\frac {5 i {\mathrm e}^{6 i \left (f x +e \right )}}{192 a \,c^{4} f}-\frac {5 i {\mathrm e}^{4 i \left (f x +e \right )}}{64 a \,c^{4} f}-\frac {9 i \cos \left (2 f x +2 e \right )}{64 a \,c^{4} f}+\frac {11 \sin \left (2 f x +2 e \right )}{64 a \,c^{4} f}\) \(115\)
derivativedivides \(\frac {5 \arctan \left (\tan \left (f x +e \right )\right )}{32 f a \,c^{4}}+\frac {1}{32 f a \,c^{4} \left (-i+\tan \left (f x +e \right )\right )}+\frac {3 i}{32 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {i}{16 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {1}{12 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {1}{8 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )}\) \(132\)
default \(\frac {5 \arctan \left (\tan \left (f x +e \right )\right )}{32 f a \,c^{4}}+\frac {1}{32 f a \,c^{4} \left (-i+\tan \left (f x +e \right )\right )}+\frac {3 i}{32 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {i}{16 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {1}{12 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {1}{8 f a \,c^{4} \left (i+\tan \left (f x +e \right )\right )}\) \(132\)
norman \(\frac {\frac {5 x}{32 a c}+\frac {27 \tan \left (f x +e \right )}{32 a c f}+\frac {73 \tan \left (f x +e \right )^{3}}{96 a c f}+\frac {55 \tan \left (f x +e \right )^{5}}{96 a c f}+\frac {5 \tan \left (f x +e \right )^{7}}{32 a c f}+\frac {5 x \tan \left (f x +e \right )^{2}}{8 a c}+\frac {15 x \tan \left (f x +e \right )^{4}}{16 a c}+\frac {5 x \tan \left (f x +e \right )^{6}}{8 a c}+\frac {5 x \tan \left (f x +e \right )^{8}}{32 a c}-\frac {i}{3 a c f}+\frac {i \tan \left (f x +e \right )^{2}}{6 a c f}}{\left (1+\tan \left (f x +e \right )^{2}\right )^{4} c^{3}}\) \(201\)

Input:

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

Output:

5/32*x/a/c^4-1/256*I/a/c^4/f*exp(8*I*(f*x+e))-5/192*I/a/c^4/f*exp(6*I*(f*x 
+e))-5/64*I/a/c^4/f*exp(4*I*(f*x+e))-9/64*I/a/c^4/f*cos(2*f*x+2*e)+11/64/a 
/c^4/f*sin(2*f*x+2*e)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.49 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\frac {{\left (120 \, f x e^{\left (2 i \, f x + 2 i \, e\right )} - 3 i \, e^{\left (10 i \, f x + 10 i \, e\right )} - 20 i \, e^{\left (8 i \, f x + 8 i \, e\right )} - 60 i \, e^{\left (6 i \, f x + 6 i \, e\right )} - 120 i \, e^{\left (4 i \, f x + 4 i \, e\right )} + 12 i\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{768 \, a c^{4} f} \] Input:

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")
 

Output:

1/768*(120*f*x*e^(2*I*f*x + 2*I*e) - 3*I*e^(10*I*f*x + 10*I*e) - 20*I*e^(8 
*I*f*x + 8*I*e) - 60*I*e^(6*I*f*x + 6*I*e) - 120*I*e^(4*I*f*x + 4*I*e) + 1 
2*I)*e^(-2*I*f*x - 2*I*e)/(a*c^4*f)
                                                                                    
                                                                                    
 

Sympy [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.52 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\begin {cases} \frac {\left (- 25165824 i a^{4} c^{16} f^{4} e^{10 i e} e^{8 i f x} - 167772160 i a^{4} c^{16} f^{4} e^{8 i e} e^{6 i f x} - 503316480 i a^{4} c^{16} f^{4} e^{6 i e} e^{4 i f x} - 1006632960 i a^{4} c^{16} f^{4} e^{4 i e} e^{2 i f x} + 100663296 i a^{4} c^{16} f^{4} e^{- 2 i f x}\right ) e^{- 2 i e}}{6442450944 a^{5} c^{20} f^{5}} & \text {for}\: a^{5} c^{20} f^{5} e^{2 i e} \neq 0 \\x \left (\frac {\left (e^{10 i e} + 5 e^{8 i e} + 10 e^{6 i e} + 10 e^{4 i e} + 5 e^{2 i e} + 1\right ) e^{- 2 i e}}{32 a c^{4}} - \frac {5}{32 a c^{4}}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{32 a c^{4}} \] Input:

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))**4,x)
 

Output:

Piecewise(((-25165824*I*a**4*c**16*f**4*exp(10*I*e)*exp(8*I*f*x) - 1677721 
60*I*a**4*c**16*f**4*exp(8*I*e)*exp(6*I*f*x) - 503316480*I*a**4*c**16*f**4 
*exp(6*I*e)*exp(4*I*f*x) - 1006632960*I*a**4*c**16*f**4*exp(4*I*e)*exp(2*I 
*f*x) + 100663296*I*a**4*c**16*f**4*exp(-2*I*f*x))*exp(-2*I*e)/(6442450944 
*a**5*c**20*f**5), Ne(a**5*c**20*f**5*exp(2*I*e), 0)), (x*((exp(10*I*e) + 
5*exp(8*I*e) + 10*exp(6*I*e) + 10*exp(4*I*e) + 5*exp(2*I*e) + 1)*exp(-2*I* 
e)/(32*a*c**4) - 5/(32*a*c**4)), True)) + 5*x/(32*a*c**4)
 

Maxima [F(-2)]

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

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 0.55 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.69 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\frac {5 i \, \log \left (\tan \left (f x + e\right ) + i\right )}{64 \, a c^{4} f} - \frac {5 i \, \log \left (\tan \left (f x + e\right ) - i\right )}{64 \, a c^{4} f} + \frac {i \, {\left (-15 i \, \tan \left (f x + e\right )^{4} + 45 \, \tan \left (f x + e\right )^{3} + 35 i \, \tan \left (f x + e\right )^{2} + 15 \, \tan \left (f x + e\right ) + 32 i\right )}}{96 \, a c^{4} f {\left (\tan \left (f x + e\right ) + i\right )}^{4} {\left (\tan \left (f x + e\right ) - i\right )}} \] Input:

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

Output:

5/64*I*log(tan(f*x + e) + I)/(a*c^4*f) - 5/64*I*log(tan(f*x + e) - I)/(a*c 
^4*f) + 1/96*I*(-15*I*tan(f*x + e)^4 + 45*tan(f*x + e)^3 + 35*I*tan(f*x + 
e)^2 + 15*tan(f*x + e) + 32*I)/(a*c^4*f*(tan(f*x + e) + I)^4*(tan(f*x + e) 
 - I))
 

Mupad [B] (verification not implemented)

Time = 2.35 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.54 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^4} \, dx=\frac {5\,x}{32\,a\,c^4}-\frac {-\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}}{32}+\frac {15\,{\mathrm {tan}\left (e+f\,x\right )}^3}{32}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,35{}\mathrm {i}}{96}+\frac {5\,\mathrm {tan}\left (e+f\,x\right )}{32}+\frac {1}{3}{}\mathrm {i}}{a\,c^4\,f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,{\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}^4} \] Input:

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

Output:

(5*x)/(32*a*c^4) - ((5*tan(e + f*x))/32 + (tan(e + f*x)^2*35i)/96 + (15*ta 
n(e + f*x)^3)/32 - (tan(e + f*x)^4*5i)/32 + 1i/3)/(a*c^4*f*(tan(e + f*x)*1 
i + 1)*(tan(e + f*x) + 1i)^4)
 

Reduce [F]

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

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

Output:

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