3.64.17 \(\int \frac {2+4 x+e^x (-1-x+x^2)+e^{2 e^{25} x} (1+2 x+e^{25} (-2 x-2 x^2))}{x^2+2 x^3+x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.36, antiderivative size = 55, normalized size of antiderivative = 2.39, number of steps used = 24, number of rules used = 7, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {1594, 27, 6742, 2177, 2178, 6688, 74} \begin {gather*} -\frac {e^x}{x+1}+\frac {e^{2 e^{25} x}}{x+1}+\frac {e^x}{x}-\frac {e^{2 e^{25} x}}{x}-\frac {2}{(x+1) x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2 + 4*x + E^x*(-1 - x + x^2) + E^(2*E^25*x)*(1 + 2*x + E^25*(-2*x - 2*x^2)))/(x^2 + 2*x^3 + x^4),x]

[Out]

E^x/x - E^(2*E^25*x)/x - E^x/(1 + x) + E^(2*E^25*x)/(1 + x) - 2/(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 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 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, 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 {2+4 x+e^x \left (-1-x+x^2\right )+e^{2 e^{25} x} \left (1+2 x+e^{25} \left (-2 x-2 x^2\right )\right )}{x^2 \left (1+2 x+x^2\right )} \, dx\\ &=\int \frac {2+4 x+e^x \left (-1-x+x^2\right )+e^{2 e^{25} x} \left (1+2 x+e^{25} \left (-2 x-2 x^2\right )\right )}{x^2 (1+x)^2} \, dx\\ &=\int \left (\frac {e^{2 e^{25} x} \left (1+2 \left (1-e^{25}\right ) x-2 e^{25} x^2\right )}{x^2 (1+x)^2}+\frac {2-e^x+4 x-e^x x+e^x x^2}{x^2 (1+x)^2}\right ) \, dx\\ &=\int \frac {e^{2 e^{25} x} \left (1+2 \left (1-e^{25}\right ) x-2 e^{25} x^2\right )}{x^2 (1+x)^2} \, dx+\int \frac {2-e^x+4 x-e^x x+e^x x^2}{x^2 (1+x)^2} \, dx\\ &=\int \left (\frac {e^{2 e^{25} x}}{x^2}-\frac {2 e^{25+2 e^{25} x}}{x}-\frac {e^{2 e^{25} x}}{(1+x)^2}+\frac {2 e^{25+2 e^{25} x}}{1+x}\right ) \, dx+\int \frac {2+4 x+e^x \left (-1-x+x^2\right )}{x^2 (1+x)^2} \, dx\\ &=-\left (2 \int \frac {e^{25+2 e^{25} x}}{x} \, dx\right )+2 \int \frac {e^{25+2 e^{25} x}}{1+x} \, dx+\int \frac {e^{2 e^{25} x}}{x^2} \, dx-\int \frac {e^{2 e^{25} x}}{(1+x)^2} \, dx+\int \left (\frac {2 (1+2 x)}{x^2 (1+x)^2}+\frac {e^x \left (-1-x+x^2\right )}{x^2 (1+x)^2}\right ) \, dx\\ &=-\frac {e^{2 e^{25} x}}{x}+\frac {e^{2 e^{25} x}}{1+x}-2 e^{25} \text {Ei}\left (2 e^{25} x\right )+2 e^{25-2 e^{25}} \text {Ei}\left (2 e^{25} (1+x)\right )+2 \int \frac {1+2 x}{x^2 (1+x)^2} \, dx+\left (2 e^{25}\right ) \int \frac {e^{2 e^{25} x}}{x} \, dx-\left (2 e^{25}\right ) \int \frac {e^{2 e^{25} x}}{1+x} \, dx+\int \frac {e^x \left (-1-x+x^2\right )}{x^2 (1+x)^2} \, dx\\ &=-\frac {e^{2 e^{25} x}}{x}+\frac {e^{2 e^{25} x}}{1+x}-\frac {2}{x (1+x)}+\int \left (\frac {e^x}{-1-x}-\frac {e^x}{x^2}+\frac {e^x}{x}+\frac {e^x}{(1+x)^2}\right ) \, dx\\ &=-\frac {e^{2 e^{25} x}}{x}+\frac {e^{2 e^{25} x}}{1+x}-\frac {2}{x (1+x)}+\int \frac {e^x}{-1-x} \, dx-\int \frac {e^x}{x^2} \, dx+\int \frac {e^x}{x} \, dx+\int \frac {e^x}{(1+x)^2} \, dx\\ &=\frac {e^x}{x}-\frac {e^{2 e^{25} x}}{x}-\frac {e^x}{1+x}+\frac {e^{2 e^{25} x}}{1+x}-\frac {2}{x (1+x)}+\text {Ei}(x)-\frac {\text {Ei}(1+x)}{e}-\int \frac {e^x}{x} \, dx+\int \frac {e^x}{1+x} \, dx\\ &=\frac {e^x}{x}-\frac {e^{2 e^{25} x}}{x}-\frac {e^x}{1+x}+\frac {e^{2 e^{25} x}}{1+x}-\frac {2}{x (1+x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 24, normalized size = 1.04 \begin {gather*} -\frac {2-e^x+e^{2 e^{25} x}}{x+x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2 + 4*x + E^x*(-1 - x + x^2) + E^(2*E^25*x)*(1 + 2*x + E^25*(-2*x - 2*x^2)))/(x^2 + 2*x^3 + x^4),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 21, normalized size = 0.91 \begin {gather*} -\frac {e^{\left (2 \, x e^{25}\right )} - e^{x} + 2}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*x^2-2*x)*exp(25)+2*x+1)*exp(x*exp(25))^2+(x^2-x-1)*exp(x)+4*x+2)/(x^4+2*x^3+x^2),x, algorithm=
"fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 21, normalized size = 0.91 \begin {gather*} -\frac {e^{\left (2 \, x e^{25}\right )} - e^{x} + 2}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*x^2-2*x)*exp(25)+2*x+1)*exp(x*exp(25))^2+(x^2-x-1)*exp(x)+4*x+2)/(x^4+2*x^3+x^2),x, algorithm=
"giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.24, size = 23, normalized size = 1.00




method result size



norman \(\frac {{\mathrm e}^{x}-{\mathrm e}^{2 x \,{\mathrm e}^{25}}-2}{\left (x +1\right ) x}\) \(23\)
risch \(-\frac {2}{x \left (x +1\right )}+\frac {{\mathrm e}^{x}}{x \left (x +1\right )}-\frac {{\mathrm e}^{2 x \,{\mathrm e}^{25}}}{x \left (x +1\right )}\) \(39\)
default \({\mathrm e}^{-25} \left (-\frac {{\mathrm e}^{2 x \,{\mathrm e}^{25}} {\mathrm e}^{25} \left (2 x \,{\mathrm e}^{25}+{\mathrm e}^{25}\right )}{\left (x \,{\mathrm e}^{25}+{\mathrm e}^{25}\right ) x}-2 \left (2 \,{\mathrm e}^{50} {\mathrm e}^{25}-{\mathrm e}^{75}+{\mathrm e}^{50}\right ) {\mathrm e}^{-25} {\mathrm e}^{-2 \,{\mathrm e}^{25}} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}-2 \,{\mathrm e}^{25}\right )-2 \left (-{\mathrm e}^{50}+{\mathrm e}^{75}\right ) {\mathrm e}^{-25} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}\right )\right )+\frac {2}{x +1}-\frac {2}{x}+\frac {{\mathrm e}^{x}}{x}-\frac {{\mathrm e}^{x}}{x +1}+2 \,{\mathrm e}^{-50} \left (\frac {{\mathrm e}^{2 x \,{\mathrm e}^{25}} {\mathrm e}^{75}}{x \,{\mathrm e}^{25}+{\mathrm e}^{25}}+{\mathrm e}^{75} \left (2 \,{\mathrm e}^{25}+1\right ) {\mathrm e}^{-25} {\mathrm e}^{-2 \,{\mathrm e}^{25}} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}-2 \,{\mathrm e}^{25}\right )-{\mathrm e}^{75} {\mathrm e}^{-25} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}\right )\right )-2 \,{\mathrm e}^{-25} \left (\frac {{\mathrm e}^{2 x \,{\mathrm e}^{25}} {\mathrm e}^{75}}{x \,{\mathrm e}^{25}+{\mathrm e}^{25}}+{\mathrm e}^{75} \left (2 \,{\mathrm e}^{25}+1\right ) {\mathrm e}^{-25} {\mathrm e}^{-2 \,{\mathrm e}^{25}} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}-2 \,{\mathrm e}^{25}\right )-{\mathrm e}^{75} {\mathrm e}^{-25} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}\right )\right )-2 \,{\mathrm e}^{-50} \left (-\frac {{\mathrm e}^{2 x \,{\mathrm e}^{25}} {\mathrm e}^{100}}{x \,{\mathrm e}^{25}+{\mathrm e}^{25}}-2 \,{\mathrm e}^{100} {\mathrm e}^{-2 \,{\mathrm e}^{25}} \expIntegralEi \left (1, -2 x \,{\mathrm e}^{25}-2 \,{\mathrm e}^{25}\right )\right )\) \(314\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-2*x^2-2*x)*exp(25)+2*x+1)*exp(x*exp(25))^2+(x^2-x-1)*exp(x)+4*x+2)/(x^4+2*x^3+x^2),x,method=_RETURNVER
BOSE)

