\(\int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [77]

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 = 24, antiderivative size = 128 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {x}{16 a^4}-\frac {3 i}{16 a^4 d (1+i \tan (c+d x))}+\frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac {\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3}+\frac {i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2} \] Output:

1/16*x/a^4-3/16*I/a^4/d/(1+I*tan(d*x+c))+1/8*I*tan(d*x+c)^4/d/(a+I*a*tan(d 
*x+c))^4+1/12*tan(d*x+c)^3/a/d/(a+I*a*tan(d*x+c))^3+1/16*I/d/(a^2+I*a^2*ta 
n(d*x+c))^2
 

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.84 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\sec ^4(c+d x) (18 i-32 i \cos (2 (c+d x))+14 i \cos (4 (c+d x))+16 \sin (2 (c+d x))+12 \arctan (\tan (c+d x)) (\cos (4 (c+d x))+i \sin (4 (c+d x)))-11 \sin (4 (c+d x)))}{192 a^4 d (-i+\tan (c+d x))^4} \] Input:

Integrate[Tan[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]
 

Output:

(Sec[c + d*x]^4*(18*I - (32*I)*Cos[2*(c + d*x)] + (14*I)*Cos[4*(c + d*x)] 
+ 16*Sin[2*(c + d*x)] + 12*ArcTan[Tan[c + d*x]]*(Cos[4*(c + d*x)] + I*Sin[ 
4*(c + d*x)]) - 11*Sin[4*(c + d*x)]))/(192*a^4*d*(-I + Tan[c + d*x])^4)
 

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.13, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3042, 4029, 3042, 4029, 3042, 4023, 3042, 4009, 24}

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 {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (c+d x)^4}{(a+i a \tan (c+d x))^4}dx\)

\(\Big \downarrow \) 4029

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \int \frac {\tan ^3(c+d x)}{(i \tan (c+d x) a+a)^3}dx}{2 a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \int \frac {\tan (c+d x)^3}{(i \tan (c+d x) a+a)^3}dx}{2 a}\)

\(\Big \downarrow \) 4029

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \int \frac {\tan ^2(c+d x)}{(i \tan (c+d x) a+a)^2}dx}{2 a}\right )}{2 a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \int \frac {\tan (c+d x)^2}{(i \tan (c+d x) a+a)^2}dx}{2 a}\right )}{2 a}\)

\(\Big \downarrow \) 4023

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \left (\frac {\int \frac {a-2 i a \tan (c+d x)}{i \tan (c+d x) a+a}dx}{2 a^2}-\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}\right )}{2 a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \left (\frac {\int \frac {a-2 i a \tan (c+d x)}{i \tan (c+d x) a+a}dx}{2 a^2}-\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}\right )}{2 a}\)

