Integrand size = 24, antiderivative size = 97 \[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {4 i (a+i a \tan (c+d x))^{3+n}}{a^3 d (3+n)}+\frac {4 i (a+i a \tan (c+d x))^{4+n}}{a^4 d (4+n)}-\frac {i (a+i a \tan (c+d x))^{5+n}}{a^5 d (5+n)} \] Output:
-4*I*(a+I*a*tan(d*x+c))^(3+n)/a^3/d/(3+n)+4*I*(a+I*a*tan(d*x+c))^(4+n)/a^4 /d/(4+n)-I*(a+I*a*tan(d*x+c))^(5+n)/a^5/d/(5+n)
Time = 0.55 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.82 \[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i (a+i a \tan (c+d x))^{3+n} \left (\frac {4 a^2}{3+n}-\frac {4 a (a+i a \tan (c+d x))}{4+n}+\frac {(a+i a \tan (c+d x))^2}{5+n}\right )}{a^5 d} \] Input:
Integrate[Sec[c + d*x]^6*(a + I*a*Tan[c + d*x])^n,x]
Output:
((-I)*(a + I*a*Tan[c + d*x])^(3 + n)*((4*a^2)/(3 + n) - (4*a*(a + I*a*Tan[ c + d*x]))/(4 + n) + (a + I*a*Tan[c + d*x])^2/(5 + n)))/(a^5*d)
Time = 0.28 (sec) , antiderivative size = 86, 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, 53, 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 ^6(c+d x) (a+i a \tan (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^6 (a+i a \tan (c+d x))^ndx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i \int (a-i a \tan (c+d x))^2 (i \tan (c+d x) a+a)^{n+2}d(i a \tan (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 53 |
\(\displaystyle -\frac {i \int \left (4 a^2 (i \tan (c+d x) a+a)^{n+2}-4 a (i \tan (c+d x) a+a)^{n+3}+(i \tan (c+d x) a+a)^{n+4}\right )d(i a \tan (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i \left (\frac {4 a^2 (a+i a \tan (c+d x))^{n+3}}{n+3}-\frac {4 a (a+i a \tan (c+d x))^{n+4}}{n+4}+\frac {(a+i a \tan (c+d x))^{n+5}}{n+5}\right )}{a^5 d}\) |
Input:
Int[Sec[c + d*x]^6*(a + I*a*Tan[c + d*x])^n,x]
Output:
((-I)*((4*a^2*(a + I*a*Tan[c + d*x])^(3 + n))/(3 + n) - (4*a*(a + I*a*Tan[ c + d*x])^(4 + n))/(4 + n) + (a + I*a*Tan[c + d*x])^(5 + n)/(5 + n)))/(a^5 *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, n}, x] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0] && LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[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. 271 vs. \(2 (91 ) = 182\).
Time = 1.84 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.80
method | result | size |
derivativedivides | \(\frac {\tan \left (d x +c \right )^{5} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {\left (n^{2}+15 n +60\right ) \tan \left (d x +c \right ) {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {i n \tan \left (d x +c \right )^{4} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{\left (n d +4 d \right ) \left (5+n \right )}+\frac {2 \left (n^{2}+11 n +20\right ) \tan \left (d x +c \right )^{3} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {i \left (n^{2}+11 n +32\right ) {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {2 i n \left (n +7\right ) \tan \left (d x +c \right )^{2} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}\) | \(272\) |
default | \(\frac {\tan \left (d x +c \right )^{5} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {\left (n^{2}+15 n +60\right ) \tan \left (d x +c \right ) {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {i n \tan \left (d x +c \right )^{4} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{\left (n d +4 d \right ) \left (5+n \right )}+\frac {2 \left (n^{2}+11 n +20\right ) \tan \left (d x +c \right )^{3} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {i \left (n^{2}+11 n +32\right ) {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}-\frac {2 i n \left (n +7\right ) \tan \left (d x +c \right )^{2} {\mathrm e}^{n \ln \left (a +i a \tan \left (d x +c \right )\right )}}{d \left (3+n \right ) \left (4+n \right ) \left (5+n \right )}\) | \(272\) |
risch | \(\text {Expression too large to display}\) | \(3050\) |
Input:
int(sec(d*x+c)^6*(a+I*a*tan(d*x+c))^n,x,method=_RETURNVERBOSE)
Output:
1/d/(5+n)*tan(d*x+c)^5*exp(n*ln(a+I*a*tan(d*x+c)))+(n^2+15*n+60)/d/(3+n)/( 4+n)/(5+n)*tan(d*x+c)*exp(n*ln(a+I*a*tan(d*x+c)))-I*n/(d*n+4*d)/(5+n)*tan( d*x+c)^4*exp(n*ln(a+I*a*tan(d*x+c)))+2*(n^2+11*n+20)/d/(3+n)/(4+n)/(5+n)*t an(d*x+c)^3*exp(n*ln(a+I*a*tan(d*x+c)))-I*(n^2+11*n+32)/d/(3+n)/(4+n)/(5+n )*exp(n*ln(a+I*a*tan(d*x+c)))-2*I*n*(n+7)/d/(3+n)/(4+n)/(5+n)*tan(d*x+c)^2 *exp(n*ln(a+I*a*tan(d*x+c)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 247 vs. \(2 (85) = 170\).
Time = 0.10 (sec) , antiderivative size = 247, normalized size of antiderivative = 2.55 \[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {32 \, {\left (2 \, {\left (i \, n + 5 i\right )} e^{\left (8 i \, d x + 8 i \, c\right )} + {\left (i \, n^{2} + 9 i \, n + 20 i\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 2 i \, e^{\left (10 i \, d x + 10 i \, c\right )}\right )} \left (\frac {2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}}{d n^{3} + 12 \, d n^{2} + 47 \, d n + {\left (d n^{3} + 12 \, d n^{2} + 47 \, d n + 60 \, d\right )} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, {\left (d n^{3} + 12 \, d n^{2} + 47 \, d n + 60 \, d\right )} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, {\left (d n^{3} + 12 \, d n^{2} + 47 \, d n + 60 \, d\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, {\left (d n^{3} + 12 \, d n^{2} + 47 \, d n + 60 \, d\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, {\left (d n^{3} + 12 \, d n^{2} + 47 \, d n + 60 \, d\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 60 \, d} \] Input:
integrate(sec(d*x+c)^6*(a+I*a*tan(d*x+c))^n,x, algorithm="fricas")
Output:
-32*(2*(I*n + 5*I)*e^(8*I*d*x + 8*I*c) + (I*n^2 + 9*I*n + 20*I)*e^(6*I*d*x + 6*I*c) + 2*I*e^(10*I*d*x + 10*I*c))*(2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d* x + 2*I*c) + 1))^n/(d*n^3 + 12*d*n^2 + 47*d*n + (d*n^3 + 12*d*n^2 + 47*d*n + 60*d)*e^(10*I*d*x + 10*I*c) + 5*(d*n^3 + 12*d*n^2 + 47*d*n + 60*d)*e^(8 *I*d*x + 8*I*c) + 10*(d*n^3 + 12*d*n^2 + 47*d*n + 60*d)*e^(6*I*d*x + 6*I*c ) + 10*(d*n^3 + 12*d*n^2 + 47*d*n + 60*d)*e^(4*I*d*x + 4*I*c) + 5*(d*n^3 + 12*d*n^2 + 47*d*n + 60*d)*e^(2*I*d*x + 2*I*c) + 60*d)
\[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \sec ^{6}{\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)**6*(a+I*a*tan(d*x+c))**n,x)
Output:
Integral((I*a*(tan(c + d*x) - I))**n*sec(c + d*x)**6, x)
\[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{6} \,d x } \] Input:
integrate(sec(d*x+c)^6*(a+I*a*tan(d*x+c))^n,x, algorithm="maxima")
Output:
integrate((I*a*tan(d*x + c) + a)^n*sec(d*x + c)^6, x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 623 vs. \(2 (85) = 170\).
Time = 0.62 (sec) , antiderivative size = 623, normalized size of antiderivative = 6.42 \[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx =\text {Too large to display} \] Input:
integrate(sec(d*x+c)^6*(a+I*a*tan(d*x+c))^n,x, algorithm="giac")
Output:
(((I*a*tan(d*x + c) + a)^n*n^4*tan(d*x + c)^5 - I*(I*a*tan(d*x + c) + a)^n *n^4*tan(d*x + c)^4 + 10*(I*a*tan(d*x + c) + a)^n*n^3*tan(d*x + c)^5 - 6*I *(I*a*tan(d*x + c) + a)^n*n^3*tan(d*x + c)^4 + 35*(I*a*tan(d*x + c) + a)^n *n^2*tan(d*x + c)^5 + 4*(I*a*tan(d*x + c) + a)^n*n^3*tan(d*x + c)^3 - 11*I *(I*a*tan(d*x + c) + a)^n*n^2*tan(d*x + c)^4 + 50*(I*a*tan(d*x + c) + a)^n *n*tan(d*x + c)^5 + 12*(I*a*tan(d*x + c) + a)^n*n^2*tan(d*x + c)^3 - 6*I*( I*a*tan(d*x + c) + a)^n*n*tan(d*x + c)^4 + 24*(I*a*tan(d*x + c) + a)^n*tan (d*x + c)^5 + 12*I*(I*a*tan(d*x + c) + a)^n*n^2*tan(d*x + c)^2 + 8*(I*a*ta n(d*x + c) + a)^n*n*tan(d*x + c)^3 + 12*I*(I*a*tan(d*x + c) + a)^n*n*tan(d *x + c)^2 - 24*(I*a*tan(d*x + c) + a)^n*n*tan(d*x + c) - 24*I*(I*a*tan(d*x + c) + a)^n)/(n^5 + 15*n^4 + 85*n^3 + 225*n^2 + 274*n + 120) + 2*((I*a*ta n(d*x + c) + a)^n*n^2*tan(d*x + c)^3 - I*(I*a*tan(d*x + c) + a)^n*n^2*tan( d*x + c)^2 + 3*(I*a*tan(d*x + c) + a)^n*n*tan(d*x + c)^3 - I*(I*a*tan(d*x + c) + a)^n*n*tan(d*x + c)^2 + 2*(I*a*tan(d*x + c) + a)^n*tan(d*x + c)^3 + 2*(I*a*tan(d*x + c) + a)^n*n*tan(d*x + c) + 2*I*(I*a*tan(d*x + c) + a)^n) /(n^3 + 6*n^2 + 11*n + 6) - I*(I*a*tan(d*x + c) + a)^(n + 1)/(a*(n + 1)))/ d
Time = 5.64 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.73 \[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=\frac {{\mathrm {e}}^{-c\,5{}\mathrm {i}-d\,x\,5{}\mathrm {i}}\,{\left (a+\frac {a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{\cos \left (c+d\,x\right )}\right )}^n\,\left (\frac {64\,{\mathrm {e}}^{c\,10{}\mathrm {i}+d\,x\,10{}\mathrm {i}}}{d\,\left (n^3\,1{}\mathrm {i}+n^2\,12{}\mathrm {i}+n\,47{}\mathrm {i}+60{}\mathrm {i}\right )}+\frac {{\mathrm {e}}^{c\,6{}\mathrm {i}+d\,x\,6{}\mathrm {i}}\,\left (32\,n^2+288\,n+640\right )}{d\,\left (n^3\,1{}\mathrm {i}+n^2\,12{}\mathrm {i}+n\,47{}\mathrm {i}+60{}\mathrm {i}\right )}+\frac {{\mathrm {e}}^{c\,8{}\mathrm {i}+d\,x\,8{}\mathrm {i}}\,\left (64\,n+320\right )}{d\,\left (n^3\,1{}\mathrm {i}+n^2\,12{}\mathrm {i}+n\,47{}\mathrm {i}+60{}\mathrm {i}\right )}\right )}{32\,{\cos \left (c+d\,x\right )}^5} \] Input:
int((a + a*tan(c + d*x)*1i)^n/cos(c + d*x)^6,x)
Output:
(exp(- c*5i - d*x*5i)*(a + (a*sin(c + d*x)*1i)/cos(c + d*x))^n*((64*exp(c* 10i + d*x*10i))/(d*(n*47i + n^2*12i + n^3*1i + 60i)) + (exp(c*6i + d*x*6i) *(288*n + 32*n^2 + 640))/(d*(n*47i + n^2*12i + n^3*1i + 60i)) + (exp(c*8i + d*x*8i)*(64*n + 320))/(d*(n*47i + n^2*12i + n^3*1i + 60i))))/(32*cos(c + d*x)^5)
\[ \int \sec ^6(c+d x) (a+i a \tan (c+d x))^n \, dx=\int \left (\tan \left (d x +c \right ) a i +a \right )^{n} \sec \left (d x +c \right )^{6}d x \] Input:
int(sec(d*x+c)^6*(a+I*a*tan(d*x+c))^n,x)
Output:
int((tan(c + d*x)*a*i + a)**n*sec(c + d*x)**6,x)