\(\int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x (31-88 x-36 x^2+24 x^3-2 x^4)}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x (49+40 x-12 x^2-8 x^3+2 x^4)} \, dx\) [6475]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 95, antiderivative size = 28 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=-\log \left (-e^x+x\right )+\log \left (\left (2-4 \left (-5-2 x+x^2\right )^2\right )^2\right ) \]

[Out]

ln((2-2*(x^2-2*x-5)*(2*x^2-4*x-10))^2)-ln(x-exp(x))

Rubi [F]

\[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=\int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx \]

[In]

Int[(49 - 40*x + 36*x^2 + 40*x^3 - 14*x^4 + E^x*(31 - 88*x - 36*x^2 + 24*x^3 - 2*x^4))/(-49*x - 40*x^2 + 12*x^
3 + 8*x^4 - 2*x^5 + E^x*(49 + 40*x - 12*x^2 - 8*x^3 + 2*x^4)),x]

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{\left (e^x-x\right ) \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx \\ & = \int \left (\frac {-1+x}{-e^x+x}+\frac {31-88 x-36 x^2+24 x^3-2 x^4}{49+40 x-12 x^2-8 x^3+2 x^4}\right ) \, dx \\ & = \int \frac {-1+x}{-e^x+x} \, dx+\int \frac {31-88 x-36 x^2+24 x^3-2 x^4}{49+40 x-12 x^2-8 x^3+2 x^4} \, dx \\ & = \int \left (\frac {1}{e^x-x}+\frac {x}{-e^x+x}\right ) \, dx+\text {Subst}\left (\int \frac {-71-96 x+24 x^2+16 x^3-2 x^4}{71-24 x^2+2 x^4} \, dx,x,-1+x\right ) \\ & = \int \frac {1}{e^x-x} \, dx+\int \frac {x}{-e^x+x} \, dx+\text {Subst}\left (\int \frac {x \left (-96+16 x^2\right )}{71-24 x^2+2 x^4} \, dx,x,-1+x\right )+\text {Subst}\left (\int \frac {-71+24 x^2-2 x^4}{71-24 x^2+2 x^4} \, dx,x,-1+x\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {-96+16 x}{71-24 x+2 x^2} \, dx,x,(-1+x)^2\right )+\int \frac {1}{e^x-x} \, dx+\int \frac {x}{-e^x+x} \, dx+\text {Subst}(\int -1 \, dx,x,-1+x) \\ & = -x+2 \log \left (71-24 (1-x)^2+2 (1-x)^4\right )+\int \frac {1}{e^x-x} \, dx+\int \frac {x}{-e^x+x} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 2.91 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.21 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=-\log \left (e^x-x\right )+2 \log \left (49+40 x-12 x^2-8 x^3+2 x^4\right ) \]

[In]

Integrate[(49 - 40*x + 36*x^2 + 40*x^3 - 14*x^4 + E^x*(31 - 88*x - 36*x^2 + 24*x^3 - 2*x^4))/(-49*x - 40*x^2 +
 12*x^3 + 8*x^4 - 2*x^5 + E^x*(49 + 40*x - 12*x^2 - 8*x^3 + 2*x^4)),x]

[Out]

-Log[E^x - x] + 2*Log[49 + 40*x - 12*x^2 - 8*x^3 + 2*x^4]

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14

method result size
parallelrisch \(-\ln \left (x -{\mathrm e}^{x}\right )+2 \ln \left (x^{4}-4 x^{3}-6 x^{2}+20 x +\frac {49}{2}\right )\) \(32\)
norman \(-\ln \left (x -{\mathrm e}^{x}\right )+2 \ln \left (2 x^{4}-8 x^{3}-12 x^{2}+40 x +49\right )\) \(34\)
risch \(2 \ln \left (2 x^{4}-8 x^{3}-12 x^{2}+40 x +49\right )-\ln \left ({\mathrm e}^{x}-x \right )\) \(34\)

[In]

