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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 62, normalized size of antiderivative = 1.00, 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 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])

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 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 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 {-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.04, 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]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 62, normalized size = 1.00 \[ \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} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.25, size = 49, normalized size = 0.79 \[ -\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} \]

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)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 50, normalized size = 0.81 \[ \frac {\sqrt {3}\, \ln \left (\frac {\left (3 \,{\mathrm e}^{x}-3\right ) \sqrt {3}}{3}+\sqrt {-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}-1}\right )}{3}+\frac {2 \sqrt {-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}-1}}{3} \]

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.97, size = 48, normalized size = 0.77 \[ \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} \]

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)

________________________________________________________________________________________

mupad [B]  time = 4.20, size = 49, normalized size = 0.79 \[ \frac {\sqrt {3}\,\ln \left (\sqrt {3\,{\mathrm {e}}^{2\,x}-6\,{\mathrm {e}}^x-1}-\sqrt {3}+\sqrt {3}\,{\mathrm {e}}^x\right )}{3}+\frac {2\,\sqrt {3\,{\mathrm {e}}^{2\,x}-6\,{\mathrm {e}}^x-1}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (2 e^{x} - 1\right ) e^{x}}{\sqrt {3 e^{2 x} - 6 e^{x} - 1}}\, dx \]

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)

________________________________________________________________________________________