\(\int \frac {25-405 x+40 x^2+e^x (-x+7 x^2+8 x^3)}{-x+8 x^2} \, dx\) [5480]

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

Optimal result

Integrand size = 40, antiderivative size = 23 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=e^x x+5 \left (8+x-5 \log \left (-2 x+16 x^2\right )\right ) \]

[Out]

40-25*ln(16*x^2-2*x)+5*x+exp(x)*x

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.22, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1607, 6874, 2207, 2225, 907} \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=5 x-e^x+e^x (x+1)-25 \log (1-8 x)-25 \log (x) \]

[In]

Int[(25 - 405*x + 40*x^2 + E^x*(-x + 7*x^2 + 8*x^3))/(-x + 8*x^2),x]

[Out]

-E^x + 5*x + E^x*(1 + x) - 25*Log[1 - 8*x] - 25*Log[x]

Rule 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{x (-1+8 x)} \, dx \\ & = \int \left (e^x (1+x)+\frac {5 \left (5-81 x+8 x^2\right )}{x (-1+8 x)}\right ) \, dx \\ & = 5 \int \frac {5-81 x+8 x^2}{x (-1+8 x)} \, dx+\int e^x (1+x) \, dx \\ & = e^x (1+x)+5 \int \left (1-\frac {5}{x}-\frac {40}{-1+8 x}\right ) \, dx-\int e^x \, dx \\ & = -e^x+5 x+e^x (1+x)-25 \log (1-8 x)-25 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=5 x+e^x x-25 \log (1-8 x)-25 \log (x) \]

[In]

Integrate[(25 - 405*x + 40*x^2 + E^x*(-x + 7*x^2 + 8*x^3))/(-x + 8*x^2),x]

[Out]

5*x + E^x*x - 25*Log[1 - 8*x] - 25*Log[x]

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.83

method result size
parallelrisch \(5 x +{\mathrm e}^{x} x -25 \ln \left (x \right )-25 \ln \left (x -\frac {1}{8}\right )\) \(19\)
default \(-25 \ln \left (x \right )-25 \ln \left (8 x -1\right )+5 x +{\mathrm e}^{x} x\) \(21\)
norman \(-25 \ln \left (x \right )-25 \ln \left (8 x -1\right )+5 x +{\mathrm e}^{x} x\) \(21\)
risch \(5 x -25 \ln \left (8 x^{2}-x \right )+{\mathrm e}^{x} x\) \(21\)
parts \(-25 \ln \left (x \right )-25 \ln \left (8 x -1\right )+5 x +{\mathrm e}^{x} x\) \(21\)

[In]

int(((8*x^3+7*x^2-x)*exp(x)+40*x^2-405*x+25)/(8*x^2-x),x,method=_RETURNVERBOSE)

[Out]

5*x+exp(x)*x-25*ln(x)-25*ln(x-1/8)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=x e^{x} + 5 \, x - 25 \, \log \left (8 \, x^{2} - x\right ) \]

[In]

integrate(((8*x^3+7*x^2-x)*exp(x)+40*x^2-405*x+25)/(8*x^2-x),x, algorithm="fricas")

[Out]

x*e^x + 5*x - 25*log(8*x^2 - x)

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=x e^{x} + 5 x - 25 \log {\left (8 x^{2} - x \right )} \]

[In]

integrate(((8*x**3+7*x**2-x)*exp(x)+40*x**2-405*x+25)/(8*x**2-x),x)

[Out]

x*exp(x) + 5*x - 25*log(8*x**2 - x)

Maxima [F]

\[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=\int { \frac {40 \, x^{2} + {\left (8 \, x^{3} + 7 \, x^{2} - x\right )} e^{x} - 405 \, x + 25}{8 \, x^{2} - x} \,d x } \]

[In]

integrate(((8*x^3+7*x^2-x)*exp(x)+40*x^2-405*x+25)/(8*x^2-x),x, algorithm="maxima")

[Out]

x*e^x + 1/8*e^(1/8)*exp_integral_e(1, -x + 1/8) + 5*x + integrate(e^x/(8*x - 1), x) - 25*log(8*x - 1) - 25*log
(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=x e^{x} + 5 \, x - 25 \, \log \left (8 \, x - 1\right ) - 25 \, \log \left (x\right ) \]

[In]

integrate(((8*x^3+7*x^2-x)*exp(x)+40*x^2-405*x+25)/(8*x^2-x),x, algorithm="giac")

[Out]

x*e^x + 5*x - 25*log(8*x - 1) - 25*log(x)

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {25-405 x+40 x^2+e^x \left (-x+7 x^2+8 x^3\right )}{-x+8 x^2} \, dx=5\,x-25\,\ln \left (x-\frac {1}{8}\right )-25\,\ln \left (x\right )+x\,{\mathrm {e}}^x \]

[In]

int(-(40*x^2 - 405*x + exp(x)*(7*x^2 - x + 8*x^3) + 25)/(x - 8*x^2),x)

[Out]

5*x - 25*log(x - 1/8) - 25*log(x) + x*exp(x)