3.1.90 \(\int \tan ^5(x) \, dx\) [90]

Optimal. Leaf size=22 \[ -\log (\cos (x))-\frac {\tan ^2(x)}{2}+\frac {\tan ^4(x)}{4} \]

[Out]

-ln(cos(x))-1/2*tan(x)^2+1/4*tan(x)^4

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 22, 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 = {3554, 3556} \begin {gather*} \frac {\tan ^4(x)}{4}-\frac {\tan ^2(x)}{2}-\log (\cos (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[x]^5,x]

[Out]

-Log[Cos[x]] - Tan[x]^2/2 + Tan[x]^4/4

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3556

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

Rubi steps

\begin {align*} \int \tan ^5(x) \, dx &=\frac {\tan ^4(x)}{4}-\int \tan ^3(x) \, dx\\ &=-\frac {1}{2} \tan ^2(x)+\frac {\tan ^4(x)}{4}+\int \tan (x) \, dx\\ &=-\log (\cos (x))-\frac {\tan ^2(x)}{2}+\frac {\tan ^4(x)}{4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 20, normalized size = 0.91 \begin {gather*} -\log (\cos (x))-\sec ^2(x)+\frac {\sec ^4(x)}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^5,x]

[Out]

-Log[Cos[x]] - Sec[x]^2 + Sec[x]^4/4

________________________________________________________________________________________

Mathics [A]
time = 1.88, size = 18, normalized size = 0.82 \begin {gather*} -\text {Log}\left [\text {Cos}\left [x\right ]\right ]-\frac {1}{\text {Cos}\left [x\right ]^2}+\frac {1}{4 \text {Cos}\left [x\right ]^4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 23, normalized size = 1.05

method result size
derivativedivides \(\frac {\left (\tan ^{4}\left (x \right )\right )}{4}-\frac {\left (\tan ^{2}\left (x \right )\right )}{2}+\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(23\)
default \(\frac {\left (\tan ^{4}\left (x \right )\right )}{4}-\frac {\left (\tan ^{2}\left (x \right )\right )}{2}+\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(23\)
norman \(\frac {\left (\tan ^{4}\left (x \right )\right )}{4}-\frac {\left (\tan ^{2}\left (x \right )\right )}{2}+\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(23\)
risch \(i x -\frac {4 \left ({\mathrm e}^{6 i x}+{\mathrm e}^{4 i x}+{\mathrm e}^{2 i x}\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}-\ln \left ({\mathrm e}^{2 i x}+1\right )\) \(43\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*tan(x)^4-1/2*tan(x)^2+1/2*ln(1+tan(x)^2)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 34, normalized size = 1.55 \begin {gather*} \frac {4 \, \sin \left (x\right )^{2} - 3}{4 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} - \frac {1}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 24, normalized size = 1.09 \begin {gather*} \frac {1}{4} \, \tan \left (x\right )^{4} - \frac {1}{2} \, \tan \left (x\right )^{2} - \frac {1}{2} \, \log \left (\frac {1}{\tan \left (x\right )^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 20, normalized size = 0.91 \begin {gather*} - \frac {4 \cos ^{2}{\left (x \right )} - 1}{4 \cos ^{4}{\left (x \right )}} - \log {\left (\cos {\left (x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(4*cos(x)**2 - 1)/(4*cos(x)**4) - log(cos(x))

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 26, normalized size = 1.18 \begin {gather*} \frac {\tan ^{4}x-2 \tan ^{2}x}{4}+\frac {\ln \left (\tan ^{2}x+1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^5,x)

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 18, normalized size = 0.82 \begin {gather*} \frac {{\mathrm {tan}\left (x\right )}^4}{4}-\frac {{\mathrm {tan}\left (x\right )}^2}{2}-\ln \left (\cos \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^5,x)

[Out]

tan(x)^4/4 - tan(x)^2/2 - log(cos(x))

________________________________________________________________________________________