\(\int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx\) [10]

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

Optimal result

Integrand size = 22, antiderivative size = 111 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {35 a x}{128}-\frac {i a \cos ^8(c+d x)}{8 d}+\frac {35 a \cos (c+d x) \sin (c+d x)}{128 d}+\frac {35 a \cos ^3(c+d x) \sin (c+d x)}{192 d}+\frac {7 a \cos ^5(c+d x) \sin (c+d x)}{48 d}+\frac {a \cos ^7(c+d x) \sin (c+d x)}{8 d} \] Output:

35/128*a*x-1/8*I*a*cos(d*x+c)^8/d+35/128*a*cos(d*x+c)*sin(d*x+c)/d+35/192* 
a*cos(d*x+c)^3*sin(d*x+c)/d+7/48*a*cos(d*x+c)^5*sin(d*x+c)/d+1/8*a*cos(d*x 
+c)^7*sin(d*x+c)/d
 

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.61 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a \left (840 c+840 d x-384 i \cos ^8(c+d x)+672 \sin (2 (c+d x))+168 \sin (4 (c+d x))+32 \sin (6 (c+d x))+3 \sin (8 (c+d x))\right )}{3072 d} \] Input:

Integrate[Cos[c + d*x]^8*(a + I*a*Tan[c + d*x]),x]
 

Output:

(a*(840*c + 840*d*x - (384*I)*Cos[c + d*x]^8 + 672*Sin[2*(c + d*x)] + 168* 
Sin[4*(c + d*x)] + 32*Sin[6*(c + d*x)] + 3*Sin[8*(c + d*x)]))/(3072*d)
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.12, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 3967, 3042, 3115, 3042, 3115, 3042, 3115, 3042, 3115, 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 \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3967

\(\displaystyle a \int \cos ^8(c+d x)dx-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^8dx-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3115

\(\displaystyle a \left (\frac {7}{8} \int \cos ^6(c+d x)dx+\frac {\sin (c+d x) \cos ^7(c+d x)}{8 d}\right )-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {7}{8} \int \sin \left (c+d x+\frac {\pi }{2}\right )^6dx+\frac {\sin (c+d x) \cos ^7(c+d x)}{8 d}\right )-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3115

\(\displaystyle a \left (\frac {7}{8} \left (\frac {5}{6} \int \cos ^4(c+d x)dx+\frac {\sin (c+d x) \cos ^5(c+d x)}{6 d}\right )+\frac {\sin (c+d x) \cos ^7(c+d x)}{8 d}\right )-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {7}{8} \left (\frac {5}{6} \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx+\frac {\sin (c+d x) \cos ^5(c+d x)}{6 d}\right )+\frac {\sin (c+d x) \cos ^7(c+d x)}{8 d}\right )-\frac {i a \cos ^8(c+d x)}{8 d}\)

\(\Big \downarrow \) 3115

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

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

\(\Big \downarrow \) 24

\(\displaystyle a \left (\frac {\sin (c+d x) \cos ^7(c+d x)}{8 d}+\frac {7}{8} \left (\frac {\sin (c+d x) \cos ^5(c+d x)}{6 d}+\frac {5}{6} \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )\right )\right )-\frac {i a \cos ^8(c+d x)}{8 d}\)

Input:

Int[Cos[c + d*x]^8*(a + I*a*Tan[c + d*x]),x]
 

Output:

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

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 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3967
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a   Int[(d 
*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] 
|| NeQ[a^2 + b^2, 0])
 
Maple [A] (verified)

Time = 44.46 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.66

