Integrand size = 24, antiderivative size = 287 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {5 a^8 x}{512}-\frac {i a^{17}}{36 d (a-i a \tan (c+d x))^9}-\frac {i a^{16}}{32 d (a-i a \tan (c+d x))^8}-\frac {3 i a^{15}}{112 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{64 d (a-i a \tan (c+d x))^5}-\frac {3 i a^{12}}{256 d (a-i a \tan (c+d x))^4}-\frac {7 i a^{11}}{768 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{128 d (a-i a \tan (c+d x))^2}-\frac {9 i a^{19}}{1024 d \left (a^{11}-i a^{11} \tan (c+d x)\right )}+\frac {i a^{19}}{1024 d \left (a^{11}+i a^{11} \tan (c+d x)\right )} \] Output:
5/512*a^8*x-1/36*I*a^17/d/(a-I*a*tan(d*x+c))^9-1/32*I*a^16/d/(a-I*a*tan(d* x+c))^8-3/112*I*a^15/d/(a-I*a*tan(d*x+c))^7-1/48*I*a^14/d/(a-I*a*tan(d*x+c ))^6-1/64*I*a^13/d/(a-I*a*tan(d*x+c))^5-3/256*I*a^12/d/(a-I*a*tan(d*x+c))^ 4-7/768*I*a^11/d/(a-I*a*tan(d*x+c))^3-1/128*I*a^10/d/(a-I*a*tan(d*x+c))^2- 9/1024*I*a^19/d/(a^11-I*a^11*tan(d*x+c))+1/1024*I*a^19/d/(a^11+I*a^11*tan( d*x+c))
Time = 1.07 (sec) , antiderivative size = 186, normalized size of antiderivative = 0.65 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {i a^8 \sec ^{10}(c+d x) (7938+14112 \cos (2 (c+d x))+10080 \cos (4 (c+d x))+6480 \cos (6 (c+d x))+2462 \cos (8 (c+d x))-112 \cos (10 (c+d x))-3528 i \sin (2 (c+d x))-5040 i \sin (4 (c+d x))-4860 i \sin (6 (c+d x))-2147 i \sin (8 (c+d x))+2520 \arctan (\tan (c+d x)) (i \cos (8 (c+d x))+\sin (8 (c+d x)))+140 i \sin (10 (c+d x)))}{258048 d (-i+\tan (c+d x)) (i+\tan (c+d x))^9} \] Input:
Integrate[Cos[c + d*x]^18*(a + I*a*Tan[c + d*x])^8,x]
Output:
((-1/258048*I)*a^8*Sec[c + d*x]^10*(7938 + 14112*Cos[2*(c + d*x)] + 10080* Cos[4*(c + d*x)] + 6480*Cos[6*(c + d*x)] + 2462*Cos[8*(c + d*x)] - 112*Cos [10*(c + d*x)] - (3528*I)*Sin[2*(c + d*x)] - (5040*I)*Sin[4*(c + d*x)] - ( 4860*I)*Sin[6*(c + d*x)] - (2147*I)*Sin[8*(c + d*x)] + 2520*ArcTan[Tan[c + d*x]]*(I*Cos[8*(c + d*x)] + Sin[8*(c + d*x)]) + (140*I)*Sin[10*(c + d*x)] ))/(d*(-I + Tan[c + d*x])*(I + Tan[c + d*x])^9)
Time = 0.41 (sec) , antiderivative size = 247, normalized size of antiderivative = 0.86, 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 \cos ^{18}(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)^{18}}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^{19} \int \frac {1}{(a-i a \tan (c+d x))^{10} (i \tan (c+d x) a+a)^2}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle -\frac {i a^{19} \int \left (\frac {9}{1024 a^{10} (a-i a \tan (c+d x))^2}+\frac {1}{1024 a^{10} (i \tan (c+d x) a+a)^2}+\frac {1}{64 a^9 (a-i a \tan (c+d x))^3}+\frac {7}{256 a^8 (a-i a \tan (c+d x))^4}+\frac {3}{64 a^7 (a-i a \tan (c+d x))^5}+\frac {5}{64 a^6 (a-i a \tan (c+d x))^6}+\frac {1}{8 a^5 (a-i a \tan (c+d x))^7}+\frac {3}{16 a^4 (a-i a \tan (c+d x))^8}+\frac {1}{4 a^3 (a-i a \tan (c+d x))^9}+\frac {1}{4 a^2 (a-i a \tan (c+d x))^{10}}+\frac {5}{512 a^{10} \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^{19} \left (\frac {5 i \arctan (\tan (c+d x))}{512 a^{11}}+\frac {9}{1024 a^{10} (a-i a \tan (c+d x))}-\frac {1}{1024 a^{10} (a+i a \tan (c+d x))}+\frac {1}{128 a^9 (a-i a \tan (c+d x))^2}+\frac {7}{768 a^8 (a-i a \tan (c+d x))^3}+\frac {3}{256 a^7 (a-i a \tan (c+d x))^4}+\frac {1}{64 a^6 (a-i a \tan (c+d x))^5}+\frac {1}{48 a^5 (a-i a \tan (c+d x))^6}+\frac {3}{112 a^4 (a-i a \tan (c+d x))^7}+\frac {1}{32 a^3 (a-i a \tan (c+d x))^8}+\frac {1}{36 a^2 (a-i a \tan (c+d x))^9}\right )}{d}\) |
Input:
Int[Cos[c + d*x]^18*(a + I*a*Tan[c + d*x])^8,x]
Output:
((-I)*a^19*((((5*I)/512)*ArcTan[Tan[c + d*x]])/a^11 + 1/(36*a^2*(a - I*a*T an[c + d*x])^9) + 1/(32*a^3*(a - I*a*Tan[c + d*x])^8) + 3/(112*a^4*(a - I* a*Tan[c + d*x])^7) + 1/(48*a^5*(a - I*a*Tan[c + d*x])^6) + 1/(64*a^6*(a - I*a*Tan[c + d*x])^5) + 3/(256*a^7*(a - I*a*Tan[c + d*x])^4) + 7/(768*a^8*( a - I*a*Tan[c + d*x])^3) + 1/(128*a^9*(a - I*a*Tan[c + d*x])^2) + 9/(1024* a^10*(a - I*a*Tan[c + d*x])) - 1/(1024*a^10*(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]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 788 vs. \(2 (245 ) = 490\).
Time = 1.47 (sec) , antiderivative size = 789, normalized size of antiderivative = 2.75
\[\text {Expression too large to display}\]
Input:
int(cos(d*x+c)^18*(a+I*a*tan(d*x+c))^8,x)
Output:
1/d*(a^8*(-1/18*sin(d*x+c)^7*cos(d*x+c)^11-7/288*sin(d*x+c)^5*cos(d*x+c)^1 1-5/576*sin(d*x+c)^3*cos(d*x+c)^11-5/2304*sin(d*x+c)*cos(d*x+c)^11+1/4608* (cos(d*x+c)^9+9/8*cos(d*x+c)^7+21/16*cos(d*x+c)^5+105/64*cos(d*x+c)^3+315/ 128*cos(d*x+c))*sin(d*x+c)+35/65536*d*x+35/65536*c)-8*I*a^8*(-1/18*sin(d*x +c)^6*cos(d*x+c)^12-1/48*cos(d*x+c)^12*sin(d*x+c)^4-1/168*cos(d*x+c)^12*si n(d*x+c)^2-1/1008*cos(d*x+c)^12)-28*a^8*(-1/18*sin(d*x+c)^5*cos(d*x+c)^13- 5/288*sin(d*x+c)^3*cos(d*x+c)^13-5/1344*sin(d*x+c)*cos(d*x+c)^13+5/16128*( cos(d*x+c)^11+11/10*cos(d*x+c)^9+99/80*cos(d*x+c)^7+231/160*cos(d*x+c)^5+2 31/128*cos(d*x+c)^3+693/256*cos(d*x+c))*sin(d*x+c)+55/65536*d*x+55/65536*c )+56*I*a^8*(-1/18*sin(d*x+c)^4*cos(d*x+c)^14-1/72*cos(d*x+c)^14*sin(d*x+c) ^2-1/504*cos(d*x+c)^14)+70*a^8*(-1/18*sin(d*x+c)^3*cos(d*x+c)^15-1/96*sin( d*x+c)*cos(d*x+c)^15+1/1344*(cos(d*x+c)^13+13/12*cos(d*x+c)^11+143/120*cos (d*x+c)^9+429/320*cos(d*x+c)^7+1001/640*cos(d*x+c)^5+1001/512*cos(d*x+c)^3 +3003/1024*cos(d*x+c))*sin(d*x+c)+143/65536*d*x+143/65536*c)-56*I*a^8*(-1/ 18*sin(d*x+c)^2*cos(d*x+c)^16-1/144*cos(d*x+c)^16)-28*a^8*(-1/18*sin(d*x+c )*cos(d*x+c)^17+1/288*(cos(d*x+c)^15+15/14*cos(d*x+c)^13+65/56*cos(d*x+c)^ 11+143/112*cos(d*x+c)^9+1287/896*cos(d*x+c)^7+429/256*cos(d*x+c)^5+2145/10 24*cos(d*x+c)^3+6435/2048*cos(d*x+c))*sin(d*x+c)+715/65536*d*x+715/65536*c )-4/9*I*a^8*cos(d*x+c)^18+a^8*(1/18*(cos(d*x+c)^17+17/16*cos(d*x+c)^15+255 /224*cos(d*x+c)^13+1105/896*cos(d*x+c)^11+2431/1792*cos(d*x+c)^9+21879/...
Time = 0.17 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.56 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {{\left (5040 \, a^{8} d x e^{\left (2 i \, d x + 2 i \, c\right )} - 28 i \, a^{8} e^{\left (20 i \, d x + 20 i \, c\right )} - 315 i \, a^{8} e^{\left (18 i \, d x + 18 i \, c\right )} - 1620 i \, a^{8} e^{\left (16 i \, d x + 16 i \, c\right )} - 5040 i \, a^{8} e^{\left (14 i \, d x + 14 i \, c\right )} - 10584 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 15876 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} - 17640 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} - 15120 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} - 11340 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 252 i \, a^{8}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{516096 \, d} \] Input:
integrate(cos(d*x+c)^18*(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")
Output:
1/516096*(5040*a^8*d*x*e^(2*I*d*x + 2*I*c) - 28*I*a^8*e^(20*I*d*x + 20*I*c ) - 315*I*a^8*e^(18*I*d*x + 18*I*c) - 1620*I*a^8*e^(16*I*d*x + 16*I*c) - 5 040*I*a^8*e^(14*I*d*x + 14*I*c) - 10584*I*a^8*e^(12*I*d*x + 12*I*c) - 1587 6*I*a^8*e^(10*I*d*x + 10*I*c) - 17640*I*a^8*e^(8*I*d*x + 8*I*c) - 15120*I* a^8*e^(6*I*d*x + 6*I*c) - 11340*I*a^8*e^(4*I*d*x + 4*I*c) + 252*I*a^8)*e^( -2*I*d*x - 2*I*c)/d
Time = 0.84 (sec) , antiderivative size = 413, normalized size of antiderivative = 1.44 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {5 a^{8} x}{512} + \begin {cases} \frac {\left (- 277298568799925181577403826176 i a^{8} d^{9} e^{20 i c} e^{18 i d x} - 3119608898999158292745793044480 i a^{8} d^{9} e^{18 i c} e^{16 i d x} - 16043702909138528362692649943040 i a^{8} d^{9} e^{16 i c} e^{14 i d x} - 49913742383986532683932688711680 i a^{8} d^{9} e^{14 i c} e^{12 i d x} - 104818859006371718636258646294528 i a^{8} d^{9} e^{12 i c} e^{10 i d x} - 157228288509557577954387969441792 i a^{8} d^{9} e^{10 i c} e^{8 i d x} - 174698098343952864393764410490880 i a^{8} d^{9} e^{8 i c} e^{6 i d x} - 149741227151959598051798066135040 i a^{8} d^{9} e^{6 i c} e^{4 i d x} - 112305920363969698538848549601280 i a^{8} d^{9} e^{4 i c} e^{2 i d x} + 2495687119199326634196634435584 i a^{8} d^{9} e^{- 2 i d x}\right ) e^{- 2 i c}}{5111167220120220946834707324076032 d^{10}} & \text {for}\: d^{10} e^{2 i c} \neq 0 \\x \left (- \frac {5 a^{8}}{512} + \frac {\left (a^{8} e^{20 i c} + 10 a^{8} e^{18 i c} + 45 a^{8} e^{16 i c} + 120 a^{8} e^{14 i c} + 210 a^{8} e^{12 i c} + 252 a^{8} e^{10 i c} + 210 a^{8} e^{8 i c} + 120 a^{8} e^{6 i c} + 45 a^{8} e^{4 i c} + 10 a^{8} e^{2 i c} + a^{8}\right ) e^{- 2 i c}}{1024}\right ) & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**18*(a+I*a*tan(d*x+c))**8,x)
Output:
5*a**8*x/512 + Piecewise(((-277298568799925181577403826176*I*a**8*d**9*exp (20*I*c)*exp(18*I*d*x) - 3119608898999158292745793044480*I*a**8*d**9*exp(1 8*I*c)*exp(16*I*d*x) - 16043702909138528362692649943040*I*a**8*d**9*exp(16 *I*c)*exp(14*I*d*x) - 49913742383986532683932688711680*I*a**8*d**9*exp(14* I*c)*exp(12*I*d*x) - 104818859006371718636258646294528*I*a**8*d**9*exp(12* I*c)*exp(10*I*d*x) - 157228288509557577954387969441792*I*a**8*d**9*exp(10* I*c)*exp(8*I*d*x) - 174698098343952864393764410490880*I*a**8*d**9*exp(8*I* c)*exp(6*I*d*x) - 149741227151959598051798066135040*I*a**8*d**9*exp(6*I*c) *exp(4*I*d*x) - 112305920363969698538848549601280*I*a**8*d**9*exp(4*I*c)*e xp(2*I*d*x) + 2495687119199326634196634435584*I*a**8*d**9*exp(-2*I*d*x))*e xp(-2*I*c)/(5111167220120220946834707324076032*d**10), Ne(d**10*exp(2*I*c) , 0)), (x*(-5*a**8/512 + (a**8*exp(20*I*c) + 10*a**8*exp(18*I*c) + 45*a**8 *exp(16*I*c) + 120*a**8*exp(14*I*c) + 210*a**8*exp(12*I*c) + 252*a**8*exp( 10*I*c) + 210*a**8*exp(8*I*c) + 120*a**8*exp(6*I*c) + 45*a**8*exp(4*I*c) + 10*a**8*exp(2*I*c) + a**8)*exp(-2*I*c)/1024), True))
Time = 0.14 (sec) , antiderivative size = 269, normalized size of antiderivative = 0.94 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {315 \, {\left (d x + c\right )} a^{8} + \frac {315 \, a^{8} \tan \left (d x + c\right )^{17} + 2730 \, a^{8} \tan \left (d x + c\right )^{15} + 10458 \, a^{8} \tan \left (d x + c\right )^{13} + 23202 \, a^{8} \tan \left (d x + c\right )^{11} + 32768 \, a^{8} \tan \left (d x + c\right )^{9} + 27486 \, a^{8} \tan \left (d x + c\right )^{7} + 21504 i \, a^{8} \tan \left (d x + c\right )^{6} + 86310 \, a^{8} \tan \left (d x + c\right )^{5} - 119808 i \, a^{8} \tan \left (d x + c\right )^{4} - 121002 \, a^{8} \tan \left (d x + c\right )^{3} + 82944 i \, a^{8} \tan \left (d x + c\right )^{2} + 31941 \, a^{8} \tan \left (d x + c\right ) - 5120 i \, a^{8}}{\tan \left (d x + c\right )^{18} + 9 \, \tan \left (d x + c\right )^{16} + 36 \, \tan \left (d x + c\right )^{14} + 84 \, \tan \left (d x + c\right )^{12} + 126 \, \tan \left (d x + c\right )^{10} + 126 \, \tan \left (d x + c\right )^{8} + 84 \, \tan \left (d x + c\right )^{6} + 36 \, \tan \left (d x + c\right )^{4} + 9 \, \tan \left (d x + c\right )^{2} + 1}}{32256 \, d} \] Input:
integrate(cos(d*x+c)^18*(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")
Output:
1/32256*(315*(d*x + c)*a^8 + (315*a^8*tan(d*x + c)^17 + 2730*a^8*tan(d*x + c)^15 + 10458*a^8*tan(d*x + c)^13 + 23202*a^8*tan(d*x + c)^11 + 32768*a^8 *tan(d*x + c)^9 + 27486*a^8*tan(d*x + c)^7 + 21504*I*a^8*tan(d*x + c)^6 + 86310*a^8*tan(d*x + c)^5 - 119808*I*a^8*tan(d*x + c)^4 - 121002*a^8*tan(d* x + c)^3 + 82944*I*a^8*tan(d*x + c)^2 + 31941*a^8*tan(d*x + c) - 5120*I*a^ 8)/(tan(d*x + c)^18 + 9*tan(d*x + c)^16 + 36*tan(d*x + c)^14 + 84*tan(d*x + c)^12 + 126*tan(d*x + c)^10 + 126*tan(d*x + c)^8 + 84*tan(d*x + c)^6 + 3 6*tan(d*x + c)^4 + 9*tan(d*x + c)^2 + 1))/d
Time = 0.36 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.52 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {1}{64512} \, a^{8} {\left (-\frac {315 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{d} + \frac {315 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{d} - \frac {2 \, {\left (315 \, \tan \left (d x + c\right )^{9} + 2520 i \, \tan \left (d x + c\right )^{8} - 8610 \, \tan \left (d x + c\right )^{7} - 15960 i \, \tan \left (d x + c\right )^{6} + 16128 \, \tan \left (d x + c\right )^{5} + 5544 i \, \tan \left (d x + c\right )^{4} + 7074 \, \tan \left (d x + c\right )^{3} + 11736 i \, \tan \left (d x + c\right )^{2} - 9019 \, \tan \left (d x + c\right ) - 5120 i\right )}}{d {\left (\tan \left (d x + c\right ) + i\right )}^{9} {\left (\tan \left (d x + c\right ) - i\right )}}\right )} \] Input:
integrate(cos(d*x+c)^18*(a+I*a*tan(d*x+c))^8,x, algorithm="giac")
Output:
-1/64512*a^8*(-315*I*log(tan(d*x + c) + I)/d + 315*I*log(tan(d*x + c) - I) /d - 2*(315*tan(d*x + c)^9 + 2520*I*tan(d*x + c)^8 - 8610*tan(d*x + c)^7 - 15960*I*tan(d*x + c)^6 + 16128*tan(d*x + c)^5 + 5544*I*tan(d*x + c)^4 + 7 074*tan(d*x + c)^3 + 11736*I*tan(d*x + c)^2 - 9019*tan(d*x + c) - 5120*I)/ (d*(tan(d*x + c) + I)^9*(tan(d*x + c) - I)))
Time = 2.32 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.80 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {5\,a^8\,x}{512}+\frac {\frac {5\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^9}{512}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^8\,5{}\mathrm {i}}{64}-\frac {205\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^7}{768}-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^6\,95{}\mathrm {i}}{192}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^5}{2}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^4\,11{}\mathrm {i}}{64}+\frac {393\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^3}{1792}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^2\,163{}\mathrm {i}}{448}-\frac {9019\,a^8\,\mathrm {tan}\left (c+d\,x\right )}{32256}-\frac {a^8\,10{}\mathrm {i}}{63}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^{10}+{\mathrm {tan}\left (c+d\,x\right )}^9\,8{}\mathrm {i}-27\,{\mathrm {tan}\left (c+d\,x\right )}^8-{\mathrm {tan}\left (c+d\,x\right )}^7\,48{}\mathrm {i}+42\,{\mathrm {tan}\left (c+d\,x\right )}^6+42\,{\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,48{}\mathrm {i}-27\,{\mathrm {tan}\left (c+d\,x\right )}^2-\mathrm {tan}\left (c+d\,x\right )\,8{}\mathrm {i}+1\right )} \] Input:
int(cos(c + d*x)^18*(a + a*tan(c + d*x)*1i)^8,x)
Output:
(5*a^8*x)/512 + ((a^8*tan(c + d*x)^2*163i)/448 - (a^8*10i)/63 - (9019*a^8* tan(c + d*x))/32256 + (393*a^8*tan(c + d*x)^3)/1792 + (a^8*tan(c + d*x)^4* 11i)/64 + (a^8*tan(c + d*x)^5)/2 - (a^8*tan(c + d*x)^6*95i)/192 - (205*a^8 *tan(c + d*x)^7)/768 + (a^8*tan(c + d*x)^8*5i)/64 + (5*a^8*tan(c + d*x)^9) /512)/(d*(tan(c + d*x)^3*48i - 27*tan(c + d*x)^2 - tan(c + d*x)*8i + 42*ta n(c + d*x)^4 + 42*tan(c + d*x)^6 - tan(c + d*x)^7*48i - 27*tan(c + d*x)^8 + tan(c + d*x)^9*8i + tan(c + d*x)^10 + 1))
Time = 0.16 (sec) , antiderivative size = 254, normalized size of antiderivative = 0.89 \[ \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^{8} \left (229376 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{17}-1562624 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{15}+4592640 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{13}-7582976 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{11}+7660928 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{9}-4820112 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}+1827672 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-376530 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+31941 \cos \left (d x +c \right ) \sin \left (d x +c \right )+229376 \sin \left (d x +c \right )^{18} i -1677312 \sin \left (d x +c \right )^{16} i +5345280 \sin \left (d x +c \right )^{14} i -9698304 \sin \left (d x +c \right )^{12} i +10967040 \sin \left (d x +c \right )^{10} i -7934976 \sin \left (d x +c \right )^{8} i +3612672 \sin \left (d x +c \right )^{6} i -967680 \sin \left (d x +c \right )^{4} i +129024 \sin \left (d x +c \right )^{2} i +315 d x \right )}{32256 d} \] Input:
int(cos(d*x+c)^18*(a+I*a*tan(d*x+c))^8,x)
Output:
(a**8*(229376*cos(c + d*x)*sin(c + d*x)**17 - 1562624*cos(c + d*x)*sin(c + d*x)**15 + 4592640*cos(c + d*x)*sin(c + d*x)**13 - 7582976*cos(c + d*x)*s in(c + d*x)**11 + 7660928*cos(c + d*x)*sin(c + d*x)**9 - 4820112*cos(c + d *x)*sin(c + d*x)**7 + 1827672*cos(c + d*x)*sin(c + d*x)**5 - 376530*cos(c + d*x)*sin(c + d*x)**3 + 31941*cos(c + d*x)*sin(c + d*x) + 229376*sin(c + d*x)**18*i - 1677312*sin(c + d*x)**16*i + 5345280*sin(c + d*x)**14*i - 969 8304*sin(c + d*x)**12*i + 10967040*sin(c + d*x)**10*i - 7934976*sin(c + d* x)**8*i + 3612672*sin(c + d*x)**6*i - 967680*sin(c + d*x)**4*i + 129024*si n(c + d*x)**2*i + 315*d*x))/(32256*d)