3.29.80 \(\int \frac {1}{3} (-6 x-2 x^2+2 x \log ^2(-x^2)+\log (x) (-12 x-6 x^2+8 x \log (-x^2)+4 x \log ^2(-x^2))) \, dx\)

Optimal. Leaf size=22 \[ \frac {2}{3} x^2 \log (x) \left (-3-x+\log ^2\left (-x^2\right )\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.29, antiderivative size = 62, normalized size of antiderivative = 2.82, number of steps used = 22, number of rules used = 9, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {12, 2305, 2304, 6741, 14, 43, 6742, 2334, 2366} \begin {gather*} -\frac {2 x^2}{3}+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (x^3+3 x^2\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-6*x - 2*x^2 + 2*x*Log[-x^2]^2 + Log[x]*(-12*x - 6*x^2 + 8*x*Log[-x^2] + 4*x*Log[-x^2]^2))/3,x]

[Out]

(-2*x^2)/3 + (2*x^2*(1 - 2*Log[x]))/3 + (4*x^2*Log[x])/3 - (2*(3*x^2 + x^3)*Log[x])/3 + (2*x^2*Log[x]*Log[-x^2
]^2)/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2304

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

Rule 2305

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

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 6741

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{3} \int \left (-6 x-2 x^2+2 x \log ^2\left (-x^2\right )+\log (x) \left (-12 x-6 x^2+8 x \log \left (-x^2\right )+4 x \log ^2\left (-x^2\right )\right )\right ) \, dx\\ &=-x^2-\frac {2 x^3}{9}+\frac {1}{3} \int \log (x) \left (-12 x-6 x^2+8 x \log \left (-x^2\right )+4 x \log ^2\left (-x^2\right )\right ) \, dx+\frac {2}{3} \int x \log ^2\left (-x^2\right ) \, dx\\ &=-x^2-\frac {2 x^3}{9}+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {1}{3} \int 2 x \log (x) \left (-6-3 x+4 \log \left (-x^2\right )+2 \log ^2\left (-x^2\right )\right ) \, dx-\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} \int x \log (x) \left (-6-3 x+4 \log \left (-x^2\right )+2 \log ^2\left (-x^2\right )\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} \int \left (-3 x (2+x) \log (x)+4 x \log (x) \log \left (-x^2\right )+2 x \log (x) \log ^2\left (-x^2\right )\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {4}{3} \int x \log (x) \log ^2\left (-x^2\right ) \, dx-2 \int x (2+x) \log (x) \, dx+\frac {8}{3} \int x \log (x) \log \left (-x^2\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )-\frac {4}{3} \int \frac {1}{2} x \left (2-2 \log \left (-x^2\right )+\log ^2\left (-x^2\right )\right ) \, dx+2 \int \frac {1}{3} x (3+x) \, dx-\frac {16}{3} \int \frac {1}{4} x (-1+2 \log (x)) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} \int x (3+x) \, dx-\frac {2}{3} \int x \left (2-2 \log \left (-x^2\right )+\log ^2\left (-x^2\right )\right ) \, dx-\frac {4}{3} \int x (-1+2 \log (x)) \, dx\\ &=\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} \int \left (3 x+x^2\right ) \, dx-\frac {2}{3} \int \left (2 x-2 x \log \left (-x^2\right )+x \log ^2\left (-x^2\right )\right ) \, dx\\ &=\frac {2 x^2}{3}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )-\frac {2}{3} \int x \log ^2\left (-x^2\right ) \, dx+\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=-\frac {2 x^2}{3}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 22, normalized size = 1.00 \begin {gather*} -\frac {2}{3} x^2 \log (x) \left (3+x-\log ^2\left (-x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-6*x - 2*x^2 + 2*x*Log[-x^2]^2 + Log[x]*(-12*x - 6*x^2 + 8*x*Log[-x^2] + 4*x*Log[-x^2]^2))/3,x]

[Out]

(-2*x^2*Log[x]*(3 + x - Log[-x^2]^2))/3

________________________________________________________________________________________

