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

   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 [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 46 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=-\frac {2 a \sqrt {a-2^x b}}{b^2 \log (2)}+\frac {2 \left (a-2^x b\right )^{3/2}}{3 b^2 \log (2)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2280, 45} \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=\frac {2 \left (a-b 2^x\right )^{3/2}}{3 b^2 \log (2)}-\frac {2 a \sqrt {a-b 2^x}}{b^2 \log (2)} \]

[In]

Int[4^x/Sqrt[a - 2^x*b],x]

[Out]

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2280

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_.)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Wit
h[{m = FullSimplify[g*h*(Log[G]/(d*e*Log[F]))]}, Dist[Denominator[m]*(G^(f*h - c*g*(h/d))/(d*e*Log[F])), Subst
[Int[x^(Numerator[m] - 1)*(a + b*x^Denominator[m])^p, x], x, F^(e*((c + d*x)/Denominator[m]))], x] /; LeQ[m, -
1] || GeQ[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 {x}{\sqrt {a-b x}} \, dx,x,2^x\right )}{\log (2)} \\ & = \frac {\text {Subst}\left (\int \left (\frac {a}{b \sqrt {a-b x}}-\frac {\sqrt {a-b x}}{b}\right ) \, dx,x,2^x\right )}{\log (2)} \\ & = -\frac {2 a \sqrt {a-2^x b}}{b^2 \log (2)}+\frac {2 \left (a-2^x b\right )^{3/2}}{3 b^2 \log (2)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.65 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=-\frac {2 \sqrt {a-2^x b} \left (2 a+2^x b\right )}{b^2 \log (8)} \]

[In]

Integrate[4^x/Sqrt[a - 2^x*b],x]

[Out]

(-2*Sqrt[a - 2^x*b]*(2*a + 2^x*b))/(b^2*Log[8])

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.63

method result size
risch \(-\frac {2 \left (2^{x} b +2 a \right ) \sqrt {a -2^{x} b}}{3 b^{2} \ln \left (2\right )}\) \(29\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.61 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=-\frac {2 \, {\left (2^{x} b + 2 \, a\right )} \sqrt {-2^{x} b + a}}{3 \, b^{2} \log \left (2\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.26 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=\begin {cases} - \frac {2 \cdot 2^{x} \sqrt {- 2^{x} b + a}}{3 b \log {\left (2 \right )}} - \frac {4 a \sqrt {- 2^{x} b + a}}{3 b^{2} \log {\left (2 \right )}} & \text {for}\: b \neq 0 \\\frac {4^{x}}{2 \sqrt {a} \log {\left (2 \right )}} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.54 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=\frac {2^{2 \, x + 1}}{3 \, \sqrt {-2^{x} b + a} \log \left (2\right )} + \frac {2^{x + 1} a}{3 \, \sqrt {-2^{x} b + a} b \log \left (2\right )} - \frac {4 \, a^{2}}{3 \, \sqrt {-2^{x} b + a} b^{2} \log \left (2\right )} \]

[In]

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

[Out]

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

Giac [F]

\[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=\int { \frac {4^{x}}{\sqrt {-2^{x} b + a}} \,d x } \]

[In]

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

[Out]

integrate(4^x/sqrt(-2^x*b + a), x)

Mupad [B] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.61 \[ \int \frac {4^x}{\sqrt {a-2^x b}} \, dx=-\frac {2\,\sqrt {a-2^x\,b}\,\left (2\,a+2^x\,b\right )}{3\,b^2\,\ln \left (2\right )} \]

[In]

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

[Out]

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