### 3.83 $$\int \tan ^4(x) \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.008007, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 4, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.5, Rules used = {3473, 8} $x+\frac{\tan ^3(x)}{3}-\tan (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[Tan[x]^4,x]

[Out]

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

Rule 3473

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 8

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

Rubi steps

\begin{align*} \int \tan ^4(x) \, dx &=\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{align*}

Mathematica [A]  time = 0.0040879, size = 18, normalized size = 1.29 $x-\frac{4 \tan (x)}{3}+\frac{1}{3} \tan (x) \sec ^2(x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Tan[x]^4,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 13, normalized size = 0.9 \begin{align*} x-\tan \left ( x \right ) +{\frac{ \left ( \tan \left ( x \right ) \right ) ^{3}}{3}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^4,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.41, size = 16, normalized size = 1.14 \begin{align*} \frac{1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end{align*}

Veriﬁcation 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 = 1.9097, size = 36, normalized size = 2.57 \begin{align*} \frac{1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end{align*}

Veriﬁcation 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.065726, size = 19, normalized size = 1.36 \begin{align*} x + \frac{\sin ^{3}{\left (x \right )}}{3 \cos ^{3}{\left (x \right )}} - \frac{\sin{\left (x \right )}}{\cos{\left (x \right )}} \end{align*}

Veriﬁcation 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 = 1.05466, size = 16, normalized size = 1.14 \begin{align*} \frac{1}{3} \, \tan \left (x\right )^{3} + x - \tan \left (x\right ) \end{align*}

Veriﬁcation 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)