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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0258383, antiderivative size = 18, normalized size of antiderivative = 1., 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 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]]]

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]

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.0086721, size = 18, normalized size = 1. \[ \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]

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

________________________________________________________________________________________

Maple [A]  time = 0.025, size = 18, normalized size = 1. \begin{align*} -{\frac{\ln \left ({{\rm e}^{2\,x}} \right ) }{6}}+{\frac{2\,\ln \left ( 3+{{\rm e}^{2\,x}} \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.957969, size = 18, normalized size = 1. \begin{align*} -\frac{1}{3} \, x + \frac{2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 0.946902, size = 42, normalized size = 2.33 \begin{align*} -\frac{1}{3} \, x + \frac{2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \end{align*}

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)

________________________________________________________________________________________

Sympy [A]  time = 0.087024, size = 14, normalized size = 0.78 \begin{align*} - \frac{x}{3} + \frac{2 \log{\left (e^{2 x} + 3 \right )}}{3} \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.2009, size = 18, normalized size = 1. \begin{align*} -\frac{1}{3} \, x + \frac{2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \end{align*}

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)