3.92.4 \(\int \frac {12+e^{2 x}+e^x (-12-2 x)+x^2}{e^{2 x}-2 e^x x+x^2} \, dx\)

Optimal. Leaf size=14 \[ 1+x-\frac {12}{-e^x+x} \]

________________________________________________________________________________________

Rubi [F]  time = 0.27, 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 {12+e^{2 x}+e^x (-12-2 x)+x^2}{e^{2 x}-2 e^x x+x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 13, normalized size = 0.93 \begin {gather*} \frac {12}{e^x-x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

12/(E^x - x) + x

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 19, normalized size = 1.36 \begin {gather*} \frac {x^{2} - x e^{x} - 12}{x - e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 - x*e^x - 12)/(x - e^x)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 19, normalized size = 1.36 \begin {gather*} \frac {x^{2} - x e^{x} - 12}{x - e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 - x*e^x - 12)/(x - e^x)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 13, normalized size = 0.93




method result size



risch \(x -\frac {12}{x -{\mathrm e}^{x}}\) \(13\)
norman \(\frac {-12+x^{2}-{\mathrm e}^{x} x}{x -{\mathrm e}^{x}}\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-12/(x-exp(x))

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 19, normalized size = 1.36 \begin {gather*} \frac {x^{2} - x e^{x} - 12}{x - e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 - x*e^x - 12)/(x - e^x)

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 12, normalized size = 0.86 \begin {gather*} x-\frac {12}{x-{\mathrm {e}}^x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 12/(x - exp(x))

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 7, normalized size = 0.50 \begin {gather*} x + \frac {12}{- x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)**2+(-2*x-12)*exp(x)+x**2+12)/(exp(x)**2-2*exp(x)*x+x**2),x)

[Out]

x + 12/(-x + exp(x))

________________________________________________________________________________________