\(\int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx\) [257]

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 = 84 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {a \log (\cos (c+d x))}{d}+\frac {8 b \sec (c+d x)}{15 d}-\frac {(15 a+8 b \sec (c+d x)) \tan ^2(c+d x)}{30 d}+\frac {(5 a+4 b \sec (c+d x)) \tan ^4(c+d x)}{20 d} \] Output:

-a*ln(cos(d*x+c))/d+8/15*b*sec(d*x+c)/d-1/30*(15*a+8*b*sec(d*x+c))*tan(d*x 
+c)^2/d+1/20*(5*a+4*b*sec(d*x+c))*tan(d*x+c)^4/d
 

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.04 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {a \log (\cos (c+d x))}{d}+\frac {b \sec (c+d x)}{d}-\frac {a \sec ^2(c+d x)}{d}-\frac {2 b \sec ^3(c+d x)}{3 d}+\frac {a \sec ^4(c+d x)}{4 d}+\frac {b \sec ^5(c+d x)}{5 d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.842, Rules used = {3042, 25, 4369, 25, 3042, 25, 4369, 25, 3042, 25, 4372, 25, 3042, 3086, 24, 3956}

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 ^5(c+d x) (a+b \sec (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 4369

\(\displaystyle \frac {1}{5} \int -\left ((5 a+4 b \sec (c+d x)) \tan ^3(c+d x)\right )dx+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}-\frac {1}{5} \int (5 a+4 b \sec (c+d x)) \tan ^3(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}-\frac {1}{5} \int -\cot \left (c+d x+\frac {\pi }{2}\right )^3 \left (5 a+4 b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3 \left (5 a+4 b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )dx+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 4369

\(\displaystyle \frac {1}{5} \left (-\frac {1}{3} \int -((15 a+8 b \sec (c+d x)) \tan (c+d x))dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int (15 a+8 b \sec (c+d x)) \tan (c+d x)dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int -\cot \left (c+d x+\frac {\pi }{2}\right ) \left (15 a+8 b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (-\frac {1}{3} \int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right ) \left (15 a+8 b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 4372

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (-15 a \int -\tan (c+d x)dx-8 b \int -\sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (15 a \int \tan (c+d x)dx+8 b \int \sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (15 a \int \tan (c+d x)dx+8 b \int \sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3086

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (15 a \int \tan (c+d x)dx+\frac {8 b \int 1d\sec (c+d x)}{d}\right )-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (15 a \int \tan (c+d x)dx+\frac {8 b \sec (c+d x)}{d}\right )-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3956

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

Input:

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

Output:

((5*a + 4*b*Sec[c + d*x])*Tan[c + d*x]^4)/(20*d) + (((-15*a*Log[Cos[c + d* 
x]])/d + (8*b*Sec[c + d*x])/d)/3 - ((15*a + 8*b*Sec[c + d*x])*Tan[c + d*x] 
^2)/(6*d))/5
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

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

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

rule 3086
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_.), x_Symbol] :> Simp[a/f   Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 
), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 
] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4369
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-e)*(e*Cot[c + d*x])^(m - 1)*((a*m + b*(m - 1)*Csc 
[c + d*x])/(d*m*(m - 1))), x] - Simp[e^2/m   Int[(e*Cot[c + d*x])^(m - 2)*( 
a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m 
, 1]
 

rule 4372
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(e*Cot[c + d*x])^m, x], x] + Simp[b   Int[ 
(e*Cot[c + d*x])^m*Csc[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, m}, x]
 
Maple [A] (verified)

Time = 0.45 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.80

method result size
derivativedivides \(\frac {\frac {b \sec \left (d x +c \right )^{5}}{5}+\frac {a \sec \left (d x +c \right )^{4}}{4}-\frac {2 b \sec \left (d x +c \right )^{3}}{3}-a \sec \left (d x +c \right )^{2}+b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(67\)
default \(\frac {\frac {b \sec \left (d x +c \right )^{5}}{5}+\frac {a \sec \left (d x +c \right )^{4}}{4}-\frac {2 b \sec \left (d x +c \right )^{3}}{3}-a \sec \left (d x +c \right )^{2}+b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(67\)
parts \(\frac {a \left (\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 {b \left (\frac {\sec \left (d x +c \right )^{5}}{5}-\frac {2 \sec \left (d x +c \right )^{3}}{3}+\sec \left (d x +c \right )\right )}{d}\) \(73\)
risch \(i a x +\frac {2 i a c}{d}+\frac {2 b \,{\mathrm e}^{9 i \left (d x +c \right )}-4 a \,{\mathrm e}^{8 i \left (d x +c \right )}+\frac {8 b \,{\mathrm e}^{7 i \left (d x +c \right )}}{3}-8 a \,{\mathrm e}^{6 i \left (d x +c \right )}+\frac {116 b \,{\mathrm e}^{5 i \left (d x +c \right )}}{15}-8 a \,{\mathrm e}^{4 i \left (d x +c \right )}+\frac {8 b \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(160\)

Input:

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

Output:

1/d*(1/5*b*sec(d*x+c)^5+1/4*a*sec(d*x+c)^4-2/3*b*sec(d*x+c)^3-a*sec(d*x+c) 
^2+b*sec(d*x+c)+a*ln(sec(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.94 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {60 \, a \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 60 \, b \cos \left (d x + c\right )^{4} + 60 \, a \cos \left (d x + c\right )^{3} + 40 \, b \cos \left (d x + c\right )^{2} - 15 \, a \cos \left (d x + c\right ) - 12 \, b}{60 \, d \cos \left (d x + c\right )^{5}} \] Input:

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

Output:

-1/60*(60*a*cos(d*x + c)^5*log(-cos(d*x + c)) - 60*b*cos(d*x + c)^4 + 60*a 
*cos(d*x + c)^3 + 40*b*cos(d*x + c)^2 - 15*a*cos(d*x + c) - 12*b)/(d*cos(d 
*x + c)^5)
 

Sympy [A] (verification not implemented)

Time = 0.45 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.33 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {a \tan ^{2}{\left (c + d x \right )}}{2 d} + \frac {b \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{5 d} - \frac {4 b \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 d} + \frac {8 b \sec {\left (c + d x \right )}}{15 d} & \text {for}\: d \neq 0 \\x \left (a + b \sec {\left (c \right )}\right ) \tan ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((a*log(tan(c + d*x)**2 + 1)/(2*d) + a*tan(c + d*x)**4/(4*d) - a* 
tan(c + d*x)**2/(2*d) + b*tan(c + d*x)**4*sec(c + d*x)/(5*d) - 4*b*tan(c + 
 d*x)**2*sec(c + d*x)/(15*d) + 8*b*sec(c + d*x)/(15*d), Ne(d, 0)), (x*(a + 
 b*sec(c))*tan(c)**5, True))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.86 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {60 \, a \log \left (\cos \left (d x + c\right )\right ) - \frac {60 \, b \cos \left (d x + c\right )^{4} - 60 \, a \cos \left (d x + c\right )^{3} - 40 \, b \cos \left (d x + c\right )^{2} + 15 \, a \cos \left (d x + c\right ) + 12 \, b}{\cos \left (d x + c\right )^{5}}}{60 \, d} \] Input:

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

Output:

-1/60*(60*a*log(cos(d*x + c)) - (60*b*cos(d*x + c)^4 - 60*a*cos(d*x + c)^3 
 - 40*b*cos(d*x + c)^2 + 15*a*cos(d*x + c) + 12*b)/cos(d*x + c)^5)/d
 

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.87 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {60 \, a \log \left ({\left | \cos \left (d x + c\right ) \right |}\right ) - \frac {60 \, b \cos \left (d x + c\right )^{4} - 60 \, a \cos \left (d x + c\right )^{3} - 40 \, b \cos \left (d x + c\right )^{2} + 15 \, a \cos \left (d x + c\right ) + 12 \, b}{\cos \left (d x + c\right )^{5}}}{60 \, d} \] Input:

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

Output:

-1/60*(60*a*log(abs(cos(d*x + c))) - (60*b*cos(d*x + c)^4 - 60*a*cos(d*x + 
 c)^3 - 40*b*cos(d*x + c)^2 + 15*a*cos(d*x + c) + 12*b)/cos(d*x + c)^5)/d
 

Mupad [B] (verification not implemented)

Time = 15.17 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.93 \[ \int (a+b \sec (c+d x)) \tan ^5(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 )}^8-10\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (10\,a+\frac {32\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (-2\,a-\frac {16\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {16\,b}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:

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

Output:

(2*a*atanh(tan(c/2 + (d*x)/2)^2))/d - ((16*b)/15 - tan(c/2 + (d*x)/2)^2*(2 
*a + (16*b)/3) + tan(c/2 + (d*x)/2)^4*(10*a + (32*b)/3) - 10*a*tan(c/2 + ( 
d*x)/2)^6 + 2*a*tan(c/2 + (d*x)/2)^8)/(d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan( 
c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan( 
c/2 + (d*x)/2)^10 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.01 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\frac {30 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a +12 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{4} b -16 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{2} b +32 \sec \left (d x +c \right ) b +15 \tan \left (d x +c \right )^{4} a -30 \tan \left (d x +c \right )^{2} a}{60 d} \] Input:

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

Output:

(30*log(tan(c + d*x)**2 + 1)*a + 12*sec(c + d*x)*tan(c + d*x)**4*b - 16*se 
c(c + d*x)*tan(c + d*x)**2*b + 32*sec(c + d*x)*b + 15*tan(c + d*x)**4*a - 
30*tan(c + d*x)**2*a)/(60*d)