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

Optimal. Leaf size=14 \[ \frac {\cos ^2(x)}{2}-\log (\cos (x)) \]

[Out]

1/2*cos(x)^2-ln(cos(x))

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 14, 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} \[ \frac {\cos ^2(x)}{2}-\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Cos[x]^2/2 - Log[Cos[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 ^2(x) \tan (x) \, dx &=-\operatorname {Subst}\left (\int \frac {1-x^2}{x} \, dx,x,\cos (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (\frac {1}{x}-x\right ) \, dx,x,\cos (x)\right )\\ &=\frac {\cos ^2(x)}{2}-\log (\cos (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 14, normalized size = 1.00 \[ \frac {\cos ^2(x)}{2}-\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Cos[x]^2/2 - Log[Cos[x]]

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 14, normalized size = 1.00 \[ \frac {1}{2} \, \cos \relax (x)^{2} - \log \left (-\cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.92, size = 18, normalized size = 1.29 \[ -\frac {1}{2} \, \sin \relax (x)^{2} - \frac {1}{2} \, \log \left (-\sin \relax (x)^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 13, normalized size = 0.93 \[ -\frac {\left (\sin ^{2}\relax (x )\right )}{2}-\ln \left (\cos \relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*sin(x)^2-ln(cos(x))

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 16, normalized size = 1.14 \[ -\frac {1}{2} \, \sin \relax (x)^{2} - \frac {1}{2} \, \log \left (\sin \relax (x)^{2} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*sin(x)^2 - 1/2*log(sin(x)^2 - 1)

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 16, normalized size = 1.14 \[ \frac {{\cos \relax (x)}^2}{2}+\frac {\ln \left ({\mathrm {tan}\relax (x)}^2+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 0.71 \[ - \log {\left (\cos {\relax (x )} \right )} + \frac {\cos ^{2}{\relax (x )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(cos(x)) + cos(x)**2/2

________________________________________________________________________________________