3.87.78 \(\int \frac {25+10 x+e^x (5-3 x-x^2)}{25+10 e^x+e^{2 x}} \, dx\)

Optimal. Leaf size=12 \[ \frac {x (5+x)}{5+e^x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.70, antiderivative size = 22, normalized size of antiderivative = 1.83, number of steps used = 41, number of rules used = 14, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {6741, 6742, 2185, 2184, 2190, 2279, 2391, 2191, 2282, 36, 29, 31, 2531, 6589} \begin {gather*} \frac {x^2}{e^x+5}+\frac {5 x}{e^x+5} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2184

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[(c
+ d*x)^(m + 1)/(a*d*(m + 1)), x] - Dist[b/a, Int[((c + d*x)^m*(F^(g*(e + f*x)))^n)/(a + b*(F^(g*(e + f*x)))^n)
, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2185

Int[((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Dis
t[1/a, Int[(c + d*x)^m*(a + b*(F^(g*(e + f*x)))^n)^(p + 1), x], x] - Dist[b/a, Int[(c + d*x)^m*(F^(g*(e + f*x)
))^n*(a + b*(F^(g*(e + f*x)))^n)^p, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && ILtQ[p, 0] && IGtQ[m, 0
]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2191

Int[((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((a_.) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_.)*
((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m*(a + b*(F^(g*(e + f*x)))^n)^(p + 1))/(b*f*g*n*(p +
1)*Log[F]), x] - Dist[(d*m)/(b*f*g*n*(p + 1)*Log[F]), Int[(c + d*x)^(m - 1)*(a + b*(F^(g*(e + f*x)))^n)^(p + 1
), x], x] /; FreeQ[{F, a, b, c, d, e, f, g, m, n, p}, x] && NeQ[p, -1]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 6589

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 12, normalized size = 1.00 \begin {gather*} \frac {x (5+x)}{5+e^x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.07, size = 14, normalized size = 1.17 \begin {gather*} \frac {x^{2} + 5 \, x}{e^{x} + 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 14, normalized size = 1.17 \begin {gather*} \frac {x^{2} + 5 \, x}{e^{x} + 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.11, size = 12, normalized size = 1.00




method result size



risch \(\frac {\left (5+x \right ) x}{{\mathrm e}^{x}+5}\) \(12\)
norman \(\frac {x^{2}+5 x}{{\mathrm e}^{x}+5}\) \(15\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 27, normalized size = 2.25 \begin {gather*} x + \frac {x^{2} - x e^{x} - 5}{e^{x} + 5} + \frac {5}{e^{x} + 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.51, size = 11, normalized size = 0.92 \begin {gather*} \frac {x\,\left (x+5\right )}{{\mathrm {e}}^x+5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 0.83 \begin {gather*} \frac {x^{2} + 5 x}{e^{x} + 5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________