3.62.91 \(\int \frac {-25-10 x+e^{2+x} (5-3 x-x^2)+e^x (-25+15 x+9 x^2+x^3)}{25 x^2+10 x^3+x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.71, antiderivative size = 42, normalized size of antiderivative = 1.83, number of steps used = 13, number of rules used = 6, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {1594, 27, 6742, 74, 2177, 2178} \begin {gather*} \frac {e^{x+2}}{5 (x+5)}+\frac {5}{(x+5) x}+\frac {\left (5-e^2\right ) e^x}{5 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-25 - 10*x + E^(2 + x)*(5 - 3*x - x^2) + E^x*(-25 + 15*x + 9*x^2 + x^3))/(25*x^2 + 10*x^3 + x^4),x]

[Out]

(E^x*(5 - E^2))/(5*x) + E^(2 + x)/(5*(5 + x)) + 5/(x*(5 + 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 74

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0] &
& EqQ[a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)), 0]

Rule 1594

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

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

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 {-25-10 x+e^{2+x} \left (5-3 x-x^2\right )+e^x \left (-25+15 x+9 x^2+x^3\right )}{x^2 \left (25+10 x+x^2\right )} \, dx\\ &=\int \frac {-25-10 x+e^{2+x} \left (5-3 x-x^2\right )+e^x \left (-25+15 x+9 x^2+x^3\right )}{x^2 (5+x)^2} \, dx\\ &=\int \left (-\frac {5 (5+2 x)}{x^2 (5+x)^2}+\frac {e^x \left (-5 \left (5-e^2\right )+3 \left (5-e^2\right ) x+\left (9-e^2\right ) x^2+x^3\right )}{x^2 (5+x)^2}\right ) \, dx\\ &=-\left (5 \int \frac {5+2 x}{x^2 (5+x)^2} \, dx\right )+\int \frac {e^x \left (-5 \left (5-e^2\right )+3 \left (5-e^2\right ) x+\left (9-e^2\right ) x^2+x^3\right )}{x^2 (5+x)^2} \, dx\\ &=\frac {5}{x (5+x)}+\int \left (\frac {e^x \left (-5+e^2\right )}{5 x^2}+\frac {e^x \left (5-e^2\right )}{5 x}-\frac {e^{2+x}}{5 (5+x)^2}+\frac {e^{2+x}}{5 (5+x)}\right ) \, dx\\ &=\frac {5}{x (5+x)}-\frac {1}{5} \int \frac {e^{2+x}}{(5+x)^2} \, dx+\frac {1}{5} \int \frac {e^{2+x}}{5+x} \, dx+\frac {1}{5} \left (5-e^2\right ) \int \frac {e^x}{x} \, dx+\frac {1}{5} \left (-5+e^2\right ) \int \frac {e^x}{x^2} \, dx\\ &=\frac {e^x \left (5-e^2\right )}{5 x}+\frac {e^{2+x}}{5 (5+x)}+\frac {5}{x (5+x)}+\frac {1}{5} \left (5-e^2\right ) \text {Ei}(x)+\frac {\text {Ei}(5+x)}{5 e^3}-\frac {1}{5} \int \frac {e^{2+x}}{5+x} \, dx+\frac {1}{5} \left (-5+e^2\right ) \int \frac {e^x}{x} \, dx\\ &=\frac {e^x \left (5-e^2\right )}{5 x}+\frac {e^{2+x}}{5 (5+x)}+\frac {5}{x (5+x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 25, normalized size = 1.09 \begin {gather*} \frac {5-e^{2+x}+e^x (5+x)}{x (5+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-25 - 10*x + E^(2 + x)*(5 - 3*x - x^2) + E^x*(-25 + 15*x + 9*x^2 + x^3))/(25*x^2 + 10*x^3 + x^4),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 29, normalized size = 1.26 \begin {gather*} \frac {{\left ({\left (x - e^{2} + 5\right )} e^{\left (x + 2\right )} + 5 \, e^{2}\right )} e^{\left (-2\right )}}{x^{2} + 5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-3*x+5)*exp(2+x)+(x^3+9*x^2+15*x-25)*exp(x)-10*x-25)/(x^4+10*x^3+25*x^2),x, algorithm="fricas"
)

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 26, normalized size = 1.13 \begin {gather*} \frac {x e^{x} - e^{\left (x + 2\right )} + 5 \, e^{x} + 5}{x^{2} + 5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-3*x+5)*exp(2+x)+(x^3+9*x^2+15*x-25)*exp(x)-10*x-25)/(x^4+10*x^3+25*x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 25, normalized size = 1.09




method result size



norman \(\frac {5+\left (5-{\mathrm e}^{2}\right ) {\mathrm e}^{x}+{\mathrm e}^{x} x}{\left (5+x \right ) x}\) \(25\)
risch \(\frac {5}{\left (5+x \right ) x}-\frac {\left ({\mathrm e}^{2}-x -5\right ) {\mathrm e}^{x}}{\left (5+x \right ) x}\) \(31\)
default \(-\frac {1}{5+x}+\frac {1}{x}+\frac {{\mathrm e}^{x}}{x}+5 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{25 \left (5+x \right )}-\frac {7 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )}{125}-\frac {{\mathrm e}^{x}}{25 x}-\frac {3 \expIntegralEi \left (1, -x \right )}{125}\right )-3 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x}}{25+5 x}+\frac {6 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )}{25}-\frac {\expIntegralEi \left (1, -x \right )}{25}\right )-{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{5+x}-{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )\right )\) \(114\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^2-3*x+5)*exp(2+x)+(x^3+9*x^2+15*x-25)*exp(x)-10*x-25)/(x^4+10*x^3+25*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 42, normalized size = 1.83 \begin {gather*} \frac {{\left (x - e^{2} + 5\right )} e^{x}}{x^{2} + 5 \, x} + \frac {2 \, x + 5}{x^{2} + 5 \, x} - \frac {2}{x + 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-3*x+5)*exp(2+x)+(x^3+9*x^2+15*x-25)*exp(x)-10*x-25)/(x^4+10*x^3+25*x^2),x, algorithm="maxima"
)

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 24, normalized size = 1.04 \begin {gather*} \frac {x\,{\mathrm {e}}^x-{\mathrm {e}}^x\,\left ({\mathrm {e}}^2-5\right )+5}{x^2+5\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(10*x - exp(x)*(15*x + 9*x^2 + x^3 - 25) + exp(x + 2)*(3*x + x^2 - 5) + 25)/(25*x^2 + 10*x^3 + x^4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 24, normalized size = 1.04 \begin {gather*} \frac {\left (x - e^{2} + 5\right ) e^{x}}{x^{2} + 5 x} + \frac {5}{x^{2} + 5 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**2-3*x+5)*exp(2+x)+(x**3+9*x**2+15*x-25)*exp(x)-10*x-25)/(x**4+10*x**3+25*x**2),x)

[Out]

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

________________________________________________________________________________________