\(\int \frac {x^2}{2+e^{-x}+e^x} \, dx\) [531]
Optimal result
Integrand size = 16, antiderivative size = 34 \[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )-2 \operatorname {PolyLog}\left (2,-e^x\right )
\]
[Out]
x^2-x^2/(1+exp(x))-2*x*ln(1+exp(x))-2*polylog(2,-exp(x))
Rubi [A] (verified)
Time = 0.17 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of
steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {2299, 6820, 2222, 2215, 2221,
2317, 2438} \[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=-2 \operatorname {PolyLog}\left (2,-e^x\right )-\frac {x^2}{e^x+1}+x^2-2 x \log \left (e^x+1\right )
\]
[In]
Int[x^2/(2 + E^(-x) + E^x),x]
[Out]
x^2 - x^2/(1 + E^x) - 2*x*Log[1 + E^x] - 2*PolyLog[2, -E^x]
Rule 2215
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 2221
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/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], 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 2222
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 2299
Int[(u_)/((a_) + (b_.)*(F_)^(v_) + (c_.)*(F_)^(w_)), x_Symbol] :> Int[u*(F^v/(c + a*F^v + b*F^(2*v))), x] /; F
reeQ[{F, a, b, c}, x] && EqQ[w, -v] && LinearQ[v, x] && If[RationalQ[Coefficient[v, x, 1]], GtQ[Coefficient[v,
x, 1], 0], LtQ[LeafCount[v], LeafCount[w]]]
Rule 2317
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 2438
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 6820
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]
Rubi steps \begin{align*}
\text {integral}& = \int \frac {e^x x^2}{1+2 e^x+e^{2 x}} \, dx \\ & = \int \frac {e^x x^2}{\left (1+e^x\right )^2} \, dx \\ & = -\frac {x^2}{1+e^x}+2 \int \frac {x}{1+e^x} \, dx \\ & = x^2-\frac {x^2}{1+e^x}-2 \int \frac {e^x x}{1+e^x} \, dx \\ & = x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )+2 \int \log \left (1+e^x\right ) \, dx \\ & = x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )+2 \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^x\right ) \\ & = x^2-\frac {x^2}{1+e^x}-2 x \log \left (1+e^x\right )-2 \text {Li}_2\left (-e^x\right ) \\
\end{align*}
Mathematica [A] (verified)
Time = 0.05 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.97
\[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=x \left (\frac {e^x x}{1+e^x}-2 \log \left (1+e^x\right )\right )-2 \operatorname {PolyLog}\left (2,-e^x\right )
\]
[In]
Integrate[x^2/(2 + E^(-x) + E^x),x]
[Out]
x*((E^x*x)/(1 + E^x) - 2*Log[1 + E^x]) - 2*PolyLog[2, -E^x]
Maple [A] (verified)
Time = 0.03 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94
| | |
method | result | size |
| | |
risch |
\(x^{2}-\frac {x^{2}}{1+{\mathrm e}^{x}}-2 x \ln \left (1+{\mathrm e}^{x}\right )-2 \,\operatorname {Li}_{2}\left (-{\mathrm e}^{x}\right )\) |
\(32\) |
| | |
|
|
|
[In]
int(x^2/(2+exp(-x)+exp(x)),x,method=_RETURNVERBOSE)
[Out]
x^2-x^2/(1+exp(x))-2*x*ln(1+exp(x))-2*polylog(2,-exp(x))
Fricas [A] (verification not implemented)
none
Time = 0.29 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.12
\[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=\frac {x^{2} e^{x} - 2 \, {\left (e^{x} + 1\right )} {\rm Li}_2\left (-e^{x}\right ) - 2 \, {\left (x e^{x} + x\right )} \log \left (e^{x} + 1\right )}{e^{x} + 1}
\]
[In]
integrate(x^2/(2+exp(-x)+exp(x)),x, algorithm="fricas")
[Out]
(x^2*e^x - 2*(e^x + 1)*dilog(-e^x) - 2*(x*e^x + x)*log(e^x + 1))/(e^x + 1)
Sympy [F]
\[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=- \frac {x^{2}}{e^{x} + 1} + 2 \int \frac {x}{e^{x} + 1}\, dx
\]
[In]
integrate(x**2/(2+exp(-x)+exp(x)),x)
[Out]
-x**2/(exp(x) + 1) + 2*Integral(x/(exp(x) + 1), x)
Maxima [A] (verification not implemented)
none
Time = 0.19 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88
\[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=x^{2} - 2 \, x \log \left (e^{x} + 1\right ) - \frac {x^{2}}{e^{x} + 1} - 2 \, {\rm Li}_2\left (-e^{x}\right )
\]
[In]
integrate(x^2/(2+exp(-x)+exp(x)),x, algorithm="maxima")
[Out]
x^2 - 2*x*log(e^x + 1) - x^2/(e^x + 1) - 2*dilog(-e^x)
Giac [F]
\[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=\int { \frac {x^{2}}{e^{\left (-x\right )} + e^{x} + 2} \,d x }
\]
[In]
integrate(x^2/(2+exp(-x)+exp(x)),x, algorithm="giac")
[Out]
integrate(x^2/(e^(-x) + e^x + 2), x)
Mupad [F(-1)]
Timed out. \[
\int \frac {x^2}{2+e^{-x}+e^x} \, dx=\int \frac {x^2}{{\mathrm {e}}^{-x}+{\mathrm {e}}^x+2} \,d x
\]
[In]
int(x^2/(exp(-x) + exp(x) + 2),x)
[Out]
int(x^2/(exp(-x) + exp(x) + 2), x)