\(\int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} (-25+35 x-16 x^2)+(25-40 x+16 x^2) \log (5)}{25-40 x+16 x^2} \, dx\) [637]

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

Optimal result

Integrand size = 64, antiderivative size = 22 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=x \left (-1-e^{\frac {1}{-4+\frac {5}{x}}}+2 x+\log (5)\right ) \]

[Out]

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

Rubi [F]

\[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=\int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx \]

[In]

Int[(-25 + 140*x - 176*x^2 + 64*x^3 + (-25 + 35*x - 16*x^2)/E^(x/(-5 + 4*x)) + (25 - 40*x + 16*x^2)*Log[5])/(2
5 - 40*x + 16*x^2),x]

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{(-5+4 x)^2} \, dx \\ & = \int \left (-1+4 x+\frac {e^{\frac {x}{5-4 x}} \left (-25+35 x-16 x^2\right )}{(5-4 x)^2}+\log (5)\right ) \, dx \\ & = 2 x^2-x (1-\log (5))+\int \frac {e^{\frac {x}{5-4 x}} \left (-25+35 x-16 x^2\right )}{(5-4 x)^2} \, dx \\ & = 2 x^2-x (1-\log (5))+\int \left (-e^{\frac {x}{5-4 x}}-\frac {25 e^{\frac {x}{5-4 x}}}{4 (-5+4 x)^2}-\frac {5 e^{\frac {x}{5-4 x}}}{4 (-5+4 x)}\right ) \, dx \\ & = 2 x^2-x (1-\log (5))-\frac {5}{4} \int \frac {e^{\frac {x}{5-4 x}}}{-5+4 x} \, dx-\frac {25}{4} \int \frac {e^{\frac {x}{5-4 x}}}{(-5+4 x)^2} \, dx-\int e^{\frac {x}{5-4 x}} \, dx \\ & = 2 x^2-x (1-\log (5))-\frac {5}{4} \int \frac {e^{-\frac {1}{4}+\frac {5}{4 (5-4 x)}}}{-5+4 x} \, dx-\frac {25}{4} \int \frac {e^{-\frac {1}{4}+\frac {5}{4 (5-4 x)}}}{(-5+4 x)^2} \, dx-\int e^{\frac {x}{5-4 x}} \, dx \\ & = -\frac {5}{4} e^{-\frac {1}{4}+\frac {5}{4 (5-4 x)}}+2 x^2+\frac {5 \operatorname {ExpIntegralEi}\left (\frac {5}{4 (5-4 x)}\right )}{16 \sqrt [4]{e}}-x (1-\log (5))-\int e^{\frac {x}{5-4 x}} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=x \left (-1-e^{\frac {x}{5-4 x}}+2 x+\log (5)\right ) \]

[In]

Integrate[(-25 + 140*x - 176*x^2 + 64*x^3 + (-25 + 35*x - 16*x^2)/E^(x/(-5 + 4*x)) + (25 - 40*x + 16*x^2)*Log[
5])/(25 - 40*x + 16*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.27

method result size
risch \(x \ln \left (5\right )+2 x^{2}-x \,{\mathrm e}^{-\frac {x}{-5+4 x}}-x\) \(28\)
parallelrisch \(x \ln \left (5\right )+2 x^{2}-x \,{\mathrm e}^{-\frac {x}{-5+4 x}}+5 \ln \left (5\right )-x -\frac {95}{4}\) \(33\)
parts \(2 x^{2}-x -\frac {{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}} \left (-5+4 x \right )}{4}-\frac {5 \,{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}}}{4}+x \ln \left (5\right )\) \(47\)
derivativedivides \(\frac {\ln \left (5\right ) \left (-5+4 x \right )}{4}+\frac {\left (-5+4 x \right )^{2}}{8}-5+4 x -\frac {{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}} \left (-5+4 x \right )}{4}-\frac {5 \,{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}}}{4}\) \(57\)
default \(\frac {\ln \left (5\right ) \left (-5+4 x \right )}{4}+\frac {\left (-5+4 x \right )^{2}}{8}-5+4 x -\frac {{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}} \left (-5+4 x \right )}{4}-\frac {5 \,{\mathrm e}^{-\frac {1}{4}-\frac {5}{4 \left (-5+4 x \right )}}}{4}\) \(57\)
norman \(\frac {\left (-14+4 \ln \left (5\right )\right ) x^{2}+8 x^{3}+5 x \,{\mathrm e}^{-\frac {x}{-5+4 x}}-4 x^{2} {\mathrm e}^{-\frac {x}{-5+4 x}}+\frac {25}{4}-\frac {25 \ln \left (5\right )}{4}}{-5+4 x}\) \(60\)

[In]

