3.273 \(\int (\sec (x)+\tan (x))^5 \, dx\)

Optimal. Leaf size=30 \[ -\frac {4}{1-\sin (x)}+\frac {2}{(1-\sin (x))^2}-\log (1-\sin (x)) \]

[Out]

-ln(1-sin(x))+2/(1-sin(x))^2-4/(1-sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4391, 2667, 43} \[ -\frac {4}{1-\sin (x)}+\frac {2}{(1-\sin (x))^2}-\log (1-\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[(Sec[x] + Tan[x])^5,x]

[Out]

-Log[1 - Sin[x]] + 2/(1 - Sin[x])^2 - 4/(1 - Sin[x])

Rule 43

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] && NeQ[b*c - a*d, 0] && 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])

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 4391

Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x_)]^(n_.))^(p_), x_Symbol] :> Int[A
ctivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a*Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

Rubi steps

\begin {align*} \int (\sec (x)+\tan (x))^5 \, dx &=\int \sec ^5(x) (1+\sin (x))^5 \, dx\\ &=\operatorname {Subst}\left (\int \frac {(1+x)^2}{(1-x)^3} \, dx,x,\sin (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{1-x}-\frac {4}{(-1+x)^3}-\frac {4}{(-1+x)^2}\right ) \, dx,x,\sin (x)\right )\\ &=-\log (1-\sin (x))+\frac {2}{(1-\sin (x))^2}-\frac {4}{1-\sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 54, normalized size = 1.80 \[ \frac {11 \tan ^4(x)}{4}-\frac {\tan ^2(x)}{2}+\frac {5 \sec ^4(x)}{4}+\tanh ^{-1}(\sin (x))-\log (\cos (x))-\tan (x) \sec ^3(x)+5 \tan ^3(x) \sec (x)+\tan (x) \sec (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[x] + Tan[x])^5,x]

[Out]

ArcTanh[Sin[x]] - Log[Cos[x]] + (5*Sec[x]^4)/4 + Sec[x]*Tan[x] - Sec[x]^3*Tan[x] - Tan[x]^2/2 + 5*Sec[x]*Tan[x
]^3 + (11*Tan[x]^4)/4

________________________________________________________________________________________

fricas [A]  time = 0.96, size = 38, normalized size = 1.27 \[ -\frac {{\left (\cos \relax (x)^{2} + 2 \, \sin \relax (x) - 2\right )} \log \left (-\sin \relax (x) + 1\right ) + 4 \, \sin \relax (x) - 2}{\cos \relax (x)^{2} + 2 \, \sin \relax (x) - 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)+tan(x))^5,x, algorithm="fricas")

[Out]

-((cos(x)^2 + 2*sin(x) - 2)*log(-sin(x) + 1) + 4*sin(x) - 2)/(cos(x)^2 + 2*sin(x) - 2)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 62, normalized size = 2.07 \[ \frac {25 \, \tan \left (\frac {1}{2} \, x\right )^{4} - 100 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 198 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 100 \, \tan \left (\frac {1}{2} \, x\right ) + 25}{6 \, {\left (\tan \left (\frac {1}{2} \, x\right ) - 1\right )}^{4}} + \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)+tan(x))^5,x, algorithm="giac")

[Out]

1/6*(25*tan(1/2*x)^4 - 100*tan(1/2*x)^3 + 198*tan(1/2*x)^2 - 100*tan(1/2*x) + 25)/(tan(1/2*x) - 1)^4 + log(tan
(1/2*x)^2 + 1) - 2*log(abs(tan(1/2*x) - 1))

________________________________________________________________________________________

maple [B]  time = 0.12, size = 106, normalized size = 3.53 \[ -\left (-\frac {\left (\sec ^{3}\relax (x )\right )}{4}-\frac {3 \sec \relax (x )}{8}\right ) \tan \relax (x )+\ln \left (\sec \relax (x )+\tan \relax (x )\right )+\frac {5}{4 \cos \relax (x )^{4}}+\frac {5 \left (\sin ^{3}\relax (x )\right )}{2 \cos \relax (x )^{4}}+\frac {5 \left (\sin ^{3}\relax (x )\right )}{4 \cos \relax (x )^{2}}-\frac {5 \sin \relax (x )}{8}+\frac {5 \left (\sin ^{4}\relax (x )\right )}{2 \cos \relax (x )^{4}}+\frac {5 \left (\sin ^{5}\relax (x )\right )}{4 \cos \relax (x )^{4}}-\frac {5 \left (\sin ^{5}\relax (x )\right )}{8 \cos \relax (x )^{2}}-\frac {5 \left (\sin ^{3}\relax (x )\right )}{8}+\frac {\left (\tan ^{4}\relax (x )\right )}{4}-\frac {\left (\tan ^{2}\relax (x )\right )}{2}-\ln \left (\cos \relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sec(x)+tan(x))^5,x)

