3.6.24 \(\int \frac {-1+e^x}{1+e^x} \, dx\) [524]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2320, 78} \begin {gather*} 2 \log \left (e^x+1\right )-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+exp(x))/(1+exp(x)),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x) - 1)/(exp(x) + 1),x)

[Out]

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

________________________________________________________________________________________