3.101.53 \(\int \frac {1}{2} (-4+4 x+(-1+x) \log (9)) \, dx\)

Optimal. Leaf size=20 \[ \frac {1}{4} \left (-7+e^4+(1-x)^2\right ) (4+\log (9)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {12} \begin {gather*} x^2-2 x+\frac {1}{4} (1-x)^2 \log (9) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-4 + 4*x + (-1 + x)*Log[9])/2,x]

[Out]

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

Rule 12

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int (-4+4 x+(-1+x) \log (9)) \, dx\\ &=-2 x+x^2+\frac {1}{4} (1-x)^2 \log (9)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 0.95 \begin {gather*} \frac {1}{2} \left (-x+\frac {x^2}{2}\right ) (4+\log (9)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-4 + 4*x + (-1 + x)*Log[9])/2,x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 11, normalized size = 0.55




method result size



gosper \(\frac {\left (2+\ln \relax (3)\right ) \left (x -2\right ) x}{2}\) \(11\)
default \(\ln \relax (3) \left (\frac {1}{2} x^{2}-x \right )+x^{2}-2 x\) \(20\)
norman \(\left (-2-\ln \relax (3)\right ) x +\left (1+\frac {\ln \relax (3)}{2}\right ) x^{2}\) \(20\)
risch \(\frac {x^{2} \ln \relax (3)}{2}-x \ln \relax (3)+x^{2}-2 x\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 10, normalized size = 0.50 \begin {gather*} \frac {x\,\left (\ln \relax (3)+2\right )\,\left (x-2\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________