3.484 \(\int \frac{2^x}{a-2^{2 x} b} \, dx\)

Optimal. Leaf size=30 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} 2^x}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \log (2)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0301893, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2249, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} 2^x}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2249

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]

Rule 208

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

Rubi steps

\begin{align*} \int \frac{2^x}{a-2^{2 x} b} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{a-b x^2} \, dx,x,2^x\right )}{\log (2)}\\ &=\frac{\tanh ^{-1}\left (\frac{2^x \sqrt{b}}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \log (2)}\\ \end{align*}

Mathematica [A]  time = 0.0052984, size = 30, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} 2^x}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.024, size = 49, normalized size = 1.6 \begin{align*}{\frac{1}{2\,\ln \left ( 2 \right ) }\ln \left ({2}^{x}+{a{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{1}{2\,\ln \left ( 2 \right ) }\ln \left ({2}^{x}-{a{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.55946, size = 189, normalized size = 6.3 \begin{align*} \left [\frac{\sqrt{a b} \log \left (\frac{2^{2 \, x} b + 2 \, \sqrt{a b} 2^{x} + a}{2^{2 \, x} b - a}\right )}{2 \, a b \log \left (2\right )}, -\frac{\sqrt{-a b} \arctan \left (\frac{\sqrt{-a b}}{2^{x} b}\right )}{a b \log \left (2\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.182175, size = 24, normalized size = 0.8 \begin{align*} \frac{\operatorname{RootSum}{\left (4 z^{2} a b - 1, \left ( i \mapsto i \log{\left (2^{x} + 2 i a \right )} \right )\right )}}{\log{\left (2 \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

RootSum(4*_z**2*a*b - 1, Lambda(_i, _i*log(2**x + 2*_i*a)))/log(2)

________________________________________________________________________________________

Giac [A]  time = 1.26682, size = 32, normalized size = 1.07 \begin{align*} -\frac{\arctan \left (\frac{2^{x} b}{\sqrt{-a b}}\right )}{\sqrt{-a b} \log \left (2\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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