3.4.55 \(\int \sec ^5(x) \, dx\) [355]

Optimal. Leaf size=26 \[ \frac {3}{8} \tanh ^{-1}(\sin (x))+\frac {3}{8} \sec (x) \tan (x)+\frac {1}{4} \sec ^3(x) \tan (x) \]

[Out]

3/8*arctanh(sin(x))+3/8*sec(x)*tan(x)+1/4*sec(x)^3*tan(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3853, 3855} \begin {gather*} \frac {3}{8} \tanh ^{-1}(\sin (x))+\frac {1}{4} \tan (x) \sec ^3(x)+\frac {3}{8} \tan (x) \sec (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[x]^5,x]

[Out]

(3*ArcTanh[Sin[x]])/8 + (3*Sec[x]*Tan[x])/8 + (Sec[x]^3*Tan[x])/4

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \sec ^5(x) \, dx &=\frac {1}{4} \sec ^3(x) \tan (x)+\frac {3}{4} \int \sec ^3(x) \, dx\\ &=\frac {3}{8} \sec (x) \tan (x)+\frac {1}{4} \sec ^3(x) \tan (x)+\frac {3}{8} \int \sec (x) \, dx\\ &=\frac {3}{8} \tanh ^{-1}(\sin (x))+\frac {3}{8} \sec (x) \tan (x)+\frac {1}{4} \sec ^3(x) \tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(58\) vs. \(2(26)=52\).
time = 0.08, size = 58, normalized size = 2.23 \begin {gather*} \frac {1}{16} \left (-6 \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+6 \log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+\frac {1}{2} \sec ^4(x) (11 \sin (x)+3 \sin (3 x))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^5,x]

[Out]

(-6*Log[Cos[x/2] - Sin[x/2]] + 6*Log[Cos[x/2] + Sin[x/2]] + (Sec[x]^4*(11*Sin[x] + 3*Sin[3*x]))/2)/16

________________________________________________________________________________________

Mathics [A]
time = 2.36, size = 38, normalized size = 1.46 \begin {gather*} \frac {-2 \left (-5+3 \text {Sin}\left [x\right ]^2\right ) \text {Sin}\left [x\right ]+3 \left (\text {Log}\left [1+\text {Sin}\left [x\right ]\right ]-\text {Log}\left [-1+\text {Sin}\left [x\right ]\right ]\right ) \text {Cos}\left [x\right ]^4}{16 \text {Cos}\left [x\right ]^4} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[Sec[x]^5,x]')

[Out]

(-2 (-5 + 3 Sin[x] ^ 2) Sin[x] + 3 (Log[1 + Sin[x]] - Log[-1 + Sin[x]]) Cos[x] ^ 4) / (16 Cos[x] ^ 4)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 25, normalized size = 0.96

method result size
default \(-\left (-\frac {\left (\sec ^{3}\left (x \right )\right )}{4}-\frac {3 \sec \left (x \right )}{8}\right ) \tan \left (x \right )+\frac {3 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\) \(25\)
norman \(\frac {\frac {3 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{4}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{4}+\frac {5 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{4}+\frac {5 \tan \left (\frac {x}{2}\right )}{4}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{4}}-\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{8}+\frac {3 \ln \left (1+\tan \left (\frac {x}{2}\right )\right )}{8}\) \(62\)
risch \(-\frac {i \left (3 \,{\mathrm e}^{7 i x}+11 \,{\mathrm e}^{5 i x}-11 \,{\mathrm e}^{3 i x}-3 \,{\mathrm e}^{i x}\right )}{4 \left ({\mathrm e}^{2 i x}+1\right )^{4}}-\frac {3 \ln \left ({\mathrm e}^{i x}-i\right )}{8}+\frac {3 \ln \left ({\mathrm e}^{i x}+i\right )}{8}\) \(65\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^5,x,method=_RETURNVERBOSE)

[Out]

-(-1/4*sec(x)^3-3/8*sec(x))*tan(x)+3/8*ln(sec(x)+tan(x))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (20) = 40\).
time = 0.26, size = 42, normalized size = 1.62 \begin {gather*} -\frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} + \frac {3}{16} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {3}{16} \, \log \left (\sin \left (x\right ) - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (20) = 40\).
time = 0.40, size = 43, normalized size = 1.65 \begin {gather*} \frac {3 \, \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - 3 \, \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left (3 \, \cos \left (x\right )^{2} + 2\right )} \sin \left (x\right )}{16 \, \cos \left (x\right )^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 46, normalized size = 1.77 \begin {gather*} - \frac {3 \sin ^{3}{\left (x \right )} - 5 \sin {\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} - \frac {3 \log {\left (\sin {\left (x \right )} - 1 \right )}}{16} + \frac {3 \log {\left (\sin {\left (x \right )} + 1 \right )}}{16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 47, normalized size = 1.81 \begin {gather*} 2 \left (-\frac {3}{32} \ln \left (-\sin x+1\right )+\frac {3}{32} \ln \left (\sin x+1\right )-\frac {3 \sin ^{3}x-5 \sin x}{16 \left (\sin ^{2}x-1\right )^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^5,x)

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 29, normalized size = 1.12 \begin {gather*} \frac {3\,\ln \left (\frac {\sin \left (x\right )+1}{\cos \left (x\right )}\right )}{8}+\sin \left (x\right )\,\left (\frac {3}{8\,{\cos \left (x\right )}^2}+\frac {1}{4\,{\cos \left (x\right )}^4}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________