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

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

________________________________________________________________________________________

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

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 14, normalized size = 0.54 \begin {gather*} -\frac {3}{1+e^x-2 x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.03, size = 27, normalized size = 1.04 \begin {gather*} \frac {2 \, x^{2} - x e^{x} - x + 3}{2 \, x - e^{x} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 27, normalized size = 1.04 \begin {gather*} \frac {2 \, x^{2} - x e^{x} - x + 3}{2 \, x - e^{x} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 16, normalized size = 0.62




method result size



risch \(x +\frac {3}{-{\mathrm e}^{x}+2 x -1}\) \(16\)
norman \(\frac {-x +2 x^{2}-{\mathrm e}^{x} x +3}{-{\mathrm e}^{x}+2 x -1}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 27, normalized size = 1.04 \begin {gather*} \frac {2 \, x^{2} - x e^{x} - x + 3}{2 \, x - e^{x} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 13, normalized size = 0.50 \begin {gather*} x-\frac {3}{{\mathrm {e}}^x-2\,x+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 10, normalized size = 0.38 \begin {gather*} x - \frac {3}{- 2 x + e^{x} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________