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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0188416, antiderivative size = 27, normalized size of antiderivative = 1., 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, 44} \[ -\frac{x}{9}+\frac{e^{-x}}{3}+\frac{1}{9} \log \left (3-e^x\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{1}{-3 e^x+e^{2 x}} \, dx &=\operatorname{Subst}\left (\int \frac{1}{(-3+x) x^2} \, dx,x,e^x\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{1}{9 (-3+x)}-\frac{1}{3 x^2}-\frac{1}{9 x}\right ) \, dx,x,e^x\right )\\ &=\frac{e^{-x}}{3}-\frac{x}{9}+\frac{1}{9} \log \left (3-e^x\right )\\ \end{align*}

Mathematica [A]  time = 0.018038, size = 23, normalized size = 0.85 \[ \frac{1}{9} \left (-x+3 e^{-x}+\log \left (3-e^x\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 20, normalized size = 0.7 \begin{align*}{\frac{\ln \left ({{\rm e}^{x}}-3 \right ) }{9}}+{\frac{1}{3\,{{\rm e}^{x}}}}-{\frac{\ln \left ({{\rm e}^{x}} \right ) }{9}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.975396, size = 23, normalized size = 0.85 \begin{align*} -\frac{1}{9} \, x + \frac{1}{3} \, e^{\left (-x\right )} + \frac{1}{9} \, \log \left (e^{x} - 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 0.773875, size = 59, normalized size = 2.19 \begin{align*} -\frac{1}{9} \,{\left (x e^{x} - e^{x} \log \left (e^{x} - 3\right ) - 3\right )} e^{\left (-x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/9*(x*e^x - e^x*log(e^x - 3) - 3)*e^(-x)

________________________________________________________________________________________

Sympy [A]  time = 0.099519, size = 17, normalized size = 0.63 \begin{align*} - \frac{x}{9} + \frac{\log{\left (e^{x} - 3 \right )}}{9} + \frac{e^{- x}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x/9 + log(exp(x) - 3)/9 + exp(-x)/3

________________________________________________________________________________________

Giac [A]  time = 1.24845, size = 24, normalized size = 0.89 \begin{align*} -\frac{1}{9} \, x + \frac{1}{3} \, e^{\left (-x\right )} + \frac{1}{9} \, \log \left ({\left | e^{x} - 3 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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