3.795 \(\int \sin (x) \tan ^2(x) \, dx\)

Optimal. Leaf size=5 \[ \cos (x)+\sec (x) \]

[Out]

cos(x)+sec(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2590, 14} \[ \cos (x)+\sec (x) \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]*Tan[x]^2,x]

[Out]

Cos[x] + Sec[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2590

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rubi steps

\begin {align*} \int \sin (x) \tan ^2(x) \, dx &=-\operatorname {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,\cos (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,\cos (x)\right )\\ &=\cos (x)+\sec (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 5, normalized size = 1.00 \[ \cos (x)+\sec (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]*Tan[x]^2,x]

[Out]

Cos[x] + Sec[x]

________________________________________________________________________________________

fricas [B]  time = 0.70, size = 11, normalized size = 2.20 \[ \frac {\cos \relax (x)^{2} + 1}{\cos \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(cos(x)^2 + 1)/cos(x)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 7, normalized size = 1.40 \[ \frac {1}{\cos \relax (x)} + \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/cos(x) + cos(x)

________________________________________________________________________________________

maple [B]  time = 0.04, size = 20, normalized size = 4.00 \[ \frac {\sin ^{4}\relax (x )}{\cos \relax (x )}+\left (2+\sin ^{2}\relax (x )\right ) \cos \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)*tan(x)^2,x)

[Out]

sin(x)^4/cos(x)+(2+sin(x)^2)*cos(x)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 7, normalized size = 1.40 \[ \frac {1}{\cos \relax (x)} + \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/cos(x) + cos(x)

________________________________________________________________________________________

mupad [B]  time = 3.00, size = 7, normalized size = 1.40 \[ \cos \relax (x)+\frac {1}{\cos \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)*tan(x)^2,x)

[Out]

cos(x) + 1/cos(x)

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 7, normalized size = 1.40 \[ \cos {\relax (x )} + \frac {1}{\cos {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

cos(x) + 1/cos(x)

________________________________________________________________________________________