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

   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 = 32, antiderivative size = 62 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\frac {2}{3} \sqrt {-1-6 e^x+3 e^{2 x}}-\frac {\text {arctanh}\left (\frac {\sqrt {3} \left (1-e^x\right )}{\sqrt {-1-6 e^x+3 e^{2 x}}}\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] (verified)

Time = 0.04 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2320, 654, 635, 212} \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\frac {2}{3} \sqrt {-6 e^x+3 e^{2 x}-1}-\frac {\text {arctanh}\left (\frac {\sqrt {3} \left (1-e^x\right )}{\sqrt {-6 e^x+3 e^{2 x}-1}}\right )}{\sqrt {3}} \]

[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 212

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

Rule 635

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 654

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 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}& = \text {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}}+\text {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 \text {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] (verified)

Time = 0.15 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.90 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\frac {2}{3} \sqrt {-1-6 e^x+3 e^{2 x}}-\frac {\log \left (3-3 e^x+\sqrt {-3-18 e^x+9 e^{2 x}}\right )}{\sqrt {3}} \]

[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 - Log[3 - 3*E^x + Sqrt[-3 - 18*E^x + 9*E^(2*x)]]/Sqrt[3]

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.81

method result size
default \(\frac {\ln \left (\frac {\left (-3+3 \,{\mathrm e}^{x}\right ) \sqrt {3}}{3}+\sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}\right ) \sqrt {3}}{3}+\frac {2 \sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}}{3}\) \(50\)
risch \(\frac {\ln \left (\frac {\left (-3+3 \,{\mathrm e}^{x}\right ) \sqrt {3}}{3}+\sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}\right ) \sqrt {3}}{3}+\frac {2 \sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}}{3}\) \(50\)
parts \(\frac {\ln \left (\frac {\left (-3+3 \,{\mathrm e}^{x}\right ) \sqrt {3}}{3}+\sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}\right ) \sqrt {3}}{3}+\frac {2 \sqrt {-1-6 \,{\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}}}{3}\) \(50\)

[In]

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

[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)

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\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} \]

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

Time = 0.84 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.94 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\frac {2 \sqrt {3 e^{2 x} - 6 e^{x} - 1}}{3} - \frac {\sqrt {3} \log {\left (2 \sqrt {3} \sqrt {3 e^{2 x} - 6 e^{x} - 1} - 6 e^{x} + 6 \right )}}{3} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.77 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\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} \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.40 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.79 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=-\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} \]

[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)

Mupad [B] (verification not implemented)

Time = 0.91 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.79 \[ \int \frac {-e^x+2 e^{2 x}}{\sqrt {-1-6 e^x+3 e^{2 x}}} \, dx=\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} \]

[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