3.524 \(\int \frac {-1+e^x}{1+e^x} \, dx\)

Optimal. Leaf size=12 \[ 2 \log \left (e^x+1\right )-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 = {2282, 72} \[ 2 \log \left (e^x+1\right )-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

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 {align*} \int \frac {-1+e^x}{1+e^x} \, dx &=\operatorname {Subst}\left (\int \frac {-1+x}{x (1+x)} \, dx,x,e^x\right )\\ &=\operatorname {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 = 12, normalized size = 1.00 \[ 2 \log \left (e^x+1\right )-x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {-1+e^x}{1+e^x} \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.01, size = 11, normalized size = 0.92 \[ -x + 2 \, \log \left (e^{x} + 1\right ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.57, size = 11, normalized size = 0.92 \[ -x + 2 \, \log \left (e^{x} + 1\right ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 12, normalized size = 1.00




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 \(2 \ln \left (1+{\mathrm e}^{x}\right )-\ln \left ({\mathrm e}^{x}\right )\) \(14\)
default \(2 \ln \left (1+{\mathrm e}^{x}\right )-\ln \left ({\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]

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

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 11, normalized size = 0.92 \[ -x + 2 \, \log \left (e^{x} + 1\right ) \]

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)

________________________________________________________________________________________

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

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 8, normalized size = 0.67 \[ - x + 2 \log {\left (e^{x} + 1 \right )} \]

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)

________________________________________________________________________________________