3.55.87 \(\int \frac {-2+x+2 e^x x+x^2}{-1-3 x-x^2+e^x x^2} \, dx\)

Optimal. Leaf size=26 \[ -x+\log \left (25 e \left (-x+e^x x^2-(1+x)^2\right )\right ) \]

________________________________________________________________________________________

Rubi [F]  time = 0.63, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-2+x+2 e^x x+x^2}{-1-3 x-x^2+e^x x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 21, normalized size = 0.81 \begin {gather*} -x+\log \left (1+3 x+x^2-e^x x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + Log[1 + 3*x + x^2 - E^x*x^2]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.36, size = 21, normalized size = 0.81 \begin {gather*} -x + \log \left (x^{2} e^{x} - x^{2} - 3 \, x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 22, normalized size = 0.85




method result size



norman \(-x +\ln \left ({\mathrm e}^{x} x^{2}-x^{2}-3 x -1\right )\) \(22\)
risch \(2 \ln \relax (x )-x +\ln \left ({\mathrm e}^{x}-\frac {x^{2}+3 x +1}{x^{2}}\right )\) \(26\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 20, normalized size = 0.77 \begin {gather*} \ln \left (3\,x-x^2\,{\mathrm {e}}^x+x^2+1\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________