int(((-2*x^4+24*x^3-36*x^2-88*x+31)*exp(x)-14*x^4+40*x^3+36*x^2-40*x+49)/((2*x^4-8*x^3-12*x^2+40*x+49)*exp(x)-
2*x^5+8*x^4+12*x^3-40*x^2-49*x),x,method=_RETURNVERBOSE)

[Out]

-ln(x-exp(x))+2*ln(x^4-4*x^3-6*x^2+20*x+49/2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.18 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=2 \, \log \left (2 \, x^{4} - 8 \, x^{3} - 12 \, x^{2} + 40 \, x + 49\right ) - \log \left (-x + e^{x}\right ) \]

[In]

integrate(((-2*x^4+24*x^3-36*x^2-88*x+31)*exp(x)-14*x^4+40*x^3+36*x^2-40*x+49)/((2*x^4-8*x^3-12*x^2+40*x+49)*e
xp(x)-2*x^5+8*x^4+12*x^3-40*x^2-49*x),x, algorithm="fricas")

[Out]

2*log(2*x^4 - 8*x^3 - 12*x^2 + 40*x + 49) - log(-x + e^x)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=- \log {\left (- x + e^{x} \right )} + 2 \log {\left (2 x^{4} - 8 x^{3} - 12 x^{2} + 40 x + 49 \right )} \]

[In]

integrate(((-2*x**4+24*x**3-36*x**2-88*x+31)*exp(x)-14*x**4+40*x**3+36*x**2-40*x+49)/((2*x**4-8*x**3-12*x**2+4
0*x+49)*exp(x)-2*x**5+8*x**4+12*x**3-40*x**2-49*x),x)

[Out]

-log(-x + exp(x)) + 2*log(2*x**4 - 8*x**3 - 12*x**2 + 40*x + 49)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.18 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=2 \, \log \left (2 \, x^{4} - 8 \, x^{3} - 12 \, x^{2} + 40 \, x + 49\right ) - \log \left (-x + e^{x}\right ) \]

[In]

integrate(((-2*x^4+24*x^3-36*x^2-88*x+31)*exp(x)-14*x^4+40*x^3+36*x^2-40*x+49)/((2*x^4-8*x^3-12*x^2+40*x+49)*e
xp(x)-2*x^5+8*x^4+12*x^3-40*x^2-49*x),x, algorithm="maxima")

[Out]

2*log(2*x^4 - 8*x^3 - 12*x^2 + 40*x + 49) - log(-x + e^x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.18 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=2 \, \log \left (2 \, x^{4} - 8 \, x^{3} - 12 \, x^{2} + 40 \, x + 49\right ) - \log \left (x - e^{x}\right ) \]

[In]

integrate(((-2*x^4+24*x^3-36*x^2-88*x+31)*exp(x)-14*x^4+40*x^3+36*x^2-40*x+49)/((2*x^4-8*x^3-12*x^2+40*x+49)*e
xp(x)-2*x^5+8*x^4+12*x^3-40*x^2-49*x),x, algorithm="giac")

[Out]

2*log(2*x^4 - 8*x^3 - 12*x^2 + 40*x + 49) - log(x - e^x)

Mupad [B] (verification not implemented)

Time = 13.94 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.11 \[ \int \frac {49-40 x+36 x^2+40 x^3-14 x^4+e^x \left (31-88 x-36 x^2+24 x^3-2 x^4\right )}{-49 x-40 x^2+12 x^3+8 x^4-2 x^5+e^x \left (49+40 x-12 x^2-8 x^3+2 x^4\right )} \, dx=2\,\ln \left (x^4-4\,x^3-6\,x^2+20\,x+\frac {49}{2}\right )-\ln \left ({\mathrm {e}}^x-x\right ) \]

[In]

int((40*x + exp(x)*(88*x + 36*x^2 - 24*x^3 + 2*x^4 - 31) - 36*x^2 - 40*x^3 + 14*x^4 - 49)/(49*x - exp(x)*(40*x
 - 12*x^2 - 8*x^3 + 2*x^4 + 49) + 40*x^2 - 12*x^3 - 8*x^4 + 2*x^5),x)

[Out]

2*log(20*x - 6*x^2 - 4*x^3 + x^4 + 49/2) - log(exp(x) - x)