3.140 \(\int \frac{\sin ^2(\log (x))}{x} \, dx\)

Optimal. Leaf size=17 \[ \frac{\log (x)}{2}-\frac{1}{2} \sin (\log (x)) \cos (\log (x)) \]

[Out]

Log[x]/2 - (Cos[Log[x]]*Sin[Log[x]])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0199459, antiderivative size = 17, normalized size of antiderivative = 1., 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 = {2635, 8} \[ \frac{\log (x)}{2}-\frac{1}{2} \sin (\log (x)) \cos (\log (x)) \]

Antiderivative was successfully verified.

[In]

Int[Sin[Log[x]]^2/x,x]

[Out]

Log[x]/2 - (Cos[Log[x]]*Sin[Log[x]])/2

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\sin ^2(\log (x))}{x} \, dx &=\operatorname{Subst}\left (\int \sin ^2(x) \, dx,x,\log (x)\right )\\ &=-\frac{1}{2} \cos (\log (x)) \sin (\log (x))+\frac{1}{2} \operatorname{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.013997, size = 16, normalized size = 0.94 \[ \frac{\log (x)}{2}-\frac{1}{4} \sin (2 \log (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[Log[x]]^2/x,x]

[Out]

Log[x]/2 - Sin[2*Log[x]]/4

________________________________________________________________________________________

Maple [A]  time = 0.02, size = 14, normalized size = 0.8 \begin{align*}{\frac{\ln \left ( x \right ) }{2}}-{\frac{\cos \left ( \ln \left ( x \right ) \right ) \sin \left ( \ln \left ( x \right ) \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(ln(x))^2/x,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.12501, size = 16, normalized size = 0.94 \begin{align*} \frac{1}{2} \, \log \left (x\right ) - \frac{1}{4} \, \sin \left (2 \, \log \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(log(x))^2/x,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.23494, size = 58, normalized size = 3.41 \begin{align*} -\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{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(log(x))^2/x,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 4.99746, size = 156, normalized size = 9.18 \begin{align*} \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{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(ln(x))**2/x,x)

[Out]

log(x)*tan(log(x)/2)**4/(2*tan(log(x)/2)**4 + 4*tan(log(x)/2)**2 + 2) + 2*log(x)*tan(log(x)/2)**2/(2*tan(log(x
)/2)**4 + 4*tan(log(x)/2)**2 + 2) + log(x)/(2*tan(log(x)/2)**4 + 4*tan(log(x)/2)**2 + 2) + 2*tan(log(x)/2)**3/
(2*tan(log(x)/2)**4 + 4*tan(log(x)/2)**2 + 2) - 2*tan(log(x)/2)/(2*tan(log(x)/2)**4 + 4*tan(log(x)/2)**2 + 2)

________________________________________________________________________________________

Giac [A]  time = 1.29689, size = 16, normalized size = 0.94 \begin{align*} \frac{1}{2} \, \log \left (x\right ) - \frac{1}{4} \, \sin \left (2 \, \log \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(log(x))^2/x,x, algorithm="giac")

[Out]

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