3.647 \(\int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2282, 72} \[ \frac {2}{3} \log \left (e^{2 x}+3\right )-\frac {x}{3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 1.00 \[ \frac {2}{3} \log \left (e^{2 x}+3\right )-\frac {x}{3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-1/3*x + (2*Log[3 + E^(2*x)])/3

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 13, normalized size = 0.72 \[ -\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 13, normalized size = 0.72 \[ -\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 18, normalized size = 1.00 \[ \frac {2 \ln \left ({\mathrm e}^{2 x}+3\right )}{3}-\frac {\ln \left ({\mathrm e}^{2 x}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 13, normalized size = 0.72 \[ -\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 13, normalized size = 0.72 \[ \frac {2\,\ln \left ({\mathrm {e}}^{2\,x}+3\right )}{3}-\frac {x}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*log(exp(2*x) + 3))/3 - x/3

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 14, normalized size = 0.78 \[ - \frac {x}{3} + \frac {2 \log {\left (e^{2 x} + 3 \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x/3 + 2*log(exp(2*x) + 3)/3

________________________________________________________________________________________