Optimal. Leaf size=12 \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 4, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3767, 8, 2554, 3473} \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2554
Rule 3473
Rule 3767
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.02, size = 12, normalized size = 1.00 \[ -x+\tan (x)+\tan (x) \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 22, normalized size = 1.83 \[ -\frac {x \cos \relax (x) - \log \left (\cos \relax (x)\right ) \sin \relax (x) - \sin \relax (x)}{\cos \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 12, normalized size = 1.00 \[ \log \left (\cos \relax (x)\right ) \tan \relax (x) - x + \tan \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.58, size = 61, normalized size = 5.08 \[ -\frac {2 i {\mathrm e}^{2 i x} \ln \left (2 \cos \relax (x )\right )}{{\mathrm e}^{2 i x}+1}+i \ln \left ({\mathrm e}^{2 i x}+1\right )+\frac {2 i}{{\mathrm e}^{2 i x}+1}-\frac {2 i \ln \relax (2)}{{\mathrm e}^{2 i x}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.00, size = 94, normalized size = 7.83 \[ -\frac {2 \, \log \left (-\frac {\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1}{\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1}\right ) \sin \relax (x)}{{\left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1\right )} {\left (\cos \relax (x) + 1\right )}} - \frac {2 \, \sin \relax (x)}{{\left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1\right )} {\left (\cos \relax (x) + 1\right )}} - 2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.58, size = 35, normalized size = 2.92 \[ \mathrm {tan}\relax (x)-2\,x+\ln \left (\cos \relax (x)\right )\,\mathrm {tan}\relax (x)+\ln \left (\cos \relax (x)\right )\,1{}\mathrm {i}-\ln \left (\cos \left (2\,x\right )+1+\sin \left (2\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 18.33, size = 15, normalized size = 1.25 \[ - x + \log {\left (\cos {\relax (x )} \right )} \tan {\relax (x )} + \frac {\sin {\relax (x )}}{\cos {\relax (x )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________