[Out]

(exp(x)-exp(x*exp(25))^2-2)/(x+1)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*x^2-2*x)*exp(25)+2*x+1)*exp(x*exp(25))^2+(x^2-x-1)*exp(x)+4*x+2)/(x^4+2*x^3+x^2),x, algorithm=
"maxima")

[Out]

-2*(2*x + 1)/(x^2 + x) - (e^(2*x*e^25) - e^x)/(x^2 + x) + 4/(x + 1)

________________________________________________________________________________________

mupad [B]  time = 4.27, size = 22, normalized size = 0.96 \begin {gather*} -\frac {{\mathrm {e}}^{2\,x\,{\mathrm {e}}^{25}}-{\mathrm {e}}^x+2}{x\,\left (x+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x - exp(x)*(x - x^2 + 1) + exp(2*x*exp(25))*(2*x - exp(25)*(2*x + 2*x^2) + 1) + 2)/(x^2 + 2*x^3 + x^4),
x)

[Out]

-(exp(2*x*exp(25)) - exp(x) + 2)/(x*(x + 1))

________________________________________________________________________________________

sympy [A]  time = 0.83, size = 27, normalized size = 1.17 \begin {gather*} \frac {e^{x}}{x^{2} + x} - \frac {e^{2 x e^{25}}}{x^{2} + x} - \frac {2}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*x**2-2*x)*exp(25)+2*x+1)*exp(x*exp(25))**2+(x**2-x-1)*exp(x)+4*x+2)/(x**4+2*x**3+x**2),x)

[Out]

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

________________________________________________________________________________________