\(\int \sin ^2(\log (x)) \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 5, antiderivative size = 27 \[ \int \sin ^2(\log (x)) \, dx=\frac {2 x}{5}-\frac {2}{5} x \cos (\log (x)) \sin (\log (x))+\frac {1}{5} x \sin ^2(\log (x)) \]

[Out]

2/5*x-2/5*x*cos(ln(x))*sin(ln(x))+1/5*x*sin(ln(x))^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4565, 8} \[ \int \sin ^2(\log (x)) \, dx=\frac {2 x}{5}+\frac {1}{5} x \sin ^2(\log (x))-\frac {2}{5} x \sin (\log (x)) \cos (\log (x)) \]

[In]

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

[Out]

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

Rule 8

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

Rule 4565

Int[Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_), x_Symbol] :> Simp[x*(Sin[d*(a + b*Log[c*x^n])]^p/(b
^2*d^2*n^2*p^2 + 1)), x] + (Dist[b^2*d^2*n^2*p*((p - 1)/(b^2*d^2*n^2*p^2 + 1)), Int[Sin[d*(a + b*Log[c*x^n])]^
(p - 2), x], x] - Simp[b*d*n*p*x*Cos[d*(a + b*Log[c*x^n])]*(Sin[d*(a + b*Log[c*x^n])]^(p - 1)/(b^2*d^2*n^2*p^2
 + 1)), x]) /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + 1, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2}{5} x \cos (\log (x)) \sin (\log (x))+\frac {1}{5} x \sin ^2(\log (x))+\frac {2 \int 1 \, dx}{5} \\ & = \frac {2 x}{5}-\frac {2}{5} x \cos (\log (x)) \sin (\log (x))+\frac {1}{5} x \sin ^2(\log (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \sin ^2(\log (x)) \, dx=\frac {x}{2}-\frac {1}{10} x \cos (2 \log (x))-\frac {1}{5} x \sin (2 \log (x)) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67

method result size
parallelrisch \(-\frac {x \left (-5+\cos \left (2 \ln \left (x \right )\right )+2 \sin \left (2 \ln \left (x \right )\right )\right )}{10}\) \(18\)
default \(\frac {\left (\sin \left (\ln \left (x \right )\right )-2 \cos \left (\ln \left (x \right )\right )\right ) x \sin \left (\ln \left (x \right )\right )}{5}+\frac {2 x}{5}\) \(20\)
risch \(\frac {x}{2}+\left (-\frac {1}{20}+\frac {i}{10}\right ) x \,x^{2 i}+\left (-\frac {1}{20}-\frac {i}{10}\right ) x \,x^{-2 i}\) \(27\)
norman \(\frac {\frac {2 x}{5}-\frac {4 x \tan \left (\frac {\ln \left (x \right )}{2}\right )}{5}+\frac {8 x \tan \left (\frac {\ln \left (x \right )}{2}\right )^{2}}{5}+\frac {4 x \tan \left (\frac {\ln \left (x \right )}{2}\right )^{3}}{5}+\frac {2 x \tan \left (\frac {\ln \left (x \right )}{2}\right )^{4}}{5}}{\left (1+\tan \left (\frac {\ln \left (x \right )}{2}\right )^{2}\right )^{2}}\) \(55\)

[In]

int(sin(ln(x))^2,x,method=_RETURNVERBOSE)

[Out]

-1/10*x*(-5+cos(2*ln(x))+2*sin(2*ln(x)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \sin ^2(\log (x)) \, dx=-\frac {1}{5} \, x \cos \left (\log \left (x\right )\right )^{2} - \frac {2}{5} \, x \cos \left (\log \left (x\right )\right ) \sin \left (\log \left (x\right )\right ) + \frac {3}{5} \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.37 \[ \int \sin ^2(\log (x)) \, dx=\frac {3 x \sin ^{2}{\left (\log {\left (x \right )} \right )}}{5} - \frac {2 x \sin {\left (\log {\left (x \right )} \right )} \cos {\left (\log {\left (x \right )} \right )}}{5} + \frac {2 x \cos ^{2}{\left (\log {\left (x \right )} \right )}}{5} \]

[In]

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

[Out]

3*x*sin(log(x))**2/5 - 2*x*sin(log(x))*cos(log(x))/5 + 2*x*cos(log(x))**2/5

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.74 \[ \int \sin ^2(\log (x)) \, dx=-\frac {1}{10} \, x \cos \left (2 \, \log \left (x\right )\right ) - \frac {1}{5} \, x \sin \left (2 \, \log \left (x\right )\right ) + \frac {1}{2} \, x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \sin ^2(\log (x)) \, dx=-\frac {1}{5} \, x \cos \left (\log \left (x\right )\right )^{2} - \frac {2}{5} \, x \cos \left (\log \left (x\right )\right ) \sin \left (\log \left (x\right )\right ) + \frac {3}{5} \, x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 16.20 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89 \[ \int \sin ^2(\log (x)) \, dx=\frac {x}{2}+\frac {x\,\left (2\,{\sin \left (\ln \left (x\right )\right )}^2-1\right )}{10}-\frac {x\,\sin \left (2\,\ln \left (x\right )\right )}{5} \]

[In]

int(sin(log(x))^2,x)

[Out]

x/2 + (x*(2*sin(log(x))^2 - 1))/10 - (x*sin(2*log(x)))/5