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

Optimal. Leaf size=15 \[ -5+\log (5)-x \log \left (\left (4+e^x\right )^2\right ) \]

________________________________________________________________________________________

Rubi [C]  time = 0.15, antiderivative size = 56, normalized size of antiderivative = 3.73, number of steps used = 8, number of rules used = 7, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {6688, 2190, 2279, 2391, 2282, 2394, 2315} \begin {gather*} -2 \text {Li}_2\left (-\frac {e^x}{4}\right )-2 \text {Li}_2\left (1+\frac {e^x}{4}\right )-2 x \log \left (\frac {e^x}{4}+1\right )-\log \left (-\frac {e^x}{4}\right ) \log \left (\left (e^x+4\right )^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

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

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 2394

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

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.01, size = 14, normalized size = 0.93 \begin {gather*} -x \log \left (e^{\left (2 \, x\right )} + 8 \, e^{x} + 16\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*log(e^(2*x) + 8*e^x + 16)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 15, normalized size = 1.00




method result size



norman \(-x \ln \left ({\mathrm e}^{2 x}+8 \,{\mathrm e}^{x}+16\right )\) \(15\)
default \(-2 x \ln \left (1+\frac {{\mathrm e}^{x}}{4}\right )-\left (\ln \left (\left ({\mathrm e}^{x}+4\right )^{2}\right )-2 \ln \left ({\mathrm e}^{x}+4\right )\right ) \ln \left ({\mathrm e}^{x}\right )-2 \left (\ln \left ({\mathrm e}^{x}+4\right )-\ln \left (1+\frac {{\mathrm e}^{x}}{4}\right )\right ) \ln \left (-\frac {{\mathrm e}^{x}}{4}\right )\) \(54\)
risch \(-2 x \ln \left ({\mathrm e}^{x}+4\right )+\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right ) \left (\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )\right )^{2}-2 \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )\right )+\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+4\right )^{2}\right )^{2}\right ) x}{2}\) \(68\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*ln(exp(x)^2+8*exp(x)+16)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 15, normalized size = 1.00 \begin {gather*} - x \log {\left (e^{2 x} + 8 e^{x} + 16 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4-exp(x))*ln(exp(x)**2+8*exp(x)+16)-2*exp(x)*x)/(exp(x)+4),x)

[Out]

-x*log(exp(2*x) + 8*exp(x) + 16)

________________________________________________________________________________________