Optimal. Leaf size=17 \[ \frac {\log (x)}{2}-\frac {1}{2} \cos (\log (x)) \sin (\log (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2715, 8}
\begin {gather*} \frac {\log (x)}{2}-\frac {1}{2} \sin (\log (x)) \cos (\log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rubi steps
\begin {align*} \int \frac {\sin ^2(\log (x))}{x} \, dx &=\text {Subst}\left (\int \sin ^2(x) \, dx,x,\log (x)\right )\\ &=-\frac {1}{2} \cos (\log (x)) \sin (\log (x))+\frac {1}{2} \text {Subst}(\int 1 \, dx,x,\log (x))\\ &=\frac {\log (x)}{2}-\frac {1}{2} \cos (\log (x)) \sin (\log (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 16, normalized size = 0.94 \begin {gather*} \frac {\log (x)}{2}-\frac {1}{4} \sin (2 \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 14, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {\ln \left (x \right )}{2}-\frac {\cos \left (\ln \left (x \right )\right ) \sin \left (\ln \left (x \right )\right )}{2}\) | \(14\) |
default | \(\frac {\ln \left (x \right )}{2}-\frac {\cos \left (\ln \left (x \right )\right ) \sin \left (\ln \left (x \right )\right )}{2}\) | \(14\) |
risch | \(\frac {\ln \left (x \right )}{2}+\frac {i x^{2 i}}{8}-\frac {i x^{-2 i}}{8}\) | \(24\) |
norman | \(\frac {\tan ^{3}\left (\frac {\ln \left (x \right )}{2}\right )+\frac {\ln \left (x \right )}{2}+\ln \left (x \right ) \left (\tan ^{2}\left (\frac {\ln \left (x \right )}{2}\right )\right )+\frac {\ln \left (x \right ) \left (\tan ^{4}\left (\frac {\ln \left (x \right )}{2}\right )\right )}{2}-\tan \left (\frac {\ln \left (x \right )}{2}\right )}{\left (1+\tan ^{2}\left (\frac {\ln \left (x \right )}{2}\right )\right )^{2}}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 12, normalized size = 0.71 \begin {gather*} \frac {1}{2} \, \log \left (x\right ) - \frac {1}{4} \, \sin \left (2 \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 13, normalized size = 0.76 \begin {gather*} -\frac {1}{2} \, \cos \left (\log \left (x\right )\right ) \sin \left (\log \left (x\right )\right ) + \frac {1}{2} \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 156 vs.
\(2 (15) = 30\).
time = 1.70, size = 156, normalized size = 9.18 \begin {gather*} \frac {\log {\left (x \right )} \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )}}{2 \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 4 \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 2} + \frac {2 \log {\left (x \right )} \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )}}{2 \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 4 \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 2} + \frac {\log {\left (x \right )}}{2 \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 4 \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 2} + \frac {2 \tan ^{3}{\left (\frac {\log {\left (x \right )}}{2} \right )}}{2 \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 4 \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 2} - \frac {2 \tan {\left (\frac {\log {\left (x \right )}}{2} \right )}}{2 \tan ^{4}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 4 \tan ^{2}{\left (\frac {\log {\left (x \right )}}{2} \right )} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 7.75, size = 12, normalized size = 0.71 \begin {gather*} \frac {1}{2} \, \log \left (x\right ) - \frac {1}{4} \, \sin \left (2 \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.38, size = 12, normalized size = 0.71 \begin {gather*} \frac {\ln \left (x\right )}{2}-\frac {\sin \left (2\,\ln \left (x\right )\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________