3.2.34 \(\int \tan ^4(x) \, dx\) [134]

Optimal. Leaf size=14 \[ x-\tan (x)+\frac {\tan ^3(x)}{3} \]

[Out]

x-tan(x)+1/3*tan(x)^3

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 14, 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, 8} \begin {gather*} x+\frac {\tan ^3(x)}{3}-\tan (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[x]^4,x]

[Out]

x - Tan[x] + Tan[x]^3/3

Rule 8

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

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]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\frac {\tan ^3(x)}{3}-\int \tan ^2(x) \, dx\\ &=-\tan (x)+\frac {\tan ^3(x)}{3}+\int 1 \, dx\\ &=x-\tan (x)+\frac {\tan ^3(x)}{3}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 18, normalized size = 1.29 \begin {gather*} x-\frac {4 \tan (x)}{3}+\frac {1}{3} \sec ^2(x) \tan (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^4,x]

[Out]

x - (4*Tan[x])/3 + (Sec[x]^2*Tan[x])/3

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 15, normalized size = 1.07

method result size
norman \(x -\tan \left (x \right )+\frac {\left (\tan ^{3}\left (x \right )\right )}{3}\) \(13\)
parallelrisch \(x -\tan \left (x \right )+\frac {\left (\tan ^{3}\left (x \right )\right )}{3}\) \(13\)
derivativedivides \(\frac {\left (\tan ^{3}\left (x \right )\right )}{3}-\tan \left (x \right )+\arctan \left (\tan \left (x \right )\right )\) \(15\)
default \(\frac {\left (\tan ^{3}\left (x \right )\right )}{3}-\tan \left (x \right )+\arctan \left (\tan \left (x \right )\right )\) \(15\)
risch \(x -\frac {4 i \left (3 \,{\mathrm e}^{4 i x}+3 \,{\mathrm e}^{2 i x}+2\right )}{3 \left ({\mathrm e}^{2 i x}+1\right )^{3}}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*tan(x)^3-tan(x)+arctan(tan(x))

________________________________________________________________________________________

Maxima [A]
time = 0.43, size = 12, normalized size = 0.86 \begin {gather*} \frac {1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*tan(x)^3 + x - tan(x)

________________________________________________________________________________________

Fricas [A]
time = 0.58, size = 12, normalized size = 0.86 \begin {gather*} \frac {1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*tan(x)^3 + x - tan(x)

________________________________________________________________________________________

Sympy [A]
time = 0.02, size = 19, normalized size = 1.36 \begin {gather*} x + \frac {\sin ^{3}{\left (x \right )}}{3 \cos ^{3}{\left (x \right )}} - \frac {\sin {\left (x \right )}}{\cos {\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)**4,x)

[Out]

x + sin(x)**3/(3*cos(x)**3) - sin(x)/cos(x)

________________________________________________________________________________________

Giac [A]
time = 0.51, size = 12, normalized size = 0.86 \begin {gather*} \frac {1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^4,x, algorithm="giac")

[Out]

1/3*tan(x)^3 + x - tan(x)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 12, normalized size = 0.86 \begin {gather*} \frac {{\mathrm {tan}\left (x\right )}^3}{3}-\mathrm {tan}\left (x\right )+x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^4,x)

[Out]

x - tan(x) + tan(x)^3/3

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 25, normalized size = 1.79 \begin {gather*} \frac {\left (\tan ^{4}\left (x \right )\right )}{3}+\frac {\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{6}-\frac {\ln \left (\sec \left (x \right )-\tan \left (x \right )\right )}{6} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

int(tan(x)^4,x)

[Out]

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

________________________________________________________________________________________