fricas [C]  time = 0.65, size = 57, normalized size = 2.59 \begin {gather*} \frac {1}{3} i \, \pi x^{2} \log \left (-x^{2}\right )^{2} + \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{3} - \frac {1}{3} i \, \pi {\left (x^{3} + 3 \, x^{2}\right )} - \frac {1}{3} \, {\left (x^{3} + 3 \, x^{2}\right )} \log \left (-x^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(4*x*log(-x^2)^2+8*x*log(-x^2)-6*x^2-12*x)*log(x)+2/3*x*log(-x^2)^2-2/3*x^2-2*x,x, algorithm="fr
icas")

[Out]

1/3*I*pi*x^2*log(-x^2)^2 + 1/3*x^2*log(-x^2)^3 - 1/3*I*pi*(x^3 + 3*x^2) - 1/3*(x^3 + 3*x^2)*log(-x^2)

________________________________________________________________________________________

giac [C]  time = 0.33, size = 92, normalized size = 4.18 \begin {gather*} -\frac {4}{3} \, {\left (-2 i \, \pi + 1\right )} x^{2} \log \relax (x)^{2} + \frac {8}{3} \, x^{2} \log \relax (x)^{3} + \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{2} - \frac {1}{3} \, {\left (-2 i \, \pi - \pi ^{2} - 1\right )} x^{2} - \frac {2}{3} \, x^{2} \log \left (-x^{2}\right ) - \frac {1}{3} \, x^{2} + \frac {2}{3} \, {\left ({\left (-2 i \, \pi - \pi ^{2} - 1\right )} x^{2} - x^{3}\right )} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(4*x*log(-x^2)^2+8*x*log(-x^2)-6*x^2-12*x)*log(x)+2/3*x*log(-x^2)^2-2/3*x^2-2*x,x, algorithm="gi
ac")

[Out]

-4/3*(-2*I*pi + 1)*x^2*log(x)^2 + 8/3*x^2*log(x)^3 + 1/3*x^2*log(-x^2)^2 - 1/3*(-2*I*pi - pi^2 - 1)*x^2 - 2/3*
x^2*log(-x^2) - 1/3*x^2 + 2/3*((-2*I*pi - pi^2 - 1)*x^2 - x^3)*log(x)

________________________________________________________________________________________

maple [A]  time = 0.12, size = 31, normalized size = 1.41




method result size



default \(-2 x^{2} \ln \relax (x )-\frac {2 x^{3} \ln \relax (x )}{3}+\frac {2 x^{2} \ln \left (-x^{2}\right )^{2} \ln \relax (x )}{3}\) \(31\)
risch \(\frac {x^{2} \ln \left (-x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2}}{3}+\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {4 i x^{2} \left (\pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-2 \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\pi \mathrm {csgn}\left (i x^{2}\right )^{3}+2 \pi \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi -i\right ) \ln \relax (x )^{2}}{3}-\frac {2 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{3}+\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{12}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{6}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}}{3}+\frac {2 i x^{2} \pi }{3}+\frac {8 x^{2} \ln \relax (x )^{3}}{3}+\frac {\left (-2 \pi ^{2} x^{2}-2 x^{3}-2 x^{2}+2 i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-4 i x^{2} \pi +2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{2}+2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}-\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}-4 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{4}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{2}-2 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}+2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{5}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}\right ) \ln \relax (x )}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{4}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{12}-\frac {2 \ln \left (-x^{2}\right ) x^{2}}{3}-\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{3}+\frac {2 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{3}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{5}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}\) \(839\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/3*(4*x*ln(-x^2)^2+8*x*ln(-x^2)-6*x^2-12*x)*ln(x)+2/3*x*ln(-x^2)^2-2/3*x^2-2*x,x,method=_RETURNVERBOSE)

[Out]

-2*x^2*ln(x)-2/3*x^3*ln(x)+2/3*x^2*ln(-x^2)^2*ln(x)

________________________________________________________________________________________

maxima [C]  time = 0.51, size = 91, normalized size = 4.14 \begin {gather*} \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{2} + \frac {4}{3} \, {\left (-i \, \pi + 1\right )} x^{2} \log \relax (x) - \frac {4}{3} \, x^{2} \log \relax (x)^{2} + \frac {1}{3} \, {\left (2 i \, \pi + \pi ^{2} + 1\right )} x^{2} - \frac {2}{3} \, x^{2} \log \left (-x^{2}\right ) - \frac {1}{3} \, x^{2} + \frac {2}{3} \, {\left (x^{2} \log \left (-x^{2}\right )^{2} - x^{3} - 3 \, x^{2}\right )} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(4*x*log(-x^2)^2+8*x*log(-x^2)-6*x^2-12*x)*log(x)+2/3*x*log(-x^2)^2-2/3*x^2-2*x,x, algorithm="ma
xima")

[Out]

1/3*x^2*log(-x^2)^2 + 4/3*(-I*pi + 1)*x^2*log(x) - 4/3*x^2*log(x)^2 + 1/3*(2*I*pi + pi^2 + 1)*x^2 - 2/3*x^2*lo
g(-x^2) - 1/3*x^2 + 2/3*(x^2*log(-x^2)^2 - x^3 - 3*x^2)*log(x)

________________________________________________________________________________________

mupad [B]  time = 1.96, size = 29, normalized size = 1.32 \begin {gather*} -\frac {2\,x^2\,\ln \relax (x)\,\left (-{\ln \left (x^2\right )}^2-2{}\mathrm {i}\,\pi \,\ln \left (x^2\right )+x+\pi ^2+3\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x*log(-x^2)^2)/3 - (log(x)*(12*x - 8*x*log(-x^2) + 6*x^2 - 4*x*log(-x^2)^2))/3 - (2*x^2)/3 - 2*x,x)

[Out]

-(2*x^2*log(x)*(x - log(x^2)^2 + pi^2 - pi*log(x^2)*2i + 3))/3

________________________________________________________________________________________

sympy [C]  time = 0.35, size = 53, normalized size = 2.41 \begin {gather*} \frac {8 x^{2} \log {\relax (x )}^{3}}{3} + \frac {8 i \pi x^{2} \log {\relax (x )}^{2}}{3} + \left (- \frac {2 x^{3}}{3} - \frac {2 \pi ^{2} x^{2}}{3} - 2 x^{2}\right ) \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(4*x*ln(-x**2)**2+8*x*ln(-x**2)-6*x**2-12*x)*ln(x)+2/3*x*ln(-x**2)**2-2/3*x**2-2*x,x)

[Out]

8*x**2*log(x)**3/3 + 8*I*pi*x**2*log(x)**2/3 + (-2*x**3/3 - 2*pi**2*x**2/3 - 2*x**2)*log(x)

________________________________________________________________________________________