[Out]

-(-1/4*sec(x)^3-3/8*sec(x))*tan(x)+ln(sec(x)+tan(x))+5/4/cos(x)^4+5/2*sin(x)^3/cos(x)^4+5/4*sin(x)^3/cos(x)^2-
5/8*sin(x)+5/2*sin(x)^4/cos(x)^4+5/4*sin(x)^5/cos(x)^4-5/8*sin(x)^5/cos(x)^2-5/8*sin(x)^3+1/4*tan(x)^4-1/2*tan
(x)^2-ln(cos(x))

________________________________________________________________________________________

maxima [B]  time = 0.34, size = 141, normalized size = 4.70 \[ \frac {5}{2} \, \tan \relax (x)^{4} + \frac {5 \, {\left (5 \, \sin \relax (x)^{3} - 3 \, \sin \relax (x)\right )}}{8 \, {\left (\sin \relax (x)^{4} - 2 \, \sin \relax (x)^{2} + 1\right )}} - \frac {3 \, \sin \relax (x)^{3} - 5 \, \sin \relax (x)}{8 \, {\left (\sin \relax (x)^{4} - 2 \, \sin \relax (x)^{2} + 1\right )}} + \frac {5 \, {\left (\sin \relax (x)^{3} + \sin \relax (x)\right )}}{4 \, {\left (\sin \relax (x)^{4} - 2 \, \sin \relax (x)^{2} + 1\right )}} + \frac {4 \, \sin \relax (x)^{2} - 3}{4 \, {\left (\sin \relax (x)^{4} - 2 \, \sin \relax (x)^{2} + 1\right )}} + \frac {5}{4 \, {\left (\sin \relax (x)^{2} - 1\right )}^{2}} - \frac {1}{2} \, \log \left (\sin \relax (x)^{2} - 1\right ) + \frac {1}{2} \, \log \left (\sin \relax (x) + 1\right ) - \frac {1}{2} \, \log \left (\sin \relax (x) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)+tan(x))^5,x, algorithm="maxima")

[Out]

5/2*tan(x)^4 + 5/8*(5*sin(x)^3 - 3*sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) - 1/8*(3*sin(x)^3 - 5*sin(x))/(sin(x)^4
 - 2*sin(x)^2 + 1) + 5/4*(sin(x)^3 + sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) + 1/4*(4*sin(x)^2 - 3)/(sin(x)^4 - 2*
sin(x)^2 + 1) + 5/4/(sin(x)^2 - 1)^2 - 1/2*log(sin(x)^2 - 1) + 1/2*log(sin(x) + 1) - 1/2*log(sin(x) - 1)

________________________________________________________________________________________

mupad [B]  time = 2.44, size = 59, normalized size = 1.97 \[ \ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )-2\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )+\frac {8\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-4\,\mathrm {tan}\left (\frac {x}{2}\right )+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(x) + 1/cos(x))^5,x)

[Out]

log(tan(x/2)^2 + 1) - 2*log(tan(x/2) - 1) + (8*tan(x/2)^2)/(6*tan(x/2)^2 - 4*tan(x/2) - 4*tan(x/2)^3 + tan(x/2
)^4 + 1)

________________________________________________________________________________________

sympy [B]  time = 7.13, size = 68, normalized size = 2.27 \[ - \frac {\log {\left (\sin {\relax (x )} - 1 \right )}}{2} + \frac {\log {\left (\sin {\relax (x )} + 1 \right )}}{2} + \frac {\log {\left (\sec ^{2}{\relax (x )} \right )}}{2} + \frac {5 \tan ^{4}{\relax (x )}}{2} + \frac {3 \sec ^{4}{\relax (x )}}{2} - \sec ^{2}{\relax (x )} + \frac {32 \sin ^{3}{\relax (x )}}{8 \sin ^{4}{\relax (x )} - 16 \sin ^{2}{\relax (x )} + 8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)+tan(x))**5,x)

[Out]

-log(sin(x) - 1)/2 + log(sin(x) + 1)/2 + log(sec(x)**2)/2 + 5*tan(x)**4/2 + 3*sec(x)**4/2 - sec(x)**2 + 32*sin
(x)**3/(8*sin(x)**4 - 16*sin(x)**2 + 8)

________________________________________________________________________________________