Optimal. Leaf size=12 \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.019235, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 4, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3767, 8, 2554, 3473} \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3767
Rule 8
Rule 2554
Rule 3473
Rubi steps
\begin{align*} \int \log (\cos (x)) \sec ^2(x) \, dx &=\log (\cos (x)) \tan (x)+\int \tan ^2(x) \, dx\\ &=\tan (x)+\log (\cos (x)) \tan (x)-\int 1 \, dx\\ &=-x+\tan (x)+\log (\cos (x)) \tan (x)\\ \end{align*}
Mathematica [A] time = 0.015091, size = 12, normalized size = 1. \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.037, size = 61, normalized size = 5.1 \begin{align*}{\frac{-2\,i{{\rm e}^{2\,ix}}\ln \left ( 2\,\cos \left ( x \right ) \right ) }{1+{{\rm e}^{2\,ix}}}}+{\frac{2\,i}{1+{{\rm e}^{2\,ix}}}}+i\ln \left ( 1+{{\rm e}^{2\,ix}} \right ) -{\frac{2\,i\ln \left ( 2 \right ) }{1+{{\rm e}^{2\,ix}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.42825, size = 127, normalized size = 10.58 \begin{align*} -\frac{2 \, \log \left (-\frac{\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1}{\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1}\right ) \sin \left (x\right )}{{\left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right )}{\left (\cos \left (x\right ) + 1\right )}} - \frac{2 \, \sin \left (x\right )}{{\left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right )}{\left (\cos \left (x\right ) + 1\right )}} - 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.8679, size = 68, normalized size = 5.67 \begin{align*} -\frac{x \cos \left (x\right ) - \log \left (\cos \left (x\right )\right ) \sin \left (x\right ) - \sin \left (x\right )}{\cos \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 135.385, size = 15, normalized size = 1.25 \begin{align*} - x + \log{\left (\cos{\left (x \right )} \right )} \tan{\left (x \right )} + \frac{\sin{\left (x \right )}}{\cos{\left (x \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0774, size = 16, normalized size = 1.33 \begin{align*} \log \left (\cos \left (x\right )\right ) \tan \left (x\right ) - x + \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]