\(\int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx\) [1]

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 = 19, antiderivative size = 151 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=-\frac {a \log (\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}-\frac {2 a \sec ^2(c+d x)}{d}-\frac {4 a \sec ^3(c+d x)}{3 d}+\frac {3 a \sec ^4(c+d x)}{2 d}+\frac {6 a \sec ^5(c+d x)}{5 d}-\frac {2 a \sec ^6(c+d x)}{3 d}-\frac {4 a \sec ^7(c+d x)}{7 d}+\frac {a \sec ^8(c+d x)}{8 d}+\frac {a \sec ^9(c+d x)}{9 d} \] Output:

-a*ln(cos(d*x+c))/d+a*sec(d*x+c)/d-2*a*sec(d*x+c)^2/d-4/3*a*sec(d*x+c)^3/d 
+3/2*a*sec(d*x+c)^4/d+6/5*a*sec(d*x+c)^5/d-2/3*a*sec(d*x+c)^6/d-4/7*a*sec( 
d*x+c)^7/d+1/8*a*sec(d*x+c)^8/d+1/9*a*sec(d*x+c)^9/d
 

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.00 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=-\frac {a \log (\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}-\frac {2 a \sec ^2(c+d x)}{d}-\frac {4 a \sec ^3(c+d x)}{3 d}+\frac {3 a \sec ^4(c+d x)}{2 d}+\frac {6 a \sec ^5(c+d x)}{5 d}-\frac {2 a \sec ^6(c+d x)}{3 d}-\frac {4 a \sec ^7(c+d x)}{7 d}+\frac {a \sec ^8(c+d x)}{8 d}+\frac {a \sec ^9(c+d x)}{9 d} \] Input:

Integrate[(a + a*Sec[c + d*x])*Tan[c + d*x]^9,x]
 

Output:

-((a*Log[Cos[c + d*x]])/d) + (a*Sec[c + d*x])/d - (2*a*Sec[c + d*x]^2)/d - 
 (4*a*Sec[c + d*x]^3)/(3*d) + (3*a*Sec[c + d*x]^4)/(2*d) + (6*a*Sec[c + d* 
x]^5)/(5*d) - (2*a*Sec[c + d*x]^6)/(3*d) - (4*a*Sec[c + d*x]^7)/(7*d) + (a 
*Sec[c + d*x]^8)/(8*d) + (a*Sec[c + d*x]^9)/(9*d)
 

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.77, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 25, 4367, 27, 99, 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 \tan ^9(c+d x) (a \sec (c+d x)+a) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\cot \left (c+d x+\frac {\pi }{2}\right )^9 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^9 \left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )dx\)

\(\Big \downarrow \) 4367

