3.20.26 \(\int \frac {8+12 x^2+e^{2+x} (2+2 x^2)+(-8 x-2 e^{2+x} x) \log (\frac {4+e^{2+x}}{e^2})}{4+e^{2+x}} \, dx\)

Optimal. Leaf size=20 \[ x \left (2+x \left (x-\log \left (\frac {4}{e^2}+e^x\right )\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.38, antiderivative size = 25, normalized size of antiderivative = 1.25, number of steps used = 12, number of rules used = 7, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.127, Rules used = {6742, 2184, 2190, 2531, 2282, 6589, 2532} \begin {gather*} x^3+2 x^2-x^2 \log \left (e^{x+2}+4\right )+2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(8 + 12*x^2 + E^(2 + x)*(2 + 2*x^2) + (-8*x - 2*E^(2 + x)*x)*Log[(4 + E^(2 + x))/E^2])/(4 + E^(2 + x)),x]

[Out]

2*x + 2*x^2 + x^3 - x^2*Log[4 + E^(2 + x)]

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 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 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 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 2532

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

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 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {4 x^2}{4+e^{2+x}}+2 \left (1+2 x+x^2-x \log \left (4+e^{2+x}\right )\right )\right ) \, dx\\ &=2 \int \left (1+2 x+x^2-x \log \left (4+e^{2+x}\right )\right ) \, dx+4 \int \frac {x^2}{4+e^{2+x}} \, dx\\ &=2 x+2 x^2+x^3-2 \int x \log \left (4+e^{2+x}\right ) \, dx-\int \frac {e^{2+x} x^2}{4+e^{2+x}} \, dx\\ &=2 x+2 x^2+x^3-x^2 \log \left (4+e^{2+x}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [C]  time = 0.11, size = 117, normalized size = 5.85 \begin {gather*} 2 \left (x+x^2+\frac {x^3}{3}-\frac {1}{2} x^2 \log \left (1+4 e^{-2-x}\right )+\frac {1}{2} x^2 \log \left (1+\frac {e^{2+x}}{4}\right )-\frac {1}{2} x^2 \log \left (4+e^{2+x}\right )+x \text {Li}_2\left (-4 e^{-2-x}\right )+x \text {Li}_2\left (-\frac {e^{2+x}}{4}\right )+\text {Li}_3\left (-4 e^{-2-x}\right )-\text {Li}_3\left (-\frac {e^{2+x}}{4}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(8 + 12*x^2 + E^(2 + x)*(2 + 2*x^2) + (-8*x - 2*E^(2 + x)*x)*Log[(4 + E^(2 + x))/E^2])/(4 + E^(2 + x
)),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 22, normalized size = 1.10 \begin {gather*} x^{3} - x^{2} \log \left ({\left (e^{\left (x + 2\right )} + 4\right )} e^{\left (-2\right )}\right ) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*exp(2)*exp(x)-8*x)*log((exp(2)*exp(x)+4)/exp(2))+(2*x^2+2)*exp(2)*exp(x)+12*x^2+8)/(exp(2)*ex
p(x)+4),x, algorithm="fricas")

[Out]

x^3 - x^2*log((e^(x + 2) + 4)*e^(-2)) + 2*x

________________________________________________________________________________________

giac [A]  time = 0.20, size = 24, normalized size = 1.20 \begin {gather*} x^{3} - x^{2} \log \left (e^{\left (x + 2\right )} + 4\right ) + 2 \, x^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*exp(2)*exp(x)-8*x)*log((exp(2)*exp(x)+4)/exp(2))+(2*x^2+2)*exp(2)*exp(x)+12*x^2+8)/(exp(2)*ex
p(x)+4),x, algorithm="giac")

[Out]

x^3 - x^2*log(e^(x + 2) + 4) + 2*x^2 + 2*x

________________________________________________________________________________________

maple [A]  time = 0.08, size = 23, normalized size = 1.15




method result size



risch \(x^{3}+2 x -x^{2} \ln \left (\left ({\mathrm e}^{2+x}+4\right ) {\mathrm e}^{-2}\right )\) \(23\)
norman \(x^{3}+2 x -x^{2} \ln \left (\left ({\mathrm e}^{2} {\mathrm e}^{x}+4\right ) {\mathrm e}^{-2}\right )\) \(26\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x*exp(2)*exp(x)-8*x)*ln((exp(2)*exp(x)+4)/exp(2))+(2*x^2+2)*exp(2)*exp(x)+12*x^2+8)/(exp(2)*exp(x)+4)
,x,method=_RETURNVERBOSE)

[Out]

x^3+2*x-x^2*ln((exp(2+x)+4)*exp(-2))

________________________________________________________________________________________

maxima [A]  time = 0.81, size = 36, normalized size = 1.80 \begin {gather*} x^{3} + 2 \, x^{2} - {\left (x^{2} - 2\right )} \log \left (e^{\left (x + 2\right )} + 4\right ) + 2 \, x - 2 \, \log \left (e^{\left (x + 2\right )} + 4\right ) + 4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*exp(2)*exp(x)-8*x)*log((exp(2)*exp(x)+4)/exp(2))+(2*x^2+2)*exp(2)*exp(x)+12*x^2+8)/(exp(2)*ex
p(x)+4),x, algorithm="maxima")

[Out]

x^3 + 2*x^2 - (x^2 - 2)*log(e^(x + 2) + 4) + 2*x - 2*log(e^(x + 2) + 4) + 4

________________________________________________________________________________________

mupad [B]  time = 0.24, size = 20, normalized size = 1.00 \begin {gather*} 2\,x-x^2\,\ln \left (4\,{\mathrm {e}}^{-2}+{\mathrm {e}}^x\right )+x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((12*x^2 - log(exp(-2)*(exp(2)*exp(x) + 4))*(8*x + 2*x*exp(2)*exp(x)) + exp(2)*exp(x)*(2*x^2 + 2) + 8)/(exp
(2)*exp(x) + 4),x)

[Out]

2*x - x^2*log(4*exp(-2) + exp(x)) + x^3

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 22, normalized size = 1.10 \begin {gather*} x^{3} - x^{2} \log {\left (\frac {e^{2} e^{x} + 4}{e^{2}} \right )} + 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*exp(2)*exp(x)-8*x)*ln((exp(2)*exp(x)+4)/exp(2))+(2*x**2+2)*exp(2)*exp(x)+12*x**2+8)/(exp(2)*e
xp(x)+4),x)

[Out]

x**3 - x**2*log((exp(2)*exp(x) + 4)*exp(-2)) + 2*x

________________________________________________________________________________________