3.17.60 \(\int \frac {4-x+x^2+e (-1+2 x)+(4-x+x^2) \log (x)}{e (4-x+x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 17, normalized size of antiderivative = 0.85, number of steps used = 7, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 6728, 1657, 628, 2295} \begin {gather*} \log \left (x^2-x+4\right )+\frac {x \log (x)}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2295

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

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 20, normalized size = 1.00 \begin {gather*} {\left (e \log \left (x^{2} - x + 4\right ) + x \log \relax (x)\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 20, normalized size = 1.00 \begin {gather*} {\left (e \log \left (x^{2} - x + 4\right ) + x \log \relax (x)\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.63, size = 17, normalized size = 0.85




method result size



risch \(x \,{\mathrm e}^{-1} \ln \relax (x )+\ln \left (x^{2}-x +4\right )\) \(17\)
norman \(x \,{\mathrm e}^{-1} \ln \relax (x )+\ln \left (x^{2}-x +4\right )\) \(19\)
default \({\mathrm e}^{-1} \left ({\mathrm e} \ln \left (x^{2}-x +4\right )+x \ln \relax (x )\right )\) \(23\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*exp(-1)*ln(x)+ln(x^2-x+4)

________________________________________________________________________________________

maxima [B]  time = 0.90, size = 60, normalized size = 3.00 \begin {gather*} -\frac {1}{15} \, {\left (2 \, \sqrt {15} \arctan \left (\frac {1}{15} \, \sqrt {15} {\left (2 \, x - 1\right )}\right ) e - {\left (2 \, \sqrt {15} \arctan \left (\frac {1}{15} \, \sqrt {15} {\left (2 \, x - 1\right )}\right ) + 15 \, \log \left (x^{2} - x + 4\right )\right )} e - 15 \, x \log \relax (x)\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/15*(2*sqrt(15)*arctan(1/15*sqrt(15)*(2*x - 1))*e - (2*sqrt(15)*arctan(1/15*sqrt(15)*(2*x - 1)) + 15*log(x^2
 - x + 4))*e - 15*x*log(x))*e^(-1)

________________________________________________________________________________________

mupad [B]  time = 1.12, size = 16, normalized size = 0.80 \begin {gather*} \ln \left (x^2-x+4\right )+x\,{\mathrm {e}}^{-1}\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-1)*(log(x)*(x^2 - x + 4) - x + x^2 + exp(1)*(2*x - 1) + 4))/(x^2 - x + 4),x)

[Out]

log(x^2 - x + 4) + x*exp(-1)*log(x)

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 15, normalized size = 0.75 \begin {gather*} \frac {x \log {\relax (x )}}{e} + \log {\left (x^{2} - x + 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*exp(-1)*log(x) + log(x**2 - x + 4)

________________________________________________________________________________________