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

Optimal. Leaf size=29 \[ \frac{\log (x)}{8}-\frac{1}{4} \sin (\log (x)) \cos ^3(\log (x))+\frac{1}{8} \sin (\log (x)) \cos (\log (x)) \]

[Out]

Log[x]/8 + (Cos[Log[x]]*Sin[Log[x]])/8 - (Cos[Log[x]]^3*Sin[Log[x]])/4

________________________________________________________________________________________

Rubi [A]  time = 0.0563327, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {2568, 2635, 8} \[ \frac{\log (x)}{8}-\frac{1}{4} \sin (\log (x)) \cos ^3(\log (x))+\frac{1}{8} \sin (\log (x)) \cos (\log (x)) \]

Antiderivative was successfully verified.

[In]

Int[(Cos[Log[x]]^2*Sin[Log[x]]^2)/x,x]

[Out]

Log[x]/8 + (Cos[Log[x]]*Sin[Log[x]])/8 - (Cos[Log[x]]^3*Sin[Log[x]])/4

Rule 2568

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(a*(b*Cos[e
+ f*x])^(n + 1)*(a*Sin[e + f*x])^(m - 1))/(b*f*(m + n)), x] + Dist[(a^2*(m - 1))/(m + n), Int[(b*Cos[e + f*x])
^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[2*
m, 2*n]

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{\cos ^2(\log (x)) \sin ^2(\log (x))}{x} \, dx &=\operatorname{Subst}\left (\int \cos ^2(x) \sin ^2(x) \, dx,x,\log (x)\right )\\ &=-\frac{1}{4} \cos ^3(\log (x)) \sin (\log (x))+\frac{1}{4} \operatorname{Subst}\left (\int \cos ^2(x) \, dx,x,\log (x)\right )\\ &=\frac{1}{8} \cos (\log (x)) \sin (\log (x))-\frac{1}{4} \cos ^3(\log (x)) \sin (\log (x))+\frac{1}{8} \operatorname{Subst}(\int 1 \, dx,x,\log (x))\\ &=\frac{\log (x)}{8}+\frac{1}{8} \cos (\log (x)) \sin (\log (x))-\frac{1}{4} \cos ^3(\log (x)) \sin (\log (x))\\ \end{align*}

Mathematica [A]  time = 0.0164266, size = 16, normalized size = 0.55 \[ \frac{\log (x)}{8}-\frac{1}{32} \sin (4 \log (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[Log[x]]^2*Sin[Log[x]]^2)/x,x]

[Out]

Log[x]/8 - Sin[4*Log[x]]/32

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 24, normalized size = 0.8 \begin{align*}{\frac{\ln \left ( x \right ) }{8}}+{\frac{\cos \left ( \ln \left ( x \right ) \right ) \sin \left ( \ln \left ( x \right ) \right ) }{8}}-{\frac{ \left ( \cos \left ( \ln \left ( x \right ) \right ) \right ) ^{3}\sin \left ( \ln \left ( x \right ) \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*ln(x)+1/8*cos(ln(x))*sin(ln(x))-1/4*cos(ln(x))^3*sin(ln(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*log(x) - 1/32*sin(4*log(x))

________________________________________________________________________________________

Fricas [A]  time = 2.1343, size = 85, normalized size = 2.93 \begin{align*} -\frac{1}{8} \,{\left (2 \, \cos \left (\log \left (x\right )\right )^{3} - \cos \left (\log \left (x\right )\right )\right )} \sin \left (\log \left (x\right )\right ) + \frac{1}{8} \, \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 66.3406, size = 476, normalized size = 16.41 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x)*tan(log(x)/2)**8/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4 + 32*tan(log(x)/2)**2
+ 8) + 4*log(x)*tan(log(x)/2)**6/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4 + 32*tan(log(
x)/2)**2 + 8) + 6*log(x)*tan(log(x)/2)**4/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4 + 32
*tan(log(x)/2)**2 + 8) + 4*log(x)*tan(log(x)/2)**2/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2
)**4 + 32*tan(log(x)/2)**2 + 8) + log(x)/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4 + 32*
tan(log(x)/2)**2 + 8) + 2*tan(log(x)/2)**7/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4 + 3
2*tan(log(x)/2)**2 + 8) - 14*tan(log(x)/2)**5/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**4
+ 32*tan(log(x)/2)**2 + 8) + 14*tan(log(x)/2)**3/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)*
*4 + 32*tan(log(x)/2)**2 + 8) - 2*tan(log(x)/2)/(8*tan(log(x)/2)**8 + 32*tan(log(x)/2)**6 + 48*tan(log(x)/2)**
4 + 32*tan(log(x)/2)**2 + 8)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*log(x) - 1/32*sin(4*log(x))