method result size
derivativedivides \(\frac {-\frac {i a \cos \left (d x +c \right )^{8}}{8}+a \left (\frac {\left (\cos \left (d x +c \right )^{7}+\frac {7 \cos \left (d x +c \right )^{5}}{6}+\frac {35 \cos \left (d x +c \right )^{3}}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) \(73\)
default \(\frac {-\frac {i a \cos \left (d x +c \right )^{8}}{8}+a \left (\frac {\left (\cos \left (d x +c \right )^{7}+\frac {7 \cos \left (d x +c \right )^{5}}{6}+\frac {35 \cos \left (d x +c \right )^{3}}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) \(73\)
risch \(\frac {35 a x}{128}-\frac {i a \,{\mathrm e}^{8 i \left (d x +c \right )}}{1024 d}-\frac {i a \cos \left (6 d x +6 c \right )}{128 d}+\frac {a \sin \left (6 d x +6 c \right )}{96 d}-\frac {7 i a \cos \left (4 d x +4 c \right )}{256 d}+\frac {7 a \sin \left (4 d x +4 c \right )}{128 d}-\frac {7 i a \cos \left (2 d x +2 c \right )}{128 d}+\frac {7 a \sin \left (2 d x +2 c \right )}{32 d}\) \(115\)

Input:

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

Output:

1/d*(-1/8*I*a*cos(d*x+c)^8+a*(1/8*(cos(d*x+c)^7+7/6*cos(d*x+c)^5+35/24*cos 
(d*x+c)^3+35/16*cos(d*x+c))*sin(d*x+c)+35/128*d*x+35/128*c))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.94 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {{\left (840 \, a d x e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, a e^{\left (14 i \, d x + 14 i \, c\right )} - 28 i \, a e^{\left (12 i \, d x + 12 i \, c\right )} - 126 i \, a e^{\left (10 i \, d x + 10 i \, c\right )} - 420 i \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 252 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 42 i \, a e^{\left (2 i \, d x + 2 i \, c\right )} + 4 i \, a\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{3072 \, d} \] Input:

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

Output:

1/3072*(840*a*d*x*e^(6*I*d*x + 6*I*c) - 3*I*a*e^(14*I*d*x + 14*I*c) - 28*I 
*a*e^(12*I*d*x + 12*I*c) - 126*I*a*e^(10*I*d*x + 10*I*c) - 420*I*a*e^(8*I* 
d*x + 8*I*c) + 252*I*a*e^(4*I*d*x + 4*I*c) + 42*I*a*e^(2*I*d*x + 2*I*c) + 
4*I*a)*e^(-6*I*d*x - 6*I*c)/d
 

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.51 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {35 a x}{128} + \begin {cases} \frac {\left (- 10133099161583616 i a d^{6} e^{20 i c} e^{8 i d x} - 94575592174780416 i a d^{6} e^{18 i c} e^{6 i d x} - 425590164786511872 i a d^{6} e^{16 i c} e^{4 i d x} - 1418633882621706240 i a d^{6} e^{14 i c} e^{2 i d x} + 851180329573023744 i a d^{6} e^{10 i c} e^{- 2 i d x} + 141863388262170624 i a d^{6} e^{8 i c} e^{- 4 i d x} + 13510798882111488 i a d^{6} e^{6 i c} e^{- 6 i d x}\right ) e^{- 12 i c}}{10376293541461622784 d^{7}} & \text {for}\: d^{7} e^{12 i c} \neq 0 \\x \left (- \frac {35 a}{128} + \frac {\left (a e^{14 i c} + 7 a e^{12 i c} + 21 a e^{10 i c} + 35 a e^{8 i c} + 35 a e^{6 i c} + 21 a e^{4 i c} + 7 a e^{2 i c} + a\right ) e^{- 6 i c}}{128}\right ) & \text {otherwise} \end {cases} \] Input:

integrate(cos(d*x+c)**8*(a+I*a*tan(d*x+c)),x)
 

Output:

35*a*x/128 + Piecewise(((-10133099161583616*I*a*d**6*exp(20*I*c)*exp(8*I*d 
*x) - 94575592174780416*I*a*d**6*exp(18*I*c)*exp(6*I*d*x) - 42559016478651 
1872*I*a*d**6*exp(16*I*c)*exp(4*I*d*x) - 1418633882621706240*I*a*d**6*exp( 
14*I*c)*exp(2*I*d*x) + 851180329573023744*I*a*d**6*exp(10*I*c)*exp(-2*I*d* 
x) + 141863388262170624*I*a*d**6*exp(8*I*c)*exp(-4*I*d*x) + 13510798882111 
488*I*a*d**6*exp(6*I*c)*exp(-6*I*d*x))*exp(-12*I*c)/(10376293541461622784* 
d**7), Ne(d**7*exp(12*I*c), 0)), (x*(-35*a/128 + (a*exp(14*I*c) + 7*a*exp( 
12*I*c) + 21*a*exp(10*I*c) + 35*a*exp(8*I*c) + 35*a*exp(6*I*c) + 21*a*exp( 
4*I*c) + 7*a*exp(2*I*c) + a)*exp(-6*I*c)/128), True))
 

Maxima [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.93 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {105 \, {\left (d x + c\right )} a + \frac {105 \, a \tan \left (d x + c\right )^{7} + 385 \, a \tan \left (d x + c\right )^{5} + 511 \, a \tan \left (d x + c\right )^{3} + 279 \, a \tan \left (d x + c\right ) - 48 i \, a}{\tan \left (d x + c\right )^{8} + 4 \, \tan \left (d x + c\right )^{6} + 6 \, \tan \left (d x + c\right )^{4} + 4 \, \tan \left (d x + c\right )^{2} + 1}}{384 \, d} \] Input:

integrate(cos(d*x+c)^8*(a+I*a*tan(d*x+c)),x, algorithm="maxima")
 

Output:

1/384*(105*(d*x + c)*a + (105*a*tan(d*x + c)^7 + 385*a*tan(d*x + c)^5 + 51 
1*a*tan(d*x + c)^3 + 279*a*tan(d*x + c) - 48*I*a)/(tan(d*x + c)^8 + 4*tan( 
d*x + c)^6 + 6*tan(d*x + c)^4 + 4*tan(d*x + c)^2 + 1))/d
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.05 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {1}{768} i \, a {\left (\frac {105 \, \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {105 \, \log \left (\tan \left (d x + c\right ) - i\right )}{d} - \frac {2 \, {\left (105 i \, \tan \left (d x + c\right )^{6} - 105 \, \tan \left (d x + c\right )^{5} + 280 i \, \tan \left (d x + c\right )^{4} - 280 \, \tan \left (d x + c\right )^{3} + 231 i \, \tan \left (d x + c\right )^{2} - 231 \, \tan \left (d x + c\right ) + 48 i\right )}}{d {\left (\tan \left (d x + c\right ) + i\right )}^{4} {\left (\tan \left (d x + c\right ) - i\right )}^{3}}\right )} \] Input:

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

Output:

1/768*I*a*(105*log(tan(d*x + c) + I)/d - 105*log(tan(d*x + c) - I)/d - 2*( 
105*I*tan(d*x + c)^6 - 105*tan(d*x + c)^5 + 280*I*tan(d*x + c)^4 - 280*tan 
(d*x + c)^3 + 231*I*tan(d*x + c)^2 - 231*tan(d*x + c) + 48*I)/(d*(tan(d*x 
+ c) + I)^4*(tan(d*x + c) - I)^3))
 

Mupad [B] (verification not implemented)

Time = 1.97 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.37 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {35\,a\,x}{128}+\frac {\frac {35\,a\,{\mathrm {tan}\left (c+d\,x\right )}^6}{128}+\frac {35{}\mathrm {i}\,a\,{\mathrm {tan}\left (c+d\,x\right )}^5}{128}+\frac {35\,a\,{\mathrm {tan}\left (c+d\,x\right )}^4}{48}+\frac {35{}\mathrm {i}\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3}{48}+\frac {77\,a\,{\mathrm {tan}\left (c+d\,x\right )}^2}{128}+\frac {77{}\mathrm {i}\,a\,\mathrm {tan}\left (c+d\,x\right )}{128}+\frac {a}{8}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^7+{\mathrm {tan}\left (c+d\,x\right )}^6\,1{}\mathrm {i}+3\,{\mathrm {tan}\left (c+d\,x\right )}^5+{\mathrm {tan}\left (c+d\,x\right )}^4\,3{}\mathrm {i}+3\,{\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,3{}\mathrm {i}+\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \] Input:

int(cos(c + d*x)^8*(a + a*tan(c + d*x)*1i),x)
 

Output:

(35*a*x)/128 + (a/8 + (a*tan(c + d*x)*77i)/128 + (77*a*tan(c + d*x)^2)/128 
 + (a*tan(c + d*x)^3*35i)/48 + (35*a*tan(c + d*x)^4)/48 + (a*tan(c + d*x)^ 
5*35i)/128 + (35*a*tan(c + d*x)^6)/128)/(d*(tan(c + d*x) + tan(c + d*x)^2* 
3i + 3*tan(c + d*x)^3 + tan(c + d*x)^4*3i + 3*tan(c + d*x)^5 + tan(c + d*x 
)^6*1i + tan(c + d*x)^7 + 1i))
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.05 \[ \int \cos ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a \left (-48 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}+200 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-326 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+279 \cos \left (d x +c \right ) \sin \left (d x +c \right )-48 \sin \left (d x +c \right )^{8} i +192 \sin \left (d x +c \right )^{6} i -288 \sin \left (d x +c \right )^{4} i +192 \sin \left (d x +c \right )^{2} i +105 d x \right )}{384 d} \] Input:

int(cos(d*x+c)^8*(a+I*a*tan(d*x+c)),x)
 

Output:

(a*( - 48*cos(c + d*x)*sin(c + d*x)**7 + 200*cos(c + d*x)*sin(c + d*x)**5 
- 326*cos(c + d*x)*sin(c + d*x)**3 + 279*cos(c + d*x)*sin(c + d*x) - 48*si 
n(c + d*x)**8*i + 192*sin(c + d*x)**6*i - 288*sin(c + d*x)**4*i + 192*sin( 
c + d*x)**2*i + 105*d*x))/(384*d)