\(\displaystyle -\frac {\int a^9 (1-\cos (c+d x))^4 (\cos (c+d x)+1)^5 \sec ^{10}(c+d x)d\cos (c+d x)}{a^8 d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a \int (1-\cos (c+d x))^4 (\cos (c+d x)+1)^5 \sec ^{10}(c+d x)d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 99

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

\(\Big \downarrow \) 2009

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

Input:

Int[(a + a*Sec[c + d*x])*Tan[c + d*x]^9,x]
 

Output:

-((a*(Log[Cos[c + d*x]] - Sec[c + d*x] + 2*Sec[c + d*x]^2 + (4*Sec[c + d*x 
]^3)/3 - (3*Sec[c + d*x]^4)/2 - (6*Sec[c + d*x]^5)/5 + (2*Sec[c + d*x]^6)/ 
3 + (4*Sec[c + d*x]^7)/7 - Sec[c + d*x]^8/8 - Sec[c + d*x]^9/9))/d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4367
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[1/(a^(m - n - 1)*b^n*d)   Subst[Int[(a - b*x)^((m - 
1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /; Fr 
eeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && Integer 
Q[n]
 
Maple [A] (verified)

Time = 0.70 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.66

method result size
derivativedivides \(\frac {a \left (\frac {\sec \left (d x +c \right )^{9}}{9}+\frac {\sec \left (d x +c \right )^{8}}{8}-\frac {4 \sec \left (d x +c \right )^{7}}{7}-\frac {2 \sec \left (d x +c \right )^{6}}{3}+\frac {6 \sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{2}-\frac {4 \sec \left (d x +c \right )^{3}}{3}-2 \sec \left (d x +c \right )^{2}+\sec \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) \(100\)
default \(\frac {a \left (\frac {\sec \left (d x +c \right )^{9}}{9}+\frac {\sec \left (d x +c \right )^{8}}{8}-\frac {4 \sec \left (d x +c \right )^{7}}{7}-\frac {2 \sec \left (d x +c \right )^{6}}{3}+\frac {6 \sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{2}-\frac {4 \sec \left (d x +c \right )^{3}}{3}-2 \sec \left (d x +c \right )^{2}+\sec \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) \(100\)
parts \(\frac {a \left (\frac {\tan \left (d x +c \right )^{8}}{8}-\frac {\tan \left (d x +c \right )^{6}}{6}+\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {a \left (\frac {\sec \left (d x +c \right )^{9}}{9}-\frac {4 \sec \left (d x +c \right )^{7}}{7}+\frac {6 \sec \left (d x +c \right )^{5}}{5}-\frac {4 \sec \left (d x +c \right )^{3}}{3}+\sec \left (d x +c \right )\right )}{d}\) \(113\)
risch \(i a x +\frac {2 i a c}{d}+\frac {2 a \left (315 \,{\mathrm e}^{17 i \left (d x +c \right )}-1260 \,{\mathrm e}^{16 i \left (d x +c \right )}+840 \,{\mathrm e}^{15 i \left (d x +c \right )}-5040 \,{\mathrm e}^{14 i \left (d x +c \right )}+4788 \,{\mathrm e}^{13 i \left (d x +c \right )}-14280 \,{\mathrm e}^{12 i \left (d x +c \right )}+5112 \,{\mathrm e}^{11 i \left (d x +c \right )}-21420 \,{\mathrm e}^{10 i \left (d x +c \right )}+10658 \,{\mathrm e}^{9 i \left (d x +c \right )}-21420 \,{\mathrm e}^{8 i \left (d x +c \right )}+5112 \,{\mathrm e}^{7 i \left (d x +c \right )}-14280 \,{\mathrm e}^{6 i \left (d x +c \right )}+4788 \,{\mathrm e}^{5 i \left (d x +c \right )}-5040 \,{\mathrm e}^{4 i \left (d x +c \right )}+840 \,{\mathrm e}^{3 i \left (d x +c \right )}-1260 \,{\mathrm e}^{2 i \left (d x +c \right )}+315 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{315 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(240\)

Input:

int((a+a*sec(d*x+c))*tan(d*x+c)^9,x,method=_RETURNVERBOSE)
 

Output:

a/d*(1/9*sec(d*x+c)^9+1/8*sec(d*x+c)^8-4/7*sec(d*x+c)^7-2/3*sec(d*x+c)^6+6 
/5*sec(d*x+c)^5+3/2*sec(d*x+c)^4-4/3*sec(d*x+c)^3-2*sec(d*x+c)^2+sec(d*x+c 
)+ln(sec(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.81 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=-\frac {2520 \, a \cos \left (d x + c\right )^{9} \log \left (-\cos \left (d x + c\right )\right ) - 2520 \, a \cos \left (d x + c\right )^{8} + 5040 \, a \cos \left (d x + c\right )^{7} + 3360 \, a \cos \left (d x + c\right )^{6} - 3780 \, a \cos \left (d x + c\right )^{5} - 3024 \, a \cos \left (d x + c\right )^{4} + 1680 \, a \cos \left (d x + c\right )^{3} + 1440 \, a \cos \left (d x + c\right )^{2} - 315 \, a \cos \left (d x + c\right ) - 280 \, a}{2520 \, d \cos \left (d x + c\right )^{9}} \] Input:

integrate((a+a*sec(d*x+c))*tan(d*x+c)^9,x, algorithm="fricas")
 

Output:

-1/2520*(2520*a*cos(d*x + c)^9*log(-cos(d*x + c)) - 2520*a*cos(d*x + c)^8 
+ 5040*a*cos(d*x + c)^7 + 3360*a*cos(d*x + c)^6 - 3780*a*cos(d*x + c)^5 - 
3024*a*cos(d*x + c)^4 + 1680*a*cos(d*x + c)^3 + 1440*a*cos(d*x + c)^2 - 31 
5*a*cos(d*x + c) - 280*a)/(d*cos(d*x + c)^9)
 

Sympy [A] (verification not implemented)

Time = 1.97 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.22 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a \tan ^{8}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{9 d} + \frac {a \tan ^{8}{\left (c + d x \right )}}{8 d} - \frac {8 a \tan ^{6}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{63 d} - \frac {a \tan ^{6}{\left (c + d x \right )}}{6 d} + \frac {16 a \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{105 d} + \frac {a \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {64 a \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{315 d} - \frac {a \tan ^{2}{\left (c + d x \right )}}{2 d} + \frac {128 a \sec {\left (c + d x \right )}}{315 d} & \text {for}\: d \neq 0 \\x \left (a \sec {\left (c \right )} + a\right ) \tan ^{9}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

integrate((a+a*sec(d*x+c))*tan(d*x+c)**9,x)
 

Output:

Piecewise((a*log(tan(c + d*x)**2 + 1)/(2*d) + a*tan(c + d*x)**8*sec(c + d* 
x)/(9*d) + a*tan(c + d*x)**8/(8*d) - 8*a*tan(c + d*x)**6*sec(c + d*x)/(63* 
d) - a*tan(c + d*x)**6/(6*d) + 16*a*tan(c + d*x)**4*sec(c + d*x)/(105*d) + 
 a*tan(c + d*x)**4/(4*d) - 64*a*tan(c + d*x)**2*sec(c + d*x)/(315*d) - a*t 
an(c + d*x)**2/(2*d) + 128*a*sec(c + d*x)/(315*d), Ne(d, 0)), (x*(a*sec(c) 
 + a)*tan(c)**9, True))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.77 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=-\frac {2520 \, a \log \left (\cos \left (d x + c\right )\right ) - \frac {2520 \, a \cos \left (d x + c\right )^{8} - 5040 \, a \cos \left (d x + c\right )^{7} - 3360 \, a \cos \left (d x + c\right )^{6} + 3780 \, a \cos \left (d x + c\right )^{5} + 3024 \, a \cos \left (d x + c\right )^{4} - 1680 \, a \cos \left (d x + c\right )^{3} - 1440 \, a \cos \left (d x + c\right )^{2} + 315 \, a \cos \left (d x + c\right ) + 280 \, a}{\cos \left (d x + c\right )^{9}}}{2520 \, d} \] Input:

integrate((a+a*sec(d*x+c))*tan(d*x+c)^9,x, algorithm="maxima")
                                                                                    
                                                                                    
 

Output:

-1/2520*(2520*a*log(cos(d*x + c)) - (2520*a*cos(d*x + c)^8 - 5040*a*cos(d* 
x + c)^7 - 3360*a*cos(d*x + c)^6 + 3780*a*cos(d*x + c)^5 + 3024*a*cos(d*x 
+ c)^4 - 1680*a*cos(d*x + c)^3 - 1440*a*cos(d*x + c)^2 + 315*a*cos(d*x + c 
) + 280*a)/cos(d*x + c)^9)/d
 

Giac [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.77 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=-\frac {2520 \, a \log \left ({\left | \cos \left (d x + c\right ) \right |}\right ) - \frac {2520 \, a \cos \left (d x + c\right )^{8} - 5040 \, a \cos \left (d x + c\right )^{7} - 3360 \, a \cos \left (d x + c\right )^{6} + 3780 \, a \cos \left (d x + c\right )^{5} + 3024 \, a \cos \left (d x + c\right )^{4} - 1680 \, a \cos \left (d x + c\right )^{3} - 1440 \, a \cos \left (d x + c\right )^{2} + 315 \, a \cos \left (d x + c\right ) + 280 \, a}{\cos \left (d x + c\right )^{9}}}{2520 \, d} \] Input:

integrate((a+a*sec(d*x+c))*tan(d*x+c)^9,x, algorithm="giac")
 

Output:

-1/2520*(2520*a*log(abs(cos(d*x + c))) - (2520*a*cos(d*x + c)^8 - 5040*a*c 
os(d*x + c)^7 - 3360*a*cos(d*x + c)^6 + 3780*a*cos(d*x + c)^5 + 3024*a*cos 
(d*x + c)^4 - 1680*a*cos(d*x + c)^3 - 1440*a*cos(d*x + c)^2 + 315*a*cos(d* 
x + c) + 280*a)/cos(d*x + c)^9)/d
 

Mupad [B] (verification not implemented)

Time = 15.93 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.72 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=\frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-18\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+\frac {218\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{3}-174\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {1382\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{5}-\frac {2114\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{15}+\frac {1654\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{35}-\frac {326\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}+\frac {256\,a}{315}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{18}-9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}+36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-84\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+126\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-126\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+84\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:

int(tan(c + d*x)^9*(a + a/cos(c + d*x)),x)
 

Output:

(2*a*atanh(tan(c/2 + (d*x)/2)^2))/d - ((256*a)/315 - (326*a*tan(c/2 + (d*x 
)/2)^2)/35 + (1654*a*tan(c/2 + (d*x)/2)^4)/35 - (2114*a*tan(c/2 + (d*x)/2) 
^6)/15 + (1382*a*tan(c/2 + (d*x)/2)^8)/5 - 174*a*tan(c/2 + (d*x)/2)^10 + ( 
218*a*tan(c/2 + (d*x)/2)^12)/3 - 18*a*tan(c/2 + (d*x)/2)^14 + 2*a*tan(c/2 
+ (d*x)/2)^16)/(d*(9*tan(c/2 + (d*x)/2)^2 - 36*tan(c/2 + (d*x)/2)^4 + 84*t 
an(c/2 + (d*x)/2)^6 - 126*tan(c/2 + (d*x)/2)^8 + 126*tan(c/2 + (d*x)/2)^10 
 - 84*tan(c/2 + (d*x)/2)^12 + 36*tan(c/2 + (d*x)/2)^14 - 9*tan(c/2 + (d*x) 
/2)^16 + tan(c/2 + (d*x)/2)^18 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.87 \[ \int (a+a \sec (c+d x)) \tan ^9(c+d x) \, dx=\frac {a \left (1260 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )+280 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{8}-320 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{6}+384 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{4}-512 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{2}+1024 \sec \left (d x +c \right )+315 \tan \left (d x +c \right )^{8}-420 \tan \left (d x +c \right )^{6}+630 \tan \left (d x +c \right )^{4}-1260 \tan \left (d x +c \right )^{2}\right )}{2520 d} \] Input:

int((a+a*sec(d*x+c))*tan(d*x+c)^9,x)
 

Output:

(a*(1260*log(tan(c + d*x)**2 + 1) + 280*sec(c + d*x)*tan(c + d*x)**8 - 320 
*sec(c + d*x)*tan(c + d*x)**6 + 384*sec(c + d*x)*tan(c + d*x)**4 - 512*sec 
(c + d*x)*tan(c + d*x)**2 + 1024*sec(c + d*x) + 315*tan(c + d*x)**8 - 420* 
tan(c + d*x)**6 + 630*tan(c + d*x)**4 - 1260*tan(c + d*x)**2))/(2520*d)