Integrand size = 22, antiderivative size = 75 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {i a \sec ^8(c+d x)}{8 d}+\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{d}+\frac {3 a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^7(c+d x)}{7 d} \] Output:
1/8*I*a*sec(d*x+c)^8/d+a*tan(d*x+c)/d+a*tan(d*x+c)^3/d+3/5*a*tan(d*x+c)^5/ d+1/7*a*tan(d*x+c)^7/d
Time = 0.07 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.84 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {i a \sec ^8(c+d x)}{8 d}+\frac {a \left (\tan (c+d x)+\tan ^3(c+d x)+\frac {3}{5} \tan ^5(c+d x)+\frac {1}{7} \tan ^7(c+d x)\right )}{d} \] Input:
Integrate[Sec[c + d*x]^8*(a + I*a*Tan[c + d*x]),x]
Output:
((I/8)*a*Sec[c + d*x]^8)/d + (a*(Tan[c + d*x] + Tan[c + d*x]^3 + (3*Tan[c + d*x]^5)/5 + Tan[c + d*x]^7/7))/d
Time = 0.29 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.91, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {3042, 3967, 3042, 4254, 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 \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^8 (a+i a \tan (c+d x))dx\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle a \int \sec ^8(c+d x)dx+\frac {i a \sec ^8(c+d x)}{8 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^8dx+\frac {i a \sec ^8(c+d x)}{8 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {a \int \left (\tan ^6(c+d x)+3 \tan ^4(c+d x)+3 \tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}+\frac {i a \sec ^8(c+d x)}{8 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \left (-\frac {1}{7} \tan ^7(c+d x)-\frac {3}{5} \tan ^5(c+d x)-\tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {i a \sec ^8(c+d x)}{8 d}\) |
Input:
Int[Sec[c + d*x]^8*(a + I*a*Tan[c + d*x]),x]
Output:
((I/8)*a*Sec[c + d*x]^8)/d - (a*(-Tan[c + d*x] - Tan[c + d*x]^3 - (3*Tan[c + d*x]^5)/5 - Tan[c + d*x]^7/7))/d
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])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Time = 58.35 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.89
method | result | size |
risch | \(\frac {32 i a \left (70 \,{\mathrm e}^{8 i \left (d x +c \right )}+56 \,{\mathrm e}^{6 i \left (d x +c \right )}+28 \,{\mathrm e}^{4 i \left (d x +c \right )}+8 \,{\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{35 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{8}}\) | \(67\) |
derivativedivides | \(\frac {a \left (\tan \left (d x +c \right )+\frac {i \tan \left (d x +c \right )^{8}}{8}+\frac {\tan \left (d x +c \right )^{7}}{7}+\frac {i \tan \left (d x +c \right )^{6}}{2}+\frac {3 \tan \left (d x +c \right )^{5}}{5}+\frac {3 i \tan \left (d x +c \right )^{4}}{4}+\tan \left (d x +c \right )^{3}+\frac {i \tan \left (d x +c \right )^{2}}{2}\right )}{d}\) | \(85\) |
default | \(\frac {a \left (\tan \left (d x +c \right )+\frac {i \tan \left (d x +c \right )^{8}}{8}+\frac {\tan \left (d x +c \right )^{7}}{7}+\frac {i \tan \left (d x +c \right )^{6}}{2}+\frac {3 \tan \left (d x +c \right )^{5}}{5}+\frac {3 i \tan \left (d x +c \right )^{4}}{4}+\tan \left (d x +c \right )^{3}+\frac {i \tan \left (d x +c \right )^{2}}{2}\right )}{d}\) | \(85\) |
Input:
int(sec(d*x+c)^8*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
32/35*I*a*(70*exp(8*I*(d*x+c))+56*exp(6*I*(d*x+c))+28*exp(4*I*(d*x+c))+8*e xp(2*I*(d*x+c))+1)/d/(exp(2*I*(d*x+c))+1)^8
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (67) = 134\).
Time = 0.08 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.04 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {32 \, {\left (-70 i \, a e^{\left (8 i \, d x + 8 i \, c\right )} - 56 i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 28 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} - 8 i \, a e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a\right )}}{35 \, {\left (d e^{\left (16 i \, d x + 16 i \, c\right )} + 8 \, d e^{\left (14 i \, d x + 14 i \, c\right )} + 28 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 56 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 70 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 56 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 28 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 8 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c)),x, algorithm="fricas")
Output:
-32/35*(-70*I*a*e^(8*I*d*x + 8*I*c) - 56*I*a*e^(6*I*d*x + 6*I*c) - 28*I*a* e^(4*I*d*x + 4*I*c) - 8*I*a*e^(2*I*d*x + 2*I*c) - I*a)/(d*e^(16*I*d*x + 16 *I*c) + 8*d*e^(14*I*d*x + 14*I*c) + 28*d*e^(12*I*d*x + 12*I*c) + 56*d*e^(1 0*I*d*x + 10*I*c) + 70*d*e^(8*I*d*x + 8*I*c) + 56*d*e^(6*I*d*x + 6*I*c) + 28*d*e^(4*I*d*x + 4*I*c) + 8*d*e^(2*I*d*x + 2*I*c) + d)
Time = 2.65 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.91 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\begin {cases} \frac {a \left (\frac {\tan ^{7}{\left (c + d x \right )}}{7} + \frac {3 \tan ^{5}{\left (c + d x \right )}}{5} + \tan ^{3}{\left (c + d x \right )} + \tan {\left (c + d x \right )}\right ) + \frac {i a \sec ^{8}{\left (c + d x \right )}}{8}}{d} & \text {for}\: d \neq 0 \\x \left (i a \tan {\left (c \right )} + a\right ) \sec ^{8}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(sec(d*x+c)**8*(a+I*a*tan(d*x+c)),x)
Output:
Piecewise(((a*(tan(c + d*x)**7/7 + 3*tan(c + d*x)**5/5 + tan(c + d*x)**3 + tan(c + d*x)) + I*a*sec(c + d*x)**8/8)/d, Ne(d, 0)), (x*(I*a*tan(c) + a)* sec(c)**8, True))
Time = 0.04 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.23 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {35 i \, a \tan \left (d x + c\right )^{8} + 40 \, a \tan \left (d x + c\right )^{7} + 140 i \, a \tan \left (d x + c\right )^{6} + 168 \, a \tan \left (d x + c\right )^{5} + 210 i \, a \tan \left (d x + c\right )^{4} + 280 \, a \tan \left (d x + c\right )^{3} + 140 i \, a \tan \left (d x + c\right )^{2} + 280 \, a \tan \left (d x + c\right )}{280 \, d} \] Input:
integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c)),x, algorithm="maxima")
Output:
1/280*(35*I*a*tan(d*x + c)^8 + 40*a*tan(d*x + c)^7 + 140*I*a*tan(d*x + c)^ 6 + 168*a*tan(d*x + c)^5 + 210*I*a*tan(d*x + c)^4 + 280*a*tan(d*x + c)^3 + 140*I*a*tan(d*x + c)^2 + 280*a*tan(d*x + c))/d
Time = 0.15 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.23 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {-35 i \, a \tan \left (d x + c\right )^{8} - 40 \, a \tan \left (d x + c\right )^{7} - 140 i \, a \tan \left (d x + c\right )^{6} - 168 \, a \tan \left (d x + c\right )^{5} - 210 i \, a \tan \left (d x + c\right )^{4} - 280 \, a \tan \left (d x + c\right )^{3} - 140 i \, a \tan \left (d x + c\right )^{2} - 280 \, a \tan \left (d x + c\right )}{280 \, d} \] Input:
integrate(sec(d*x+c)^8*(a+I*a*tan(d*x+c)),x, algorithm="giac")
Output:
-1/280*(-35*I*a*tan(d*x + c)^8 - 40*a*tan(d*x + c)^7 - 140*I*a*tan(d*x + c )^6 - 168*a*tan(d*x + c)^5 - 210*I*a*tan(d*x + c)^4 - 280*a*tan(d*x + c)^3 - 140*I*a*tan(d*x + c)^2 - 280*a*tan(d*x + c))/d
Time = 0.34 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.99 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a\,\sin \left (c+d\,x\right )\,\left (280\,{\cos \left (c+d\,x\right )}^7+{\cos \left (c+d\,x\right )}^6\,\sin \left (c+d\,x\right )\,140{}\mathrm {i}+280\,{\cos \left (c+d\,x\right )}^5\,{\sin \left (c+d\,x\right )}^2+{\cos \left (c+d\,x\right )}^4\,{\sin \left (c+d\,x\right )}^3\,210{}\mathrm {i}+168\,{\cos \left (c+d\,x\right )}^3\,{\sin \left (c+d\,x\right )}^4+{\cos \left (c+d\,x\right )}^2\,{\sin \left (c+d\,x\right )}^5\,140{}\mathrm {i}+40\,\cos \left (c+d\,x\right )\,{\sin \left (c+d\,x\right )}^6+{\sin \left (c+d\,x\right )}^7\,35{}\mathrm {i}\right )}{280\,d\,{\cos \left (c+d\,x\right )}^8} \] Input:
int((a + a*tan(c + d*x)*1i)/cos(c + d*x)^8,x)
Output:
(a*sin(c + d*x)*(40*cos(c + d*x)*sin(c + d*x)^6 + cos(c + d*x)^6*sin(c + d *x)*140i + 280*cos(c + d*x)^7 + sin(c + d*x)^7*35i + cos(c + d*x)^2*sin(c + d*x)^5*140i + 168*cos(c + d*x)^3*sin(c + d*x)^4 + cos(c + d*x)^4*sin(c + d*x)^3*210i + 280*cos(c + d*x)^5*sin(c + d*x)^2))/(280*d*cos(c + d*x)^8)
Time = 0.18 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.04 \[ \int \sec ^8(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {\sin \left (d x +c \right ) a \left (-128 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}+448 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-560 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+280 \cos \left (d x +c \right )-35 \sin \left (d x +c \right )^{7} i +140 \sin \left (d x +c \right )^{5} i -210 \sin \left (d x +c \right )^{3} i +140 \sin \left (d x +c \right ) i \right )}{280 d \left (\sin \left (d x +c \right )^{8}-4 \sin \left (d x +c \right )^{6}+6 \sin \left (d x +c \right )^{4}-4 \sin \left (d x +c \right )^{2}+1\right )} \] Input:
int(sec(d*x+c)^8*(a+I*a*tan(d*x+c)),x)
Output:
(sin(c + d*x)*a*( - 128*cos(c + d*x)*sin(c + d*x)**6 + 448*cos(c + d*x)*si n(c + d*x)**4 - 560*cos(c + d*x)*sin(c + d*x)**2 + 280*cos(c + d*x) - 35*s in(c + d*x)**7*i + 140*sin(c + d*x)**5*i - 210*sin(c + d*x)**3*i + 140*sin (c + d*x)*i))/(280*d*(sin(c + d*x)**8 - 4*sin(c + d*x)**6 + 6*sin(c + d*x) **4 - 4*sin(c + d*x)**2 + 1))