3.28.31 \(\int \frac {-26+10 x-x^2+e^x (25-10 x+x^2)}{25-10 x+x^2} \, dx\)

Optimal. Leaf size=20 \[ 1+e^4+e^x-\frac {1}{5-x}-x \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 12, normalized size of antiderivative = 0.60, number of steps used = 6, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {27, 6742, 2194, 683} \begin {gather*} -x+e^x+\frac {1}{x-5} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-26 + 10*x - x^2 + E^x*(25 - 10*x + x^2))/(25 - 10*x + x^2),x]

[Out]

E^x + (-5 + x)^(-1) - 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 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2194

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 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 12, normalized size = 0.60 \begin {gather*} e^x+\frac {1}{-5+x}-x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-26 + 10*x - x^2 + E^x*(25 - 10*x + x^2))/(25 - 10*x + x^2),x]

[Out]

E^x + (-5 + x)^(-1) - x

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 22, normalized size = 1.10 \begin {gather*} -\frac {x^{2} - {\left (x - 5\right )} e^{x} - 5 \, x - 1}{x - 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-10*x+25)*exp(x)-x^2+10*x-26)/(x^2-10*x+25),x, algorithm="fricas")

[Out]

-(x^2 - (x - 5)*e^x - 5*x - 1)/(x - 5)

________________________________________________________________________________________

giac [A]  time = 0.56, size = 24, normalized size = 1.20 \begin {gather*} -\frac {x^{2} - x e^{x} - 5 \, x + 5 \, e^{x} - 1}{x - 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-10*x+25)*exp(x)-x^2+10*x-26)/(x^2-10*x+25),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.44, size = 12, normalized size = 0.60




method result size



default \({\mathrm e}^{x}+\frac {1}{x -5}-x\) \(12\)
risch \({\mathrm e}^{x}+\frac {1}{x -5}-x\) \(12\)
norman \(\frac {{\mathrm e}^{x} x -x^{2}-5 \,{\mathrm e}^{x}+26}{x -5}\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-10*x+25)*exp(x)-x^2+10*x-26)/(x^2-10*x+25),x,method=_RETURNVERBOSE)

[Out]

exp(x)+1/(x-5)-x

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -x + \frac {{\left (x^{2} - 10 \, x\right )} e^{x}}{x^{2} - 10 \, x + 25} - \frac {25 \, e^{5} E_{2}\left (-x + 5\right )}{x - 5} + \frac {1}{x - 5} - 50 \, \int \frac {e^{x}}{x^{3} - 15 \, x^{2} + 75 \, x - 125}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-10*x+25)*exp(x)-x^2+10*x-26)/(x^2-10*x+25),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 11, normalized size = 0.55 \begin {gather*} {\mathrm {e}}^x-x+\frac {1}{x-5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((10*x + exp(x)*(x^2 - 10*x + 25) - x^2 - 26)/(x^2 - 10*x + 25),x)

[Out]

exp(x) - x + 1/(x - 5)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 8, normalized size = 0.40 \begin {gather*} - x + e^{x} + \frac {1}{x - 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-10*x+25)*exp(x)-x**2+10*x-26)/(x**2-10*x+25),x)

[Out]

-x + exp(x) + 1/(x - 5)

________________________________________________________________________________________