3.42 \(\int \tan ^2(x) \, dx\)

Optimal. Leaf size=6 \[ \tan (x)-x \]

[Out]

-x+tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3473, 8} \[ \tan (x)-x \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^2,x]

[Out]

-x + Tan[x]

Rule 8

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

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]

Rubi steps

\begin {align*} \int \tan ^2(x) \, dx &=\tan (x)-\int 1 \, dx\\ &=-x+\tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 6, normalized size = 1.00 \[ \tan (x)-x \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^2,x]

[Out]

-x + Tan[x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 6, normalized size = 1.00 \[ -x + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + tan(x)

________________________________________________________________________________________

giac [A]  time = 0.01, size = 6, normalized size = 1.00 \[ -x + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + tan(x)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 7, normalized size = 1.17 \[ -x +\tan \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^2,x)

[Out]

-x+tan(x)

________________________________________________________________________________________

maxima [A]  time = 1.22, size = 6, normalized size = 1.00 \[ -x + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + tan(x)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 6, normalized size = 1.00 \[ \mathrm {tan}\relax (x)-x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^2,x)

[Out]

tan(x) - x

________________________________________________________________________________________

sympy [B]  time = 0.07, size = 7, normalized size = 1.17 \[ - x + \frac {\sin {\relax (x )}}{\cos {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)**2,x)

[Out]

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

________________________________________________________________________________________