3.8.12 \(\int \frac {e (7-2 x)-2 x+e \log (x)}{e} \, dx\) [712]

Optimal. Leaf size=15 \[ x \left (6-x-\frac {x}{e}+\log (x)\right ) \]

[Out]

(6+ln(x)-x-x/exp(1))*x

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.80, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {12, 2332} \begin {gather*} -\frac {x^2}{e}-\frac {1}{4} (7-2 x)^2-x+x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E*(7 - 2*x) - 2*x + E*Log[x])/E,x]

[Out]

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

Rule 12

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

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 19, normalized size = 1.27 \begin {gather*} 6 x-\frac {(1+e) x^2}{e}+x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E*(7 - 2*x) - 2*x + E*Log[x])/E,x]

[Out]

6*x - ((1 + E)*x^2)/E + x*Log[x]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(34\) vs. \(2(16)=32\).
time = 0.06, size = 35, normalized size = 2.33

method result size
risch \(-x^{2}+x \ln \left (x \right )+6 x -x^{2} {\mathrm e}^{-1}\) \(21\)
norman \(x \ln \left (x \right )+6 x -\left (1+{\mathrm e}\right ) {\mathrm e}^{-1} x^{2}\) \(22\)
default \({\mathrm e}^{-1} \left ({\mathrm e} \left (-x^{2}+7 x \right )+x \,{\mathrm e} \ln \left (x \right )-x \,{\mathrm e}-x^{2}\right )\) \(35\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(1)*ln(x)+(-2*x+7)*exp(1)-2*x)/exp(1),x,method=_RETURNVERBOSE)

[Out]

1/exp(1)*(exp(1)*(-x^2+7*x)+x*exp(1)*ln(x)-x*exp(1)-x^2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 30 vs. \(2 (14) = 28\).
time = 0.27, size = 30, normalized size = 2.00 \begin {gather*} -{\left (x^{2} + {\left (x^{2} - 7 \, x\right )} e - {\left (x \log \left (x\right ) - x\right )} e\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(1)*log(x)+(-2*x+7)*exp(1)-2*x)/exp(1),x, algorithm="maxima")

[Out]

-(x^2 + (x^2 - 7*x)*e - (x*log(x) - x)*e)*e^(-1)

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 26, normalized size = 1.73 \begin {gather*} {\left (x e \log \left (x\right ) - x^{2} - {\left (x^{2} - 6 \, x\right )} e\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(1)*log(x)+(-2*x+7)*exp(1)-2*x)/exp(1),x, algorithm="fricas")

[Out]

(x*e*log(x) - x^2 - (x^2 - 6*x)*e)*e^(-1)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 20, normalized size = 1.33 \begin {gather*} \frac {x^{2} \left (- e - 1\right )}{e} + x \log {\left (x \right )} + 6 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(1)*ln(x)+(-2*x+7)*exp(1)-2*x)/exp(1),x)

[Out]

x**2*(-E - 1)*exp(-1) + x*log(x) + 6*x

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 30 vs. \(2 (14) = 28\).
time = 0.42, size = 30, normalized size = 2.00 \begin {gather*} -{\left (x^{2} + {\left (x^{2} - 7 \, x\right )} e - {\left (x \log \left (x\right ) - x\right )} e\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(1)*log(x)+(-2*x+7)*exp(1)-2*x)/exp(1),x, algorithm="giac")

[Out]

-(x^2 + (x^2 - 7*x)*e - (x*log(x) - x)*e)*e^(-1)

________________________________________________________________________________________

Mupad [B]
time = 0.53, size = 14, normalized size = 0.93 \begin {gather*} -x\,\left (x-\ln \left (x\right )+x\,{\mathrm {e}}^{-1}-6\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-exp(-1)*(2*x - exp(1)*log(x) + exp(1)*(2*x - 7)),x)

[Out]

-x*(x - log(x) + x*exp(-1) - 6)

________________________________________________________________________________________