3.48.59 \(\int \frac {1}{3} (2+3 x-3 x^2+(1-2 x) \log (5)+(-1+2 x) \log (x)) \, dx\)

Optimal. Leaf size=21 \[ -5+(-1+x) \left (1-\frac {1}{3} x (x+\log (5)-\log (x))\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 42, normalized size of antiderivative = 2.00, number of steps used = 4, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {12, 2313} \begin {gather*} -\frac {x^3}{3}+\frac {x^2}{3}-\frac {1}{3} \left (x-x^2\right ) \log (x)+x-\frac {1}{12} (1-2 x)^2 \log (5) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x - 3*x^2 + (1 - 2*x)*Log[5] + (-1 + 2*x)*Log[x])/3,x]

[Out]

x + x^2/3 - x^3/3 - ((1 - 2*x)^2*Log[5])/12 - ((x - x^2)*Log[x])/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 2313

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 48, normalized size = 2.29 \begin {gather*} x+\frac {x^2}{3}-\frac {x^3}{3}+\frac {1}{3} x \log (5)-\frac {1}{3} x^2 \log (5)-\frac {1}{3} x \log (x)+\frac {1}{3} x^2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x - 3*x^2 + (1 - 2*x)*Log[5] + (-1 + 2*x)*Log[x])/3,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.01, size = 34, normalized size = 1.62 \begin {gather*} -\frac {1}{3} \, x^{3} + \frac {1}{3} \, x^{2} - \frac {1}{3} \, {\left (x^{2} - x\right )} \log \relax (5) + \frac {1}{3} \, {\left (x^{2} - x\right )} \log \relax (x) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(2*x-1)*log(x)+1/3*(1-2*x)*log(5)-x^2+x+2/3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 35, normalized size = 1.67 \begin {gather*} -\frac {1}{3} \, x^{3} + \frac {1}{3} \, x^{2} \log \relax (x) + \frac {1}{3} \, x^{2} - \frac {1}{3} \, {\left (x^{2} - x\right )} \log \relax (5) - \frac {1}{3} \, x \log \relax (x) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(2*x-1)*log(x)+1/3*(1-2*x)*log(5)-x^2+x+2/3,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 36, normalized size = 1.71




method result size



risch \(\frac {\ln \relax (x ) \left (x^{2}-x \right )}{3}+x +\frac {x^{2}}{3}-\frac {x^{2} \ln \relax (5)}{3}+\frac {x \ln \relax (5)}{3}-\frac {x^{3}}{3}\) \(36\)
default \(x +\frac {x^{2}}{3}-\frac {x^{3}}{3}-\frac {x^{2} \ln \relax (5)}{3}+\frac {x \ln \relax (5)}{3}+\frac {x^{2} \ln \relax (x )}{3}-\frac {x \ln \relax (x )}{3}\) \(37\)
norman \(\left (\frac {1}{3}-\frac {\ln \relax (5)}{3}\right ) x^{2}+\left (\frac {\ln \relax (5)}{3}+1\right ) x -\frac {x^{3}}{3}-\frac {x \ln \relax (x )}{3}+\frac {x^{2} \ln \relax (x )}{3}\) \(37\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/3*(2*x-1)*ln(x)+1/3*(1-2*x)*ln(5)-x^2+x+2/3,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 34, normalized size = 1.62 \begin {gather*} -\frac {1}{3} \, x^{3} + \frac {1}{3} \, x^{2} - \frac {1}{3} \, {\left (x^{2} - x\right )} \log \relax (5) + \frac {1}{3} \, {\left (x^{2} - x\right )} \log \relax (x) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(2*x-1)*log(x)+1/3*(1-2*x)*log(5)-x^2+x+2/3,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.30, size = 32, normalized size = 1.52 \begin {gather*} x\,\left (\frac {\ln \relax (5)}{3}-\frac {\ln \relax (x)}{3}+1\right )+x^2\,\left (\frac {\ln \relax (x)}{3}-\frac {\ln \relax (5)}{3}+\frac {1}{3}\right )-\frac {x^3}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x - (log(5)*(2*x - 1))/3 + (log(x)*(2*x - 1))/3 - x^2 + 2/3,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 36, normalized size = 1.71 \begin {gather*} - \frac {x^{3}}{3} + x^{2} \left (\frac {1}{3} - \frac {\log {\relax (5 )}}{3}\right ) + x \left (\frac {\log {\relax (5 )}}{3} + 1\right ) + \left (\frac {x^{2}}{3} - \frac {x}{3}\right ) \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*(2*x-1)*ln(x)+1/3*(1-2*x)*ln(5)-x**2+x+2/3,x)

[Out]

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

________________________________________________________________________________________