\(\int \frac {2^x}{a-2^{-2 x} b} \, dx\) [488]

   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 = 16, antiderivative size = 43 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\frac {2^x}{a \log (2)}-\frac {\sqrt {b} \text {arctanh}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \]

[Out]

2^x/a/ln(2)-arctanh(2^x*a^(1/2)/b^(1/2))*b^(1/2)/a^(3/2)/ln(2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 43, 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.250, Rules used = {2281, 199, 327, 214} \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\frac {2^x}{a \log (2)}-\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {a} 2^x}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \]

[In]

Int[2^x/(a - b/2^(2*x)),x]

[Out]

2^x/(a*Log[2]) - (Sqrt[b]*ArcTanh[(2^x*Sqrt[a])/Sqrt[b]])/(a^(3/2)*Log[2])

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 214

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

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

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}& = \frac {\text {Subst}\left (\int \frac {1}{a-\frac {b}{x^2}} \, dx,x,2^x\right )}{\log (2)} \\ & = \frac {\text {Subst}\left (\int \frac {x^2}{-b+a x^2} \, dx,x,2^x\right )}{\log (2)} \\ & = \frac {2^x}{a \log (2)}+\frac {b \text {Subst}\left (\int \frac {1}{-b+a x^2} \, dx,x,2^x\right )}{a \log (2)} \\ & = \frac {2^x}{a \log (2)}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\frac {\frac {2^x}{a}-\frac {\sqrt {b} \text {arctanh}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2}}}{\log (2)} \]

[In]

Integrate[2^x/(a - b/2^(2*x)),x]

[Out]

(2^x/a - (Sqrt[b]*ArcTanh[(2^x*Sqrt[a])/Sqrt[b]])/a^(3/2))/Log[2]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84

method result size
derivativedivides \(\frac {\frac {2^{x}}{a}-\frac {b \,\operatorname {arctanh}\left (\frac {a 2^{x}}{\sqrt {a b}}\right )}{a \sqrt {a b}}}{\ln \left (2\right )}\) \(36\)
default \(\frac {\frac {2^{x}}{a}-\frac {b \,\operatorname {arctanh}\left (\frac {a 2^{x}}{\sqrt {a b}}\right )}{a \sqrt {a b}}}{\ln \left (2\right )}\) \(36\)
risch \(\frac {2^{x}}{a \ln \left (2\right )}+\frac {\sqrt {a b}\, \ln \left (2^{x}-\frac {\sqrt {a b}}{a}\right )}{2 a^{2} \ln \left (2\right )}-\frac {\sqrt {a b}\, \ln \left (2^{x}+\frac {\sqrt {a b}}{a}\right )}{2 a^{2} \ln \left (2\right )}\) \(70\)

[In]

int(2^x/(a-b/(2^(2*x))),x,method=_RETURNVERBOSE)

[Out]

1/ln(2)*(1/a*2^x-1/a*b/(a*b)^(1/2)*arctanh(a*2^x/(a*b)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.40 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\left [\frac {\sqrt {\frac {b}{a}} \log \left (-\frac {2 \cdot 2^{x} a \sqrt {\frac {b}{a}} - 2^{2 \, x} a - b}{2^{2 \, x} a - b}\right ) + 2 \cdot 2^{x}}{2 \, a \log \left (2\right )}, \frac {\sqrt {-\frac {b}{a}} \arctan \left (\frac {2^{x} a \sqrt {-\frac {b}{a}}}{b}\right ) + 2^{x}}{a \log \left (2\right )}\right ] \]

[In]

integrate(2^x/(a-b/(2^(2*x))),x, algorithm="fricas")

[Out]

[1/2*(sqrt(b/a)*log(-(2*2^x*a*sqrt(b/a) - 2^(2*x)*a - b)/(2^(2*x)*a - b)) + 2*2^x)/(a*log(2)), (sqrt(-b/a)*arc
tan(2^x*a*sqrt(-b/a)/b) + 2^x)/(a*log(2))]

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.91 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\begin {cases} \frac {2^{x}}{a \log {\left (2 \right )}} & \text {for}\: a \log {\left (2 \right )} \neq 0 \\\frac {x}{a} & \text {otherwise} \end {cases} + \frac {\operatorname {RootSum} {\left (4 z^{2} a^{3} - b, \left ( i \mapsto i \log {\left (2^{x} - 2 i a \right )} \right )\right )}}{\log {\left (2 \right )}} \]

[In]

integrate(2**x/(a-b/(2**(2*x))),x)

[Out]

Piecewise((2**x/(a*log(2)), Ne(a*log(2), 0)), (x/a, True)) + RootSum(4*_z**2*a**3 - b, Lambda(_i, _i*log(2**x
- 2*_i*a)))/log(2)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.51 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\frac {b \log \left (\frac {2^{-x + 1} b - 2 \, \sqrt {a b}}{2^{-x + 1} b + 2 \, \sqrt {a b}}\right )}{2 \, \sqrt {a b} a \log \left (2\right )} + \frac {2^{x}}{a \log \left (2\right )} \]

[In]

integrate(2^x/(a-b/(2^(2*x))),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

integrate(2^x/(a-b/(2^(2*x))),x, algorithm="giac")

[Out]

b*arctan(2^x*a/sqrt(-a*b))/(sqrt(-a*b)*a*log(2)) + 2^x/(a*log(2))

Mupad [B] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \frac {2^x}{a-2^{-2 x} b} \, dx=\frac {2^x}{a\,\ln \left (2\right )}-\frac {\sqrt {b}\,\mathrm {atanh}\left (\frac {2^x\,\sqrt {a}}{\sqrt {b}}\right )}{a^{3/2}\,\ln \left (2\right )} \]

[In]

int(2^x/(a - b/2^(2*x)),x)

[Out]

2^x/(a*log(2)) - (b^(1/2)*atanh((2^x*a^(1/2))/b^(1/2)))/(a^(3/2)*log(2))