Integrand size = 24, antiderivative size = 114 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=-8 a^8 x+\frac {8 i a^8 \log (\cos (c+d x))}{d}+\frac {a^8 \tan (c+d x)}{d}-\frac {16 i a^{11}}{3 d (a-i a \tan (c+d x))^3}+\frac {16 i a^{10}}{d (a-i a \tan (c+d x))^2}-\frac {24 i a^9}{d (a-i a \tan (c+d x))} \] Output:
-8*a^8*x+8*I*a^8*ln(cos(d*x+c))/d+a^8*tan(d*x+c)/d-16/3*I*a^11/d/(a-I*a*ta n(d*x+c))^3+16*I*a^10/d/(a-I*a*tan(d*x+c))^2-24*I*a^9/d/(a-I*a*tan(d*x+c))
Time = 0.82 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.68 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {i a^7 \left (8 a \log (i+\tan (c+d x))+i a \tan (c+d x)+\frac {8 i a \left (-5+12 i \tan (c+d x)+9 \tan ^2(c+d x)\right )}{3 (i+\tan (c+d x))^3}\right )}{d} \] Input:
Integrate[Cos[c + d*x]^6*(a + I*a*Tan[c + d*x])^8,x]
Output:
((-I)*a^7*(8*a*Log[I + Tan[c + d*x]] + I*a*Tan[c + d*x] + (((8*I)/3)*a*(-5 + (12*I)*Tan[c + d*x] + 9*Tan[c + d*x]^2))/(I + Tan[c + d*x])^3))/d
Time = 0.29 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 49, 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 \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^8}{\sec (c+d x)^6}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^7 \int \frac {(i \tan (c+d x) a+a)^4}{(a-i a \tan (c+d x))^4}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle -\frac {i a^7 \int \left (\frac {16 a^4}{(a-i a \tan (c+d x))^4}-\frac {32 a^3}{(a-i a \tan (c+d x))^3}+\frac {24 a^2}{(a-i a \tan (c+d x))^2}-\frac {8 a}{a-i a \tan (c+d x)}+1\right )d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i a^7 \left (\frac {16 a^4}{3 (a-i a \tan (c+d x))^3}-\frac {16 a^3}{(a-i a \tan (c+d x))^2}+\frac {24 a^2}{a-i a \tan (c+d x)}+i a \tan (c+d x)+8 a \log (a-i a \tan (c+d x))\right )}{d}\) |
Input:
Int[Cos[c + d*x]^6*(a + I*a*Tan[c + d*x])^8,x]
Output:
((-I)*a^7*(8*a*Log[a - I*a*Tan[c + d*x]] + I*a*Tan[c + d*x] + (16*a^4)/(3* (a - I*a*Tan[c + d*x])^3) - (16*a^3)/(a - I*a*Tan[c + d*x])^2 + (24*a^2)/( a - I*a*Tan[c + d*x])))/d
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}, x] && IGtQ[m, 0] && IGtQ[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]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 318 vs. \(2 (105 ) = 210\).
Time = 0.78 (sec) , antiderivative size = 319, normalized size of antiderivative = 2.80
\[\frac {29 a^{8} \sin \left (d x +c \right ) \cos \left (d x +c \right )^{5}}{6 d}+\frac {32 i a^{8} \sin \left (d x +c \right )^{6}}{3 d}+\frac {a^{8} \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )}{d}-\frac {35 a^{8} \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{3}}{3 d}-\frac {233 a^{8} \sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}{24 d}+\frac {14 i a^{8} \cos \left (d x +c \right )^{4}}{3 d}+\frac {4 i a^{8} \sin \left (d x +c \right )^{2}}{d}-\frac {4 i a^{8} \cos \left (d x +c \right )^{6}}{3 d}+\frac {2 i a^{8} \sin \left (d x +c \right )^{4}}{d}-8 a^{8} x +\frac {a^{8} \sin \left (d x +c \right )^{9}}{d \cos \left (d x +c \right )}+\frac {35 a^{8} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}}{6 d}+\frac {175 a^{8} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}}{24 d}+\frac {111 a^{8} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {28 i a^{8} \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}{3 d}-\frac {8 a^{8} c}{d}+\frac {8 i a^{8} \ln \left (\cos \left (d x +c \right )\right )}{d}\]
Input:
int(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^8,x)
Output:
29/6/d*a^8*sin(d*x+c)*cos(d*x+c)^5+32/3*I/d*a^8*sin(d*x+c)^6+1/d*a^8*sin(d *x+c)^7*cos(d*x+c)-35/3/d*a^8*sin(d*x+c)^3*cos(d*x+c)^3-233/24/d*a^8*sin(d *x+c)*cos(d*x+c)^3+14/3*I/d*a^8*cos(d*x+c)^4+4*I/d*a^8*sin(d*x+c)^2-4/3*I/ d*a^8*cos(d*x+c)^6+2*I/d*a^8*sin(d*x+c)^4-8*a^8*x+1/d*a^8*sin(d*x+c)^9/cos (d*x+c)+35/6/d*a^8*cos(d*x+c)*sin(d*x+c)^5+175/24/d*a^8*cos(d*x+c)*sin(d*x +c)^3+111/8/d*a^8*cos(d*x+c)*sin(d*x+c)+28/3*I/d*a^8*sin(d*x+c)^2*cos(d*x+ c)^4-8/d*a^8*c+8*I*a^8*ln(cos(d*x+c))/d
Time = 0.09 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.99 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {2 \, {\left (i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} - 2 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 9 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} - 3 i \, a^{8} + 12 \, {\left (-i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{8}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{3 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")
Output:
-2/3*(I*a^8*e^(8*I*d*x + 8*I*c) - 2*I*a^8*e^(6*I*d*x + 6*I*c) + 6*I*a^8*e^ (4*I*d*x + 4*I*c) + 9*I*a^8*e^(2*I*d*x + 2*I*c) - 3*I*a^8 + 12*(-I*a^8*e^( 2*I*d*x + 2*I*c) - I*a^8)*log(e^(2*I*d*x + 2*I*c) + 1))/(d*e^(2*I*d*x + 2* I*c) + d)
Time = 0.42 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.51 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {2 i a^{8}}{d e^{2 i c} e^{2 i d x} + d} + \frac {8 i a^{8} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \begin {cases} \frac {- 2 i a^{8} d^{2} e^{6 i c} e^{6 i d x} + 6 i a^{8} d^{2} e^{4 i c} e^{4 i d x} - 18 i a^{8} d^{2} e^{2 i c} e^{2 i d x}}{3 d^{3}} & \text {for}\: d^{3} \neq 0 \\x \left (4 a^{8} e^{6 i c} - 8 a^{8} e^{4 i c} + 12 a^{8} e^{2 i c}\right ) & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**6*(a+I*a*tan(d*x+c))**8,x)
Output:
2*I*a**8/(d*exp(2*I*c)*exp(2*I*d*x) + d) + 8*I*a**8*log(exp(2*I*d*x) + exp (-2*I*c))/d + Piecewise(((-2*I*a**8*d**2*exp(6*I*c)*exp(6*I*d*x) + 6*I*a** 8*d**2*exp(4*I*c)*exp(4*I*d*x) - 18*I*a**8*d**2*exp(2*I*c)*exp(2*I*d*x))/( 3*d**3), Ne(d**3, 0)), (x*(4*a**8*exp(6*I*c) - 8*a**8*exp(4*I*c) + 12*a**8 *exp(2*I*c)), True))
Time = 0.11 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.28 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {24 \, {\left (d x + c\right )} a^{8} + 12 i \, a^{8} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 3 \, a^{8} \tan \left (d x + c\right ) - \frac {8 \, {\left (9 \, a^{8} \tan \left (d x + c\right )^{5} - 15 i \, a^{8} \tan \left (d x + c\right )^{4} + 4 \, a^{8} \tan \left (d x + c\right )^{3} - 12 i \, a^{8} \tan \left (d x + c\right )^{2} + 3 \, a^{8} \tan \left (d x + c\right ) - 5 i \, a^{8}\right )}}{\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1}}{3 \, d} \] Input:
integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")
Output:
-1/3*(24*(d*x + c)*a^8 + 12*I*a^8*log(tan(d*x + c)^2 + 1) - 3*a^8*tan(d*x + c) - 8*(9*a^8*tan(d*x + c)^5 - 15*I*a^8*tan(d*x + c)^4 + 4*a^8*tan(d*x + c)^3 - 12*I*a^8*tan(d*x + c)^2 + 3*a^8*tan(d*x + c) - 5*I*a^8)/(tan(d*x + c)^6 + 3*tan(d*x + c)^4 + 3*tan(d*x + c)^2 + 1))/d
Time = 0.27 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.67 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {8 i \, a^{8} \log \left (\tan \left (d x + c\right ) + i\right )}{d} + \frac {a^{8} \tan \left (d x + c\right )}{d} + \frac {8 \, {\left (9 \, a^{8} \tan \left (d x + c\right )^{2} + 12 i \, a^{8} \tan \left (d x + c\right ) - 5 \, a^{8}\right )}}{3 \, d {\left (\tan \left (d x + c\right ) + i\right )}^{3}} \] Input:
integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^8,x, algorithm="giac")
Output:
-8*I*a^8*log(tan(d*x + c) + I)/d + a^8*tan(d*x + c)/d + 8/3*(9*a^8*tan(d*x + c)^2 + 12*I*a^8*tan(d*x + c) - 5*a^8)/(d*(tan(d*x + c) + I)^3)
Time = 0.47 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.90 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^8\,\mathrm {tan}\left (c+d\,x\right )}{d}-\frac {24\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^2+a^8\,\mathrm {tan}\left (c+d\,x\right )\,32{}\mathrm {i}-\frac {40\,a^8}{3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}-\frac {a^8\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,8{}\mathrm {i}}{d} \] Input:
int(cos(c + d*x)^6*(a + a*tan(c + d*x)*1i)^8,x)
Output:
(a^8*tan(c + d*x))/d - (a^8*log(tan(c + d*x) + 1i)*8i)/d - (a^8*tan(c + d* x)*32i - (40*a^8)/3 + 24*a^8*tan(c + d*x)^2)/(d*(3*tan(c + d*x) - tan(c + d*x)^2*3i - tan(c + d*x)^3 + 1i))
Time = 0.16 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.67 \[ \int \cos ^6(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^{8} \left (-24 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) i +24 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) i +24 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) i +64 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6} i -48 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} i +24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} i -24 \cos \left (d x +c \right ) c -24 \cos \left (d x +c \right ) d x -64 \sin \left (d x +c \right )^{7}+80 \sin \left (d x +c \right )^{5}-40 \sin \left (d x +c \right )^{3}+27 \sin \left (d x +c \right )\right )}{3 \cos \left (d x +c \right ) d} \] Input:
int(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^8,x)
Output:
(a**8*( - 24*cos(c + d*x)*log(tan((c + d*x)/2)**2 + 1)*i + 24*cos(c + d*x) *log(tan((c + d*x)/2) - 1)*i + 24*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*i + 64*cos(c + d*x)*sin(c + d*x)**6*i - 48*cos(c + d*x)*sin(c + d*x)**4*i + 24*cos(c + d*x)*sin(c + d*x)**2*i - 24*cos(c + d*x)*c - 24*cos(c + d*x)*d *x - 64*sin(c + d*x)**7 + 80*sin(c + d*x)**5 - 40*sin(c + d*x)**3 + 27*sin (c + d*x)))/(3*cos(c + d*x)*d)