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

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 = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2320, 78} \begin {gather*} x-2 \log \left (1-e^x\right ) \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}{(1-x) x} \, dx,x,e^x\right )\\ &=\text {Subst}\left (\int \left (-\frac {2}{-1+x}+\frac {1}{x}\right ) \, dx,x,e^x\right )\\ &=x-2 \log \left (1-e^x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 13, normalized size = 1.08 \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 = 12, normalized size = 1.00

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.69, size = 9, normalized size = 0.75 \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 = 1.23, size = 9, normalized size = 0.75 \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 = 0.92, size = 10, normalized size = 0.83 \begin {gather*} x - 2 \, \log \left ({\left | e^{x} - 1 \right |}\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(abs(e^x - 1))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________