int(((-16*x^2+35*x-25)*exp(-x/(-5+4*x))+(16*x^2-40*x+25)*ln(5)+64*x^3-176*x^2+140*x-25)/(16*x^2-40*x+25),x,met
hod=_RETURNVERBOSE)

[Out]

x*ln(5)+2*x^2-x*exp(-x/(-5+4*x))-x

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.23 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=2 \, x^{2} - x e^{\left (-\frac {x}{4 \, x - 5}\right )} + x \log \left (5\right ) - x \]

[In]

integrate(((-16*x^2+35*x-25)*exp(-x/(-5+4*x))+(16*x^2-40*x+25)*log(5)+64*x^3-176*x^2+140*x-25)/(16*x^2-40*x+25
),x, algorithm="fricas")

[Out]

2*x^2 - x*e^(-x/(4*x - 5)) + x*log(5) - x

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=2 x^{2} + x \left (-1 + \log {\left (5 \right )}\right ) - x e^{- \frac {x}{4 x - 5}} \]

[In]

integrate(((-16*x**2+35*x-25)*exp(-x/(-5+4*x))+(16*x**2-40*x+25)*ln(5)+64*x**3-176*x**2+140*x-25)/(16*x**2-40*
x+25),x)

[Out]

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

Maxima [F]

\[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=\int { \frac {64 \, x^{3} - 176 \, x^{2} - {\left (16 \, x^{2} - 35 \, x + 25\right )} e^{\left (-\frac {x}{4 \, x - 5}\right )} + {\left (16 \, x^{2} - 40 \, x + 25\right )} \log \left (5\right ) + 140 \, x - 25}{16 \, x^{2} - 40 \, x + 25} \,d x } \]

[In]

integrate(((-16*x^2+35*x-25)*exp(-x/(-5+4*x))+(16*x^2-40*x+25)*log(5)+64*x^3-176*x^2+140*x-25)/(16*x^2-40*x+25
),x, algorithm="maxima")

[Out]

2*x^2 - x*e^(-5/4/(4*x - 5) - 1/4) + 1/4*(4*x - 25/(4*x - 5) + 10*log(4*x - 5))*log(5) + 5/2*(5/(4*x - 5) - lo
g(4*x - 5))*log(5) - x - 25/4*log(5)/(4*x - 5) - 5*e^(-5/4/(4*x - 5) - 1/4) + 25*integrate(e^(-5/4/(4*x - 5))/
(16*x^2*e^(1/4) - 40*x*e^(1/4) + 25*e^(1/4)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (21) = 42\).

Time = 0.33 (sec) , antiderivative size = 100, normalized size of antiderivative = 4.55 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=-\frac {5 \, {\left (\frac {8 \, x e^{\left (-\frac {x}{4 \, x - 5}\right )}}{4 \, x - 5} - \frac {32 \, x^{2} e^{\left (-\frac {x}{4 \, x - 5}\right )}}{{\left (4 \, x - 5\right )}^{2}} + \frac {8 \, x \log \left (5\right )}{4 \, x - 5} + \frac {32 \, x}{4 \, x - 5} - 2 \, \log \left (5\right ) - 3\right )}}{8 \, {\left (\frac {8 \, x}{4 \, x - 5} - \frac {16 \, x^{2}}{{\left (4 \, x - 5\right )}^{2}} - 1\right )}} \]

[In]

integrate(((-16*x^2+35*x-25)*exp(-x/(-5+4*x))+(16*x^2-40*x+25)*log(5)+64*x^3-176*x^2+140*x-25)/(16*x^2-40*x+25
),x, algorithm="giac")

[Out]

-5/8*(8*x*e^(-x/(4*x - 5))/(4*x - 5) - 32*x^2*e^(-x/(4*x - 5))/(4*x - 5)^2 + 8*x*log(5)/(4*x - 5) + 32*x/(4*x
- 5) - 2*log(5) - 3)/(8*x/(4*x - 5) - 16*x^2/(4*x - 5)^2 - 1)

Mupad [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.18 \[ \int \frac {-25+140 x-176 x^2+64 x^3+e^{-\frac {x}{-5+4 x}} \left (-25+35 x-16 x^2\right )+\left (25-40 x+16 x^2\right ) \log (5)}{25-40 x+16 x^2} \, dx=2\,x^2-x\,\left ({\mathrm {e}}^{-\frac {x}{4\,x-5}}-\ln \left (5\right )+1\right ) \]

[In]

int((140*x + log(5)*(16*x^2 - 40*x + 25) - exp(-x/(4*x - 5))*(16*x^2 - 35*x + 25) - 176*x^2 + 64*x^3 - 25)/(16
*x^2 - 40*x + 25),x)

[Out]

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