\(\Big \downarrow \) 4009

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \left (\frac {-\frac {\int 1dx}{2}+\frac {3 i}{2 d (1+i \tan (c+d x))}}{2 a^2}-\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}\right )}{2 a}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {i \left (\frac {i \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {i \left (\frac {-\frac {x}{2}+\frac {3 i}{2 d (1+i \tan (c+d x))}}{2 a^2}-\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}\right )}{2 a}\)

Input:

Int[Tan[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]
 

Output:

((I/8)*Tan[c + d*x]^4)/(d*(a + I*a*Tan[c + d*x])^4) - ((I/2)*(((I/6)*Tan[c 
 + d*x]^3)/(d*(a + I*a*Tan[c + d*x])^3) - ((I/2)*((-1/2*x + ((3*I)/2)/(d*( 
1 + I*Tan[c + d*x])))/(2*a^2) - (I/4)/(d*(a + I*a*Tan[c + d*x])^2)))/a))/a
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

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

rule 4009
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*((a + b*Tan[e + f*x])^m/(2*a 
*f*m)), x] + Simp[(b*c + a*d)/(2*a*b)   Int[(a + b*Tan[e + f*x])^(m + 1), x 
], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2 
, 0] && LtQ[m, 0]
 

rule 4023
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^2, x_Symbol] :> Simp[(-b)*(a*c + b*d)^2*((a + b*Tan[e + f*x])^ 
m/(2*a^3*f*m)), x] + Simp[1/(2*a^2)   Int[(a + b*Tan[e + f*x])^(m + 1)*Simp 
[a*c^2 - 2*b*c*d + a*d^2 - 2*b*d^2*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, 
 c, d, e, f}, x] && NeQ[b*c - a*d, 0] && LeQ[m, -1] && EqQ[a^2 + b^2, 0]
 

rule 4029
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e 
 + f*x])^n/(2*b*f*m)), x] - Simp[(a*c - b*d)/(2*b^2)   Int[(a + b*Tan[e + f 
*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, 
f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && Eq 
Q[m + n, 0] && LeQ[m, -2^(-1)]
 
Maple [A] (verified)

Time = 0.78 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.62

method result size
risch \(\frac {x}{16 a^{4}}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{4} d}+\frac {3 i {\mathrm e}^{-4 i \left (d x +c \right )}}{32 a^{4} d}-\frac {i {\mathrm e}^{-6 i \left (d x +c \right )}}{24 a^{4} d}+\frac {i {\mathrm e}^{-8 i \left (d x +c \right )}}{128 a^{4} d}\) \(80\)
derivativedivides \(\frac {\arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {i}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {17 i}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {7}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}-\frac {15}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}\) \(95\)
default \(\frac {\arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {i}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {17 i}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {7}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}-\frac {15}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}\) \(95\)
norman \(\frac {\frac {x}{16 a}-\frac {5 \tan \left (d x +c \right )^{5}}{48 a d}-\frac {15 \tan \left (d x +c \right )^{7}}{16 a d}+\frac {x \tan \left (d x +c \right )^{2}}{4 a}+\frac {3 x \tan \left (d x +c \right )^{4}}{8 a}+\frac {x \tan \left (d x +c \right )^{6}}{4 a}+\frac {x \tan \left (d x +c \right )^{8}}{16 a}-\frac {i}{3 a d}-\frac {\tan \left (d x +c \right )}{16 a d}-\frac {11 \tan \left (d x +c \right )^{3}}{48 a d}-\frac {2 i \tan \left (d x +c \right )^{6}}{a d}-\frac {4 i \tan \left (d x +c \right )^{2}}{3 a d}-\frac {2 i \tan \left (d x +c \right )^{4}}{d a}}{\left (1+\tan \left (d x +c \right )^{2}\right )^{4} a^{3}}\) \(202\)

Input:

int(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
 

Output:

1/16*x/a^4-1/8*I/a^4/d*exp(-2*I*(d*x+c))+3/32*I/a^4/d*exp(-4*I*(d*x+c))-1/ 
24*I/a^4/d*exp(-6*I*(d*x+c))+1/128*I/a^4/d*exp(-8*I*(d*x+c))
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.51 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (24 \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 48 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 36 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 16 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{384 \, a^{4} d} \] Input:

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")
 

Output:

1/384*(24*d*x*e^(8*I*d*x + 8*I*c) - 48*I*e^(6*I*d*x + 6*I*c) + 36*I*e^(4*I 
*d*x + 4*I*c) - 16*I*e^(2*I*d*x + 2*I*c) + 3*I)*e^(-8*I*d*x - 8*I*c)/(a^4* 
d)
                                                                                    
                                                                                    
 

Sympy [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.48 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (- 98304 i a^{12} d^{3} e^{18 i c} e^{- 2 i d x} + 73728 i a^{12} d^{3} e^{16 i c} e^{- 4 i d x} - 32768 i a^{12} d^{3} e^{14 i c} e^{- 6 i d x} + 6144 i a^{12} d^{3} e^{12 i c} e^{- 8 i d x}\right ) e^{- 20 i c}}{786432 a^{16} d^{4}} & \text {for}\: a^{16} d^{4} e^{20 i c} \neq 0 \\x \left (\frac {\left (e^{8 i c} - 4 e^{6 i c} + 6 e^{4 i c} - 4 e^{2 i c} + 1\right ) e^{- 8 i c}}{16 a^{4}} - \frac {1}{16 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {x}{16 a^{4}} \] Input:

integrate(tan(d*x+c)**4/(a+I*a*tan(d*x+c))**4,x)
 

Output:

Piecewise(((-98304*I*a**12*d**3*exp(18*I*c)*exp(-2*I*d*x) + 73728*I*a**12* 
d**3*exp(16*I*c)*exp(-4*I*d*x) - 32768*I*a**12*d**3*exp(14*I*c)*exp(-6*I*d 
*x) + 6144*I*a**12*d**3*exp(12*I*c)*exp(-8*I*d*x))*exp(-20*I*c)/(786432*a* 
*16*d**4), Ne(a**16*d**4*exp(20*I*c), 0)), (x*((exp(8*I*c) - 4*exp(6*I*c) 
+ 6*exp(4*I*c) - 4*exp(2*I*c) + 1)*exp(-8*I*c)/(16*a**4) - 1/(16*a**4)), T 
rue)) + x/(16*a**4)
 

Maxima [F(-2)]

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

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^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.24 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.65 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {i \, \log \left (\tan \left (d x + c\right ) + i\right )}{32 \, a^{4} d} - \frac {i \, \log \left (\tan \left (d x + c\right ) - i\right )}{32 \, a^{4} d} - \frac {45 \, \tan \left (d x + c\right )^{3} - 84 i \, \tan \left (d x + c\right )^{2} - 61 \, \tan \left (d x + c\right ) + 16 i}{48 \, a^{4} d {\left (\tan \left (d x + c\right ) - i\right )}^{4}} \] Input:

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")
 

Output:

1/32*I*log(tan(d*x + c) + I)/(a^4*d) - 1/32*I*log(tan(d*x + c) - I)/(a^4*d 
) - 1/48*(45*tan(d*x + c)^3 - 84*I*tan(d*x + c)^2 - 61*tan(d*x + c) + 16*I 
)/(a^4*d*(tan(d*x + c) - I)^4)
 

Mupad [B] (verification not implemented)

Time = 1.03 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.46 \[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {x}{16\,a^4}+\frac {-\frac {15\,{\mathrm {tan}\left (c+d\,x\right )}^3}{16}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,7{}\mathrm {i}}{4}+\frac {61\,\mathrm {tan}\left (c+d\,x\right )}{48}-\frac {1}{3}{}\mathrm {i}}{a^4\,d\,{\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^4} \] Input:

int(tan(c + d*x)^4/(a + a*tan(c + d*x)*1i)^4,x)
 

Output:

x/(16*a^4) + ((61*tan(c + d*x))/48 + (tan(c + d*x)^2*7i)/4 - (15*tan(c + d 
*x)^3)/16 - 1i/3)/(a^4*d*(tan(c + d*x)*1i + 1)^4)
 

Reduce [F]

\[ \int \frac {\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {-16 \left (\int \frac {\tan \left (d x +c \right )^{3}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) d +24 \left (\int \frac {\tan \left (d x +c \right )^{2}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) d i +16 \left (\int \frac {\tan \left (d x +c \right )}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) d -4 \left (\int \frac {1}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) d i -\mathrm {log}\left (\tan \left (d x +c \right )^{4}-4 \tan \left (d x +c \right )^{3} i -6 \tan \left (d x +c \right )^{2}+4 \tan \left (d x +c \right ) i +1\right ) i +2 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) i}{4 a^{4} d} \] Input:

int(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x)
 

Output:

( - 16*int(tan(c + d*x)**3/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan( 
c + d*x)**2*i - 4*tan(c + d*x) + i),x)*d + 24*int(tan(c + d*x)**2/(tan(c + 
 d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i) 
,x)*d*i + 16*int(tan(c + d*x)/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*t 
an(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*d - 4*int(1/(tan(c + d*x)**4*i + 
 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*d*i - lo 
g(tan(c + d*x)**4 - 4*tan(c + d*x)**3*i - 6*tan(c + d*x)**2 + 4*tan(c + d* 
x)*i + 1)*i + 2*log(tan(c + d*x)**2 + 1)*i)/(4*a**4*d)