Integrand size = 24, antiderivative size = 169 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {3 x}{32 a^4}+\frac {i a}{20 d (a+i a \tan (c+d x))^5}+\frac {i}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{16 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}-\frac {i}{64 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {5 i}{64 d \left (a^4+i a^4 \tan (c+d x)\right )} \] Output:
3/32*x/a^4+1/20*I*a/d/(a+I*a*tan(d*x+c))^5+1/16*I/d/(a+I*a*tan(d*x+c))^4+1 /16*I/a/d/(a+I*a*tan(d*x+c))^3+1/16*I/d/(a^2+I*a^2*tan(d*x+c))^2-1/64*I/d/ (a^4-I*a^4*tan(d*x+c))+5/64*I/d/(a^4+I*a^4*tan(d*x+c))
Time = 0.26 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.84 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\sec ^6(c+d x) (50 i+100 i \cos (2 (c+d x))+46 i \cos (4 (c+d x))-4 i \cos (6 (c+d x))-50 \sin (2 (c+d x))+60 \arctan (\tan (c+d x)) (\cos (4 (c+d x))+i \sin (4 (c+d x)))-31 \sin (4 (c+d x))+6 \sin (6 (c+d x)))}{640 a^4 d (-i+\tan (c+d x))^5 (i+\tan (c+d x))} \] Input:
Integrate[Cos[c + d*x]^2/(a + I*a*Tan[c + d*x])^4,x]
Output:
(Sec[c + d*x]^6*(50*I + (100*I)*Cos[2*(c + d*x)] + (46*I)*Cos[4*(c + d*x)] - (4*I)*Cos[6*(c + d*x)] - 50*Sin[2*(c + d*x)] + 60*ArcTan[Tan[c + d*x]]* (Cos[4*(c + d*x)] + I*Sin[4*(c + d*x)]) - 31*Sin[4*(c + d*x)] + 6*Sin[6*(c + d*x)]))/(640*a^4*d*(-I + Tan[c + d*x])^5*(I + Tan[c + d*x]))
Time = 0.32 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.94, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {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 {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^2 (a+i a \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^3 \int \frac {1}{(a-i a \tan (c+d x))^2 (i \tan (c+d x) a+a)^6}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle -\frac {i a^3 \int \left (\frac {1}{64 a^6 (a-i a \tan (c+d x))^2}+\frac {5}{64 a^6 (i \tan (c+d x) a+a)^2}+\frac {1}{8 a^5 (i \tan (c+d x) a+a)^3}+\frac {3}{16 a^4 (i \tan (c+d x) a+a)^4}+\frac {1}{4 a^3 (i \tan (c+d x) a+a)^5}+\frac {1}{4 a^2 (i \tan (c+d x) a+a)^6}+\frac {3}{32 a^6 \left (\tan ^2(c+d x) a^2+a^2\right )}\right )d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i a^3 \left (\frac {3 i \arctan (\tan (c+d x))}{32 a^7}+\frac {1}{64 a^6 (a-i a \tan (c+d x))}-\frac {5}{64 a^6 (a+i a \tan (c+d x))}-\frac {1}{16 a^5 (a+i a \tan (c+d x))^2}-\frac {1}{16 a^4 (a+i a \tan (c+d x))^3}-\frac {1}{16 a^3 (a+i a \tan (c+d x))^4}-\frac {1}{20 a^2 (a+i a \tan (c+d x))^5}\right )}{d}\) |
Input:
Int[Cos[c + d*x]^2/(a + I*a*Tan[c + d*x])^4,x]
Output:
((-I)*a^3*((((3*I)/32)*ArcTan[Tan[c + d*x]])/a^7 + 1/(64*a^6*(a - I*a*Tan[ c + d*x])) - 1/(20*a^2*(a + I*a*Tan[c + d*x])^5) - 1/(16*a^3*(a + I*a*Tan[ c + d*x])^4) - 1/(16*a^4*(a + I*a*Tan[c + d*x])^3) - 1/(16*a^5*(a + I*a*Ta n[c + d*x])^2) - 5/(64*a^6*(a + I*a*Tan[c + d*x]))))/d
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])
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]
Time = 1.00 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.68
method | result | size |
derivativedivides | \(\frac {\frac {3 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{64 \tan \left (d x +c \right )+64 i}-\frac {3 i \ln \left (-i+\tan \left (d x +c \right )\right )}{64}+\frac {i}{16 \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {i}{16 \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {1}{20 \left (-i+\tan \left (d x +c \right )\right )^{5}}-\frac {1}{16 \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {5}{64 \left (-i+\tan \left (d x +c \right )\right )}}{d \,a^{4}}\) | \(115\) |
default | \(\frac {\frac {3 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{64 \tan \left (d x +c \right )+64 i}-\frac {3 i \ln \left (-i+\tan \left (d x +c \right )\right )}{64}+\frac {i}{16 \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {i}{16 \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {1}{20 \left (-i+\tan \left (d x +c \right )\right )^{5}}-\frac {1}{16 \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {5}{64 \left (-i+\tan \left (d x +c \right )\right )}}{d \,a^{4}}\) | \(115\) |
risch | \(\frac {3 x}{32 a^{4}}+\frac {5 i {\mathrm e}^{-4 i \left (d x +c \right )}}{64 a^{4} d}+\frac {5 i {\mathrm e}^{-6 i \left (d x +c \right )}}{128 a^{4} d}+\frac {3 i {\mathrm e}^{-8 i \left (d x +c \right )}}{256 a^{4} d}+\frac {i {\mathrm e}^{-10 i \left (d x +c \right )}}{640 a^{4} d}+\frac {7 i \cos \left (2 d x +2 c \right )}{64 a^{4} d}+\frac {\sin \left (2 d x +2 c \right )}{8 a^{4} d}\) | \(115\) |
Input:
int(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
1/d/a^4*(3/64*I*ln(tan(d*x+c)+I)+1/64/(tan(d*x+c)+I)-3/64*I*ln(-I+tan(d*x+ c))+1/16*I/(-I+tan(d*x+c))^4-1/16*I/(-I+tan(d*x+c))^2+1/20/(-I+tan(d*x+c)) ^5-1/16/(-I+tan(d*x+c))^3+5/64/(-I+tan(d*x+c)))
Time = 0.08 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.51 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (120 \, d x e^{\left (10 i \, d x + 10 i \, c\right )} - 10 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 150 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 100 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 50 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 15 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i\right )} e^{\left (-10 i \, d x - 10 i \, c\right )}}{1280 \, a^{4} d} \] Input:
integrate(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")
Output:
1/1280*(120*d*x*e^(10*I*d*x + 10*I*c) - 10*I*e^(12*I*d*x + 12*I*c) + 150*I *e^(8*I*d*x + 8*I*c) + 100*I*e^(6*I*d*x + 6*I*c) + 50*I*e^(4*I*d*x + 4*I*c ) + 15*I*e^(2*I*d*x + 2*I*c) + 2*I)*e^(-10*I*d*x - 10*I*c)/(a^4*d)
Time = 0.32 (sec) , antiderivative size = 258, normalized size of antiderivative = 1.53 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (- 171798691840 i a^{20} d^{5} e^{32 i c} e^{2 i d x} + 2576980377600 i a^{20} d^{5} e^{28 i c} e^{- 2 i d x} + 1717986918400 i a^{20} d^{5} e^{26 i c} e^{- 4 i d x} + 858993459200 i a^{20} d^{5} e^{24 i c} e^{- 6 i d x} + 257698037760 i a^{20} d^{5} e^{22 i c} e^{- 8 i d x} + 34359738368 i a^{20} d^{5} e^{20 i c} e^{- 10 i d x}\right ) e^{- 30 i c}}{21990232555520 a^{24} d^{6}} & \text {for}\: a^{24} d^{6} e^{30 i c} \neq 0 \\x \left (\frac {\left (e^{12 i c} + 6 e^{10 i c} + 15 e^{8 i c} + 20 e^{6 i c} + 15 e^{4 i c} + 6 e^{2 i c} + 1\right ) e^{- 10 i c}}{64 a^{4}} - \frac {3}{32 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{32 a^{4}} \] Input:
integrate(cos(d*x+c)**2/(a+I*a*tan(d*x+c))**4,x)
Output:
Piecewise(((-171798691840*I*a**20*d**5*exp(32*I*c)*exp(2*I*d*x) + 25769803 77600*I*a**20*d**5*exp(28*I*c)*exp(-2*I*d*x) + 1717986918400*I*a**20*d**5* exp(26*I*c)*exp(-4*I*d*x) + 858993459200*I*a**20*d**5*exp(24*I*c)*exp(-6*I *d*x) + 257698037760*I*a**20*d**5*exp(22*I*c)*exp(-8*I*d*x) + 34359738368* I*a**20*d**5*exp(20*I*c)*exp(-10*I*d*x))*exp(-30*I*c)/(21990232555520*a**2 4*d**6), Ne(a**24*d**6*exp(30*I*c), 0)), (x*((exp(12*I*c) + 6*exp(10*I*c) + 15*exp(8*I*c) + 20*exp(6*I*c) + 15*exp(4*I*c) + 6*exp(2*I*c) + 1)*exp(-1 0*I*c)/(64*a**4) - 3/(32*a**4)), True)) + 3*x/(32*a**4)
Exception generated. \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(d*x+c)^2/(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.
Time = 0.23 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.67 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {3 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{64 \, a^{4} d} - \frac {3 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{64 \, a^{4} d} + \frac {15 \, \tan \left (d x + c\right )^{5} - 60 i \, \tan \left (d x + c\right )^{4} - 80 \, \tan \left (d x + c\right )^{3} + 20 i \, \tan \left (d x + c\right )^{2} - 47 \, \tan \left (d x + c\right ) + 48 i}{160 \, a^{4} d {\left (\tan \left (d x + c\right ) + i\right )} {\left (\tan \left (d x + c\right ) - i\right )}^{5}} \] Input:
integrate(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")
Output:
3/64*I*log(tan(d*x + c) + I)/(a^4*d) - 3/64*I*log(tan(d*x + c) - I)/(a^4*d ) + 1/160*(15*tan(d*x + c)^5 - 60*I*tan(d*x + c)^4 - 80*tan(d*x + c)^3 + 2 0*I*tan(d*x + c)^2 - 47*tan(d*x + c) + 48*I)/(a^4*d*(tan(d*x + c) + I)*(ta n(d*x + c) - I)^5)
Time = 1.25 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.53 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {3\,x}{32\,a^4}-\frac {-\frac {3\,{\mathrm {tan}\left (c+d\,x\right )}^5}{32}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,3{}\mathrm {i}}{8}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{2}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{8}+\frac {47\,\mathrm {tan}\left (c+d\,x\right )}{160}-\frac {3}{10}{}\mathrm {i}}{a^4\,d\,{\left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )}^5\,\left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \] Input:
int(cos(c + d*x)^2/(a + a*tan(c + d*x)*1i)^4,x)
Output:
(3*x)/(32*a^4) - ((47*tan(c + d*x))/160 - (tan(c + d*x)^2*1i)/8 + tan(c + d*x)^3/2 + (tan(c + d*x)^4*3i)/8 - (3*tan(c + d*x)^5)/32 - 3i/10)/(a^4*d*( tan(c + d*x) - 1i)^5*(tan(c + d*x) + 1i))
\[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\int \frac {\cos \left (d x +c \right )^{2}}{\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}d x}{a^{4}} \] Input:
int(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^4,x)
Output:
int(cos(c + d*x)**2/(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),x)/a**4