\(\int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx\) [5499]

   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 = 30, antiderivative size = 17 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=2 \left (-2-\frac {e^x}{-5+x}+3 x\right ) \]

[Out]

6*x-4-2*exp(x)/(-5+x)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {27, 6820, 2228} \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=6 x+\frac {2 e^x}{5-x} \]

[In]

Int[(150 + E^x*(12 - 2*x) - 60*x + 6*x^2)/(25 - 10*x + x^2),x]

[Out]

(2*E^x)/(5 - x) + 6*x

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6820

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{(-5+x)^2} \, dx \\ & = \int \left (6-\frac {2 e^x (-6+x)}{(-5+x)^2}\right ) \, dx \\ & = 6 x-2 \int \frac {e^x (-6+x)}{(-5+x)^2} \, dx \\ & = \frac {2 e^x}{5-x}+6 x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=-\frac {2 e^x}{-5+x}+6 x \]

[In]

Integrate[(150 + E^x*(12 - 2*x) - 60*x + 6*x^2)/(25 - 10*x + x^2),x]

[Out]

(-2*E^x)/(-5 + x) + 6*x

Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82

method result size
default \(6 x -\frac {2 \,{\mathrm e}^{x}}{-5+x}\) \(14\)
risch \(6 x -\frac {2 \,{\mathrm e}^{x}}{-5+x}\) \(14\)
parts \(6 x -\frac {2 \,{\mathrm e}^{x}}{-5+x}\) \(14\)
norman \(\frac {6 x^{2}-2 \,{\mathrm e}^{x}-150}{-5+x}\) \(18\)
parallelrisch \(\frac {6 x^{2}-2 \,{\mathrm e}^{x}-150}{-5+x}\) \(18\)

[In]

int(((-2*x+12)*exp(x)+6*x^2-60*x+150)/(x^2-10*x+25),x,method=_RETURNVERBOSE)

[Out]

6*x-2*exp(x)/(-5+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.18 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=\frac {2 \, {\left (3 \, x^{2} - 15 \, x - e^{x}\right )}}{x - 5} \]

[In]

integrate(((-2*x+12)*exp(x)+6*x^2-60*x+150)/(x^2-10*x+25),x, algorithm="fricas")

[Out]

2*(3*x^2 - 15*x - e^x)/(x - 5)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.59 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=6 x - \frac {2 e^{x}}{x - 5} \]

[In]

integrate(((-2*x+12)*exp(x)+6*x**2-60*x+150)/(x**2-10*x+25),x)

[Out]

6*x - 2*exp(x)/(x - 5)

Maxima [F]

\[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=\int { \frac {2 \, {\left (3 \, x^{2} - {\left (x - 6\right )} e^{x} - 30 \, x + 75\right )}}{x^{2} - 10 \, x + 25} \,d x } \]

[In]

integrate(((-2*x+12)*exp(x)+6*x^2-60*x+150)/(x^2-10*x+25),x, algorithm="maxima")

[Out]

6*x - 2*x*e^x/(x^2 - 10*x + 25) - 12*e^5*exp_integral_e(2, -x + 5)/(x - 5) - 2*integrate((x + 5)*e^x/(x^3 - 15
*x^2 + 75*x - 125), x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.18 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=\frac {2 \, {\left (3 \, x^{2} - 15 \, x - e^{x}\right )}}{x - 5} \]

[In]

integrate(((-2*x+12)*exp(x)+6*x^2-60*x+150)/(x^2-10*x+25),x, algorithm="giac")

[Out]

2*(3*x^2 - 15*x - e^x)/(x - 5)

Mupad [B] (verification not implemented)

Time = 12.46 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \frac {150+e^x (12-2 x)-60 x+6 x^2}{25-10 x+x^2} \, dx=6\,x-\frac {2\,{\mathrm {e}}^x}{x-5} \]

[In]

int(-(60*x + exp(x)*(2*x - 12) - 6*x^2 - 150)/(x^2 - 10*x + 25),x)

[Out]

6*x - (2*exp(x))/(x - 5)