Optimal. Leaf size=14 \[ \frac{\cos ^2(x)}{2}-\log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0150215, antiderivative size = 14, normalized size of antiderivative = 1., 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]
[Out]
Rule 2590
Rule 14
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.0052021, size = 14, normalized size = 1. \[ \frac{\cos ^2(x)}{2}-\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 13, normalized size = 0.9 \begin{align*} -{\frac{ \left ( \sin \left ( x \right ) \right ) ^{2}}{2}}-\ln \left ( \cos \left ( x \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.92659, size = 22, normalized size = 1.57 \begin{align*} -\frac{1}{2} \, \sin \left (x\right )^{2} - \frac{1}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.16732, size = 39, normalized size = 2.79 \begin{align*} \frac{1}{2} \, \cos \left (x\right )^{2} - \log \left (-\cos \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.076593, size = 10, normalized size = 0.71 \begin{align*} - \log{\left (\cos{\left (x \right )} \right )} + \frac{\cos ^{2}{\left (x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08055, size = 24, normalized size = 1.71 \begin{align*} -\frac{1}{2} \, \sin \left (x\right )^{2} - \frac{1}{2} \, \log \left (-\sin \left (x\right )^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]