\(\int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx\) [531]

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

Optimal result

Integrand size = 19, antiderivative size = 20 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=\text {arctanh}\left (\frac {e^x}{\sqrt {-a^2+e^{2 x}}}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2281, 223, 212} \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=\text {arctanh}\left (\frac {e^x}{\sqrt {e^{2 x}-a^2}}\right ) \]

[In]

Int[E^x/Sqrt[-a^2 + E^(2*x)],x]

[Out]

ArcTanh[E^x/Sqrt[-a^2 + E^(2*x)]]

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 223

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

Rule 2281

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_.)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Wit
h[{m = FullSimplify[d*e*(Log[F]/(g*h*Log[G]))]}, Dist[Denominator[m]/(g*h*Log[G]), Subst[Int[x^(Denominator[m]
 - 1)*(a + b*F^(c*e - d*e*(f/g))*x^Numerator[m])^p, x], x, G^(h*((f + g*x)/Denominator[m]))], x] /; LtQ[m, -1]
 || GtQ[m, 1]] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\sqrt {-a^2+x^2}} \, dx,x,e^x\right ) \\ & = \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {e^x}{\sqrt {-a^2+e^{2 x}}}\right ) \\ & = \text {arctanh}\left (\frac {e^x}{\sqrt {-a^2+e^{2 x}}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=-\log \left (-e^x+\sqrt {-a^2+e^{2 x}}\right ) \]

[In]

Integrate[E^x/Sqrt[-a^2 + E^(2*x)],x]

[Out]

-Log[-E^x + Sqrt[-a^2 + E^(2*x)]]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85

method result size
default \(\ln \left ({\mathrm e}^{x}+\sqrt {-a^{2}+{\mathrm e}^{2 x}}\right )\) \(17\)

[In]

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

[Out]

ln(exp(x)+(-a^2+exp(x)^2)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=-\log \left (\sqrt {-a^{2} + e^{\left (2 \, x\right )}} - e^{x}\right ) \]

[In]

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

[Out]

-log(sqrt(-a^2 + e^(2*x)) - e^x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (15) = 30\).

Time = 0.27 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.85 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=\begin {cases} \log {\left (2 \sqrt {- a^{2} + e^{2 x}} + 2 e^{x} \right )} & \text {for}\: a^{2} \neq 0 \\\frac {e^{x} \log {\left (e^{x} \right )}}{\sqrt {e^{2 x}}} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((log(2*sqrt(-a**2 + exp(2*x)) + 2*exp(x)), Ne(a**2, 0)), (exp(x)*log(exp(x))/sqrt(exp(2*x)), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=\log \left (2 \, \sqrt {-a^{2} + e^{\left (2 \, x\right )}} + 2 \, e^{x}\right ) \]

[In]

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

[Out]

log(2*sqrt(-a^2 + e^(2*x)) + 2*e^x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=-\log \left (-\sqrt {-a^{2} + e^{\left (2 \, x\right )}} + e^{x}\right ) \]

[In]

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

[Out]

-log(-sqrt(-a^2 + e^(2*x)) + e^x)

Mupad [B] (verification not implemented)

Time = 0.52 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \frac {e^x}{\sqrt {-a^2+e^{2 x}}} \, dx=\ln \left ({\mathrm {e}}^x+\sqrt {{\mathrm {e}}^{2\,x}-a^2}\right ) \]

[In]

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

[Out]

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