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

Optimal. Leaf size=58 \[ \frac {b^2 x}{a^3}+\frac {b^2 \log \left (a-b 2^{-x}\right )}{a^3 \log (2)}+\frac {b 2^x}{a^2 \log (2)}+\frac {2^{2 x-1}}{a \log (2)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2248, 44} \[ \frac {b^2 x}{a^3}+\frac {b^2 \log \left (a-b 2^{-x}\right )}{a^3 \log (2)}+\frac {b 2^x}{a^2 \log (2)}+\frac {2^{2 x-1}}{a \log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2248

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 38, normalized size = 0.66 \[ \frac {2 b^2 \log \left (a 2^x-b\right )+a 2^x \left (a 2^x+2 b\right )}{a^3 \log (4)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 41, normalized size = 0.71 \[ \frac {2^{2 \, x} a^{2} + 2 \cdot 2^{x} a b + 2 \, b^{2} \log \left (2^{x} a - b\right )}{2 \, a^{3} \log \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {4^{x}}{a - \frac {b}{2^{x}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 55, normalized size = 0.95 \[ \frac {{\mathrm e}^{2 \ln \relax (2) x}}{2 \ln \relax (2) a}+\frac {b \,{\mathrm e}^{\ln \relax (2) x}}{\ln \relax (2) a^{2}}+\frac {b^{2} \ln \left (a \,{\mathrm e}^{\ln \relax (2) x}-b \right )}{\ln \relax (2) a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.94, size = 58, normalized size = 1.00 \[ \frac {b^{2} x}{a^{3}} + \frac {{\left (2^{-x + 1} b + a\right )} 2^{2 \, x - 1}}{a^{2} \log \relax (2)} + \frac {b^{2} \log \left (-a + \frac {b}{2^{x}}\right )}{a^{3} \log \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {4^x}{a-\frac {b}{2^x}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 92, normalized size = 1.59 \[ \begin {cases} \frac {2^{2 x} a^{2} \log {\relax (2 )} + 2 \cdot 2^{x} a b \log {\relax (2 )}}{2 a^{3} \log {\relax (2 )}^{2}} & \text {for}\: 2 a^{3} \log {\relax (2 )}^{2} \neq 0 \\x \left (- \frac {b^{2}}{a^{3}} + \frac {a^{2} + a b + b^{2}}{a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {b^{2} x}{a^{3}} + \frac {b^{2} \log {\left (- \frac {a}{b} + 2^{- x} \right )}}{a^{3} \log {\relax (2 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________