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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 18 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=-\frac {x}{3}+\frac {2}{3} \log \left (3+e^{2 x}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2320, 78} \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=\frac {2}{3} \log \left (e^{2 x}+3\right )-\frac {x}{3} \]

[In]

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

[Out]

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

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

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.17 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=-\frac {1}{3} \log \left (e^x\right )+\frac {2}{3} \log \left (3+e^{2 x}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78

method result size
norman \(-\frac {x}{3}+\frac {2 \ln \left (3+{\mathrm e}^{2 x}\right )}{3}\) \(14\)
risch \(-\frac {x}{3}+\frac {2 \ln \left (3+{\mathrm e}^{2 x}\right )}{3}\) \(14\)
parallelrisch \(-\frac {x}{3}+\frac {2 \ln \left (3+{\mathrm e}^{2 x}\right )}{3}\) \(14\)
derivativedivides \(-\frac {\ln \left ({\mathrm e}^{2 x}\right )}{6}+\frac {2 \ln \left (3+{\mathrm e}^{2 x}\right )}{3}\) \(18\)
default \(-\frac {\ln \left ({\mathrm e}^{2 x}\right )}{6}+\frac {2 \ln \left (3+{\mathrm e}^{2 x}\right )}{3}\) \(18\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=-\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

[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] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=- \frac {x}{3} + \frac {2 \log {\left (e^{2 x} + 3 \right )}}{3} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=-\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=-\frac {1}{3} \, x + \frac {2}{3} \, \log \left (e^{\left (2 \, x\right )} + 3\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {-1+e^{2 x}}{3+e^{2 x}} \, dx=\frac {2\,\ln \left ({\mathrm {e}}^{2\,x}+3\right )}{3}-\frac {x}{3} \]

[In]

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

[Out]

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