### 3.305 $$\int x^2 \log (\log (x) \sin (x)) \, dx$$

Optimal. Leaf size=98 $\frac{1}{2} i x^2 \text{PolyLog}\left (2,e^{2 i x}\right )-\frac{1}{2} x \text{PolyLog}\left (3,e^{2 i x}\right )-\frac{1}{4} i \text{PolyLog}\left (4,e^{2 i x}\right )-\frac{1}{3} \text{Ei}(3 \log (x))+\frac{i x^4}{12}-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))$

[Out]

(I/12)*x^4 - ExpIntegralEi[3*Log[x]]/3 - (x^3*Log[1 - E^((2*I)*x)])/3 + (x^3*Log[Log[x]*Sin[x]])/3 + (I/2)*x^2
*PolyLog[2, E^((2*I)*x)] - (x*PolyLog[3, E^((2*I)*x)])/2 - (I/4)*PolyLog[4, E^((2*I)*x)]

________________________________________________________________________________________

Rubi [A]  time = 0.290198, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 13, integrand size = 10, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 1.3, Rules used = {30, 2555, 12, 6688, 14, 3717, 2190, 2531, 6609, 2282, 6589, 2309, 2178} $\frac{1}{2} i x^2 \text{PolyLog}\left (2,e^{2 i x}\right )-\frac{1}{2} x \text{PolyLog}\left (3,e^{2 i x}\right )-\frac{1}{4} i \text{PolyLog}\left (4,e^{2 i x}\right )-\frac{1}{3} \text{Ei}(3 \log (x))+\frac{i x^4}{12}-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(I/12)*x^4 - ExpIntegralEi[3*Log[x]]/3 - (x^3*Log[1 - E^((2*I)*x)])/3 + (x^3*Log[Log[x]*Sin[x]])/3 + (I/2)*x^2
*PolyLog[2, E^((2*I)*x)] - (x*PolyLog[3, E^((2*I)*x)])/2 - (I/4)*PolyLog[4, E^((2*I)*x)]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2555

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*Simplify
[D[u, x]/u], x], x] /; InverseFunctionFreeQ[w, x]] /; ProductQ[u]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
&&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3717

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*
(m + 1)), x] - Dist[2*I, Int[((c + d*x)^m*E^(2*I*k*Pi)*E^(2*I*(e + f*x)))/(1 + E^(2*I*k*Pi)*E^(2*I*(e + f*x)))
, x], x] /; FreeQ[{c, d, e, f}, x] && IntegerQ[4*k] && IGtQ[m, 0]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
- Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 6609

Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(p_.)], x_Symbol] :> Simp
[((e + f*x)^m*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p])/(b*c*p*Log[F]), x] - Dist[(f*m)/(b*c*p*Log[F]), Int[(e +
f*x)^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c, d, e, f, n, p}, x] && GtQ[m,
0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 2309

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
+ b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !\$UseGamma === True

Rubi steps

\begin{align*} \int x^2 \log (\log (x) \sin (x)) \, dx &=\frac{1}{3} x^3 \log (\log (x) \sin (x))-\int \frac{x^2 (1+x \cot (x) \log (x))}{3 \log (x)} \, dx\\ &=\frac{1}{3} x^3 \log (\log (x) \sin (x))-\frac{1}{3} \int \frac{x^2 (1+x \cot (x) \log (x))}{\log (x)} \, dx\\ &=\frac{1}{3} x^3 \log (\log (x) \sin (x))-\frac{1}{3} \int x^2 \left (x \cot (x)+\frac{1}{\log (x)}\right ) \, dx\\ &=\frac{1}{3} x^3 \log (\log (x) \sin (x))-\frac{1}{3} \int \left (x^3 \cot (x)+\frac{x^2}{\log (x)}\right ) \, dx\\ &=\frac{1}{3} x^3 \log (\log (x) \sin (x))-\frac{1}{3} \int x^3 \cot (x) \, dx-\frac{1}{3} \int \frac{x^2}{\log (x)} \, dx\\ &=\frac{i x^4}{12}+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\frac{2}{3} i \int \frac{e^{2 i x} x^3}{1-e^{2 i x}} \, dx-\frac{1}{3} \operatorname{Subst}\left (\int \frac{e^{3 x}}{x} \, dx,x,\log (x)\right )\\ &=\frac{i x^4}{12}-\frac{1}{3} \text{Ei}(3 \log (x))-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\int x^2 \log \left (1-e^{2 i x}\right ) \, dx\\ &=\frac{i x^4}{12}-\frac{1}{3} \text{Ei}(3 \log (x))-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\frac{1}{2} i x^2 \text{Li}_2\left (e^{2 i x}\right )-i \int x \text{Li}_2\left (e^{2 i x}\right ) \, dx\\ &=\frac{i x^4}{12}-\frac{1}{3} \text{Ei}(3 \log (x))-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\frac{1}{2} i x^2 \text{Li}_2\left (e^{2 i x}\right )-\frac{1}{2} x \text{Li}_3\left (e^{2 i x}\right )+\frac{1}{2} \int \text{Li}_3\left (e^{2 i x}\right ) \, dx\\ &=\frac{i x^4}{12}-\frac{1}{3} \text{Ei}(3 \log (x))-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\frac{1}{2} i x^2 \text{Li}_2\left (e^{2 i x}\right )-\frac{1}{2} x \text{Li}_3\left (e^{2 i x}\right )-\frac{1}{4} i \operatorname{Subst}\left (\int \frac{\text{Li}_3(x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac{i x^4}{12}-\frac{1}{3} \text{Ei}(3 \log (x))-\frac{1}{3} x^3 \log \left (1-e^{2 i x}\right )+\frac{1}{3} x^3 \log (\log (x) \sin (x))+\frac{1}{2} i x^2 \text{Li}_2\left (e^{2 i x}\right )-\frac{1}{2} x \text{Li}_3\left (e^{2 i x}\right )-\frac{1}{4} i \text{Li}_4\left (e^{2 i x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0587605, size = 95, normalized size = 0.97 $\frac{1}{192} i \left (-96 x^2 \text{PolyLog}\left (2,e^{-2 i x}\right )+96 i x \text{PolyLog}\left (3,e^{-2 i x}\right )+48 \text{PolyLog}\left (4,e^{-2 i x}\right )+64 i \text{Ei}(3 \log (x))-16 x^4+64 i x^3 \log \left (1-e^{-2 i x}\right )-64 i x^3 \log (\log (x) \sin (x))+\pi ^4\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(I/192)*(Pi^4 - 16*x^4 + (64*I)*ExpIntegralEi[3*Log[x]] + (64*I)*x^3*Log[1 - E^((-2*I)*x)] - (64*I)*x^3*Log[Lo
g[x]*Sin[x]] - 96*x^2*PolyLog[2, E^((-2*I)*x)] + (96*I)*x*PolyLog[3, E^((-2*I)*x)] + 48*PolyLog[4, E^((-2*I)*x
)])

________________________________________________________________________________________

Maple [F]  time = 0.273, size = 0, normalized size = 0. \begin{align*} \int{x}^{2}\ln \left ( \ln \left ( x \right ) \sin \left ( x \right ) \right ) \, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 2.04077, size = 127, normalized size = 1.3 \begin{align*} \frac{1}{12} \,{\left (2 i \, \pi - 4 \, \log \left (2\right )\right )} x^{3} - \frac{1}{4} i \, x^{4} + \frac{1}{3} \, x^{3} \log \left (\log \left (x\right )\right ) + i \, x^{2}{\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + i \, x^{2}{\rm Li}_2\left (e^{\left (i \, x\right )}\right ) - 2 \, x{\rm Li}_{3}(-e^{\left (i \, x\right )}) - 2 \, x{\rm Li}_{3}(e^{\left (i \, x\right )}) - \frac{1}{3} \,{\rm Ei}\left (3 \, \log \left (x\right )\right ) - 2 i \,{\rm Li}_{4}(-e^{\left (i \, x\right )}) - 2 i \,{\rm Li}_{4}(e^{\left (i \, x\right )}) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*(2*I*pi - 4*log(2))*x^3 - 1/4*I*x^4 + 1/3*x^3*log(log(x)) + I*x^2*dilog(-e^(I*x)) + I*x^2*dilog(e^(I*x))
- 2*x*polylog(3, -e^(I*x)) - 2*x*polylog(3, e^(I*x)) - 1/3*Ei(3*log(x)) - 2*I*polylog(4, -e^(I*x)) - 2*I*polyl
og(4, e^(I*x))

________________________________________________________________________________________

Fricas [C]  time = 2.59229, size = 848, normalized size = 8.65 \begin{align*} \frac{1}{3} \, x^{3} \log \left (\log \left (x\right ) \sin \left (x\right )\right ) - \frac{1}{6} \, x^{3} \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - \frac{1}{6} \, x^{3} \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - \frac{1}{6} \, x^{3} \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - \frac{1}{6} \, x^{3} \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + \frac{1}{2} i \, x^{2}{\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - \frac{1}{2} i \, x^{2}{\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - \frac{1}{2} i \, x^{2}{\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + \frac{1}{2} i \, x^{2}{\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - x{\rm polylog}\left (3, \cos \left (x\right ) + i \, \sin \left (x\right )\right ) - x{\rm polylog}\left (3, \cos \left (x\right ) - i \, \sin \left (x\right )\right ) - x{\rm polylog}\left (3, -\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - x{\rm polylog}\left (3, -\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - \frac{1}{3} \, \logintegral \left (x^{3}\right ) - i \,{\rm polylog}\left (4, \cos \left (x\right ) + i \, \sin \left (x\right )\right ) + i \,{\rm polylog}\left (4, \cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \,{\rm polylog}\left (4, -\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \,{\rm polylog}\left (4, -\cos \left (x\right ) - i \, \sin \left (x\right )\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*x^3*log(log(x)*sin(x)) - 1/6*x^3*log(cos(x) + I*sin(x) + 1) - 1/6*x^3*log(cos(x) - I*sin(x) + 1) - 1/6*x^3
*log(-cos(x) + I*sin(x) + 1) - 1/6*x^3*log(-cos(x) - I*sin(x) + 1) + 1/2*I*x^2*dilog(cos(x) + I*sin(x)) - 1/2*
I*x^2*dilog(cos(x) - I*sin(x)) - 1/2*I*x^2*dilog(-cos(x) + I*sin(x)) + 1/2*I*x^2*dilog(-cos(x) - I*sin(x)) - x
*polylog(3, cos(x) + I*sin(x)) - x*polylog(3, cos(x) - I*sin(x)) - x*polylog(3, -cos(x) + I*sin(x)) - x*polylo
g(3, -cos(x) - I*sin(x)) - 1/3*log_integral(x^3) - I*polylog(4, cos(x) + I*sin(x)) + I*polylog(4, cos(x) - I*s
in(x)) + I*polylog(4, -cos(x) + I*sin(x)) - I*polylog(4, -cos(x) - I*sin(x))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError