3.66.70 \(\int \frac {-2-7 e^{2 x}+e^x (-2-14 x)-7 x^2}{e^{2 x}+2 e^x x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.28, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {6741, 6742, 2273} \begin {gather*} \frac {2}{x+e^x}-7 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 - 7*E^(2*x) + E^x*(-2 - 14*x) - 7*x^2)/(E^(2*x) + 2*E^x*x + x^2),x]

[Out]

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

Rule 2273

Int[(x_)^(m_.)*(E^(x_) + (x_)^(m_.))^(n_), x_Symbol] :> -Simp[(E^x + x^m)^(n + 1)/(n + 1), x] + (Dist[m, Int[x
^(m - 1)*(E^x + x^m)^n, x], x] + Int[(E^x + x^m)^(n + 1), x]) /; RationalQ[m, n] && GtQ[m, 0] && LtQ[n, 0] &&
NeQ[n, -1]

Rule 6741

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

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-7 e^{2 x}+e^x (-2-14 x)-7 x^2}{\left (e^x+x\right )^2} \, dx\\ &=\int \left (-7+\frac {2 (-1+x)}{\left (e^x+x\right )^2}-\frac {2}{e^x+x}\right ) \, dx\\ &=-7 x+2 \int \frac {-1+x}{\left (e^x+x\right )^2} \, dx-2 \int \frac {1}{e^x+x} \, dx\\ &=-7 x-2 \int \frac {1}{e^x+x} \, dx+2 \int \left (-\frac {1}{\left (e^x+x\right )^2}+\frac {x}{\left (e^x+x\right )^2}\right ) \, dx\\ &=-7 x-2 \int \frac {1}{\left (e^x+x\right )^2} \, dx+2 \int \frac {x}{\left (e^x+x\right )^2} \, dx-2 \int \frac {1}{e^x+x} \, dx\\ &=-7 x+\frac {2}{e^x+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 13, normalized size = 1.00 \begin {gather*} -7 x+\frac {2}{e^x+x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 - 7*E^(2*x) + E^x*(-2 - 14*x) - 7*x^2)/(E^(2*x) + 2*E^x*x + x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 20, normalized size = 1.54 \begin {gather*} -\frac {7 \, x^{2} + 7 \, x e^{x} - 2}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-7*exp(x)^2+(-14*x-2)*exp(x)-7*x^2-2)/(exp(x)^2+2*exp(x)*x+x^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.39, size = 20, normalized size = 1.54 \begin {gather*} -\frac {7 \, x^{2} + 7 \, x e^{x} - 2}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-7*exp(x)^2+(-14*x-2)*exp(x)-7*x^2-2)/(exp(x)^2+2*exp(x)*x+x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 13, normalized size = 1.00




method result size



risch \(-7 x +\frac {2}{{\mathrm e}^{x}+x}\) \(13\)
norman \(\frac {2-7 x^{2}-7 \,{\mathrm e}^{x} x}{{\mathrm e}^{x}+x}\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-7*exp(x)^2+(-14*x-2)*exp(x)-7*x^2-2)/(exp(x)^2+2*exp(x)*x+x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 20, normalized size = 1.54 \begin {gather*} -\frac {7 \, x^{2} + 7 \, x e^{x} - 2}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-7*exp(x)^2+(-14*x-2)*exp(x)-7*x^2-2)/(exp(x)^2+2*exp(x)*x+x^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.17, size = 12, normalized size = 0.92 \begin {gather*} \frac {2}{x+{\mathrm {e}}^x}-7\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(7*exp(2*x) + exp(x)*(14*x + 2) + 7*x^2 + 2)/(exp(2*x) + 2*x*exp(x) + x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 8, normalized size = 0.62 \begin {gather*} - 7 x + \frac {2}{x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-7*exp(x)**2+(-14*x-2)*exp(x)-7*x**2-2)/(exp(x)**2+2*exp(x)*x+x**2),x)

[Out]

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

________________________________________________________________________________________