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

Optimal. Leaf size=62 \[ \frac{2}{3} \sqrt{-6 e^x+3 e^{2 x}-1}-\frac{\tanh ^{-1}\left (\frac{\sqrt{3} \left (1-e^x\right )}{\sqrt{-6 e^x+3 e^{2 x}-1}}\right )}{\sqrt{3}} \]

[Out]

(2*Sqrt[-1 - 6*E^x + 3*E^(2*x)])/3 - ArcTanh[(Sqrt[3]*(1 - E^x))/Sqrt[-1 - 6*E^x + 3*E^(2*x)]]/Sqrt[3]

________________________________________________________________________________________

Rubi [A]  time = 0.052227, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2282, 640, 621, 206} \[ \frac{2}{3} \sqrt{-6 e^x+3 e^{2 x}-1}-\frac{\tanh ^{-1}\left (\frac{\sqrt{3} \left (1-e^x\right )}{\sqrt{-6 e^x+3 e^{2 x}-1}}\right )}{\sqrt{3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*Sqrt[-1 - 6*E^x + 3*E^(2*x)])/3 - ArcTanh[(Sqrt[3]*(1 - E^x))/Sqrt[-1 - 6*E^x + 3*E^(2*x)]]/Sqrt[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 640

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(a + b*x + c*x^2)^(p +
 1))/(2*c*(p + 1)), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

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

Mathematica [A]  time = 0.0406603, size = 54, normalized size = 0.87 \[ \frac{2}{3} \sqrt{-6 e^x+3 e^{2 x}-1}+\frac{\tanh ^{-1}\left (\frac{e^x-1}{\sqrt{-2 e^x+e^{2 x}-\frac{1}{3}}}\right )}{\sqrt{3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*Sqrt[-1 - 6*E^x + 3*E^(2*x)])/3 + ArcTanh[(-1 + E^x)/Sqrt[-1/3 - 2*E^x + E^(2*x)]]/Sqrt[3]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.45963, size = 65, normalized size = 1.05 \begin{align*} \frac{1}{3} \, \sqrt{3} \log \left (2 \, \sqrt{3} \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} + 6 \, e^{x} - 6\right ) + \frac{2}{3} \, \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 0.819745, size = 173, normalized size = 2.79 \begin{align*} \frac{1}{6} \, \sqrt{3} \log \left ({\left (\sqrt{3} e^{x} - \sqrt{3}\right )} \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} + 3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} + 1\right ) + \frac{2}{3} \, \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (2 e^{x} - 1\right ) e^{x}}{\sqrt{3 e^{2 x} - 6 e^{x} - 1}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((2*exp(x) - 1)*exp(x)/sqrt(3*exp(2*x) - 6*exp(x) - 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.20756, size = 66, normalized size = 1.06 \begin{align*} -\frac{1}{3} \, \sqrt{3} \log \left ({\left | -\sqrt{3} e^{x} + \sqrt{3} + \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} \right |}\right ) + \frac{2}{3} \, \sqrt{3 \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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