3.1.6 \(\int \frac {1}{1+3 e^x} \, dx\) [6]

Optimal. Leaf size=12 \[ x-\log \left (1+3 e^x\right ) \]

[Out]

x-ln(1+3*exp(x))

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Int[(1 + 3*E^x)^(-1),x]

[Out]

x - Log[1 + 3*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 2320

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} &=\text {Subst}\left (\int \frac {1}{x (1+3 x)} \, dx,x,e^x\right )\\ &=-\left (3 \text {Subst}\left (\int \frac {1}{1+3 x} \, dx,x,e^x\right )\right )+\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )\\ &=x-\log \left (1+3 e^x\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 15, normalized size = 1.25 \begin {gather*} \log \left (e^x\right )-\log \left (1+3 e^x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + 3*E^x)^(-1),x]

[Out]

Log[E^x] - Log[1 + 3*E^x]

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 14, normalized size = 1.17

method result size
risch \(x -\ln \left (\frac {1}{3}+{\mathrm e}^{x}\right )\) \(10\)
parallelrisch \(x -\ln \left (\frac {1}{3}+{\mathrm e}^{x}\right )\) \(10\)
norman \(x -\ln \left (1+3 \,{\mathrm e}^{x}\right )\) \(12\)
derivativedivides \(-\ln \left (1+3 \,{\mathrm e}^{x}\right )+\ln \left ({\mathrm e}^{x}\right )\) \(14\)
default \(-\ln \left (1+3 \,{\mathrm e}^{x}\right )+\ln \left ({\mathrm e}^{x}\right )\) \(14\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+3*exp(x)),x,method=_RETURNVERBOSE)

[Out]

-ln(1+3*exp(x))+ln(exp(x))

________________________________________________________________________________________

Maxima [A]
time = 0.37, size = 11, normalized size = 0.92 \begin {gather*} x - \log \left (3 \, e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+3*exp(x)),x, algorithm="maxima")

[Out]

x - log(3*e^x + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.58, size = 11, normalized size = 0.92 \begin {gather*} x - \log \left (3 \, e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+3*exp(x)),x, algorithm="fricas")

[Out]

x - log(3*e^x + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 8, normalized size = 0.67 \begin {gather*} x - \log {\left (e^{x} + \frac {1}{3} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+3*exp(x)),x)

[Out]

x - log(exp(x) + 1/3)

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 11, normalized size = 0.92 \begin {gather*} x - \log \left (3 \, e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+3*exp(x)),x, algorithm="giac")

[Out]

x - log(3*e^x + 1)

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 11, normalized size = 0.92 \begin {gather*} x-\ln \left (3\,{\mathrm {e}}^x+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3*exp(x) + 1),x)

[Out]

x - log(3*exp(x) + 1)

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 19, normalized size = 1.58 \begin {gather*} \frac {\ln \left (1+3 \,{\mathrm e}^{x}\right )}{3}-\frac {\ln \left (-2+3 \,{\mathrm e}^{x}\right )}{3} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

int(1/(1+3*exp(x)),x)

[Out]

1/3*ln(1+3*exp(x))-1/3*ln(-2+3*exp(x))

________________________________________________________________________________________