3.4.93 \(\int \frac {4}{4+e^x} \, dx\)

Optimal. Leaf size=18 \[ -\frac {5}{256}+\log (3)-\log \left (1+4 e^{-x}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 10, normalized size of antiderivative = 0.56, number of steps used = 5, number of rules used = 5, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {12, 2282, 36, 29, 31} \begin {gather*} x-\log \left (e^x+4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[4/(4 + E^x),x]

[Out]

x - Log[4 + E^x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 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]]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 1.00 \begin {gather*} 4 \left (\frac {x}{4}-\frac {1}{4} \log \left (4+e^x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[4/(4 + E^x),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 9, normalized size = 0.50 \begin {gather*} x - \log \left (e^{x} + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4/(exp(x)+4),x, algorithm="fricas")

[Out]

x - log(e^x + 4)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 9, normalized size = 0.50 \begin {gather*} x - \log \left (e^{x} + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4/(exp(x)+4),x, algorithm="giac")

[Out]

x - log(e^x + 4)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 10, normalized size = 0.56




method result size



norman \(x -\ln \left ({\mathrm e}^{x}+4\right )\) \(10\)
risch \(x -\ln \left ({\mathrm e}^{x}+4\right )\) \(10\)
derivativedivides \(-\ln \left ({\mathrm e}^{x}+4\right )+\ln \left ({\mathrm e}^{x}\right )\) \(12\)
default \(-\ln \left ({\mathrm e}^{x}+4\right )+\ln \left ({\mathrm e}^{x}\right )\) \(12\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(4/(exp(x)+4),x,method=_RETURNVERBOSE)

[Out]

x-ln(exp(x)+4)

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 9, normalized size = 0.50 \begin {gather*} x - \log \left (e^{x} + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4/(exp(x)+4),x, algorithm="maxima")

[Out]

x - log(e^x + 4)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(4/(exp(x) + 4),x)

[Out]

x - log(exp(x) + 4)

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 7, normalized size = 0.39 \begin {gather*} x - \log {\left (e^{x} + 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4/(exp(x)+4),x)

[Out]

x - log(exp(x) + 4)

________________________________________________________________________________________