3.473 \(\int \frac{4^x}{a+2^x b} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0372135, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2248, 43} \[ \frac{2^x}{b \log (2)}-\frac{a \log \left (a+b 2^x\right )}{b^2 \log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rule 43

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])

Rubi steps

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

Mathematica [A]  time = 0.0186802, size = 27, normalized size = 0.9 \[ \frac{\frac{2^x}{b}-\frac{a \log \left (a+b 2^x\right )}{b^2}}{\log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 35, normalized size = 1.2 \begin{align*}{\frac{{{\rm e}^{x\ln \left ( 2 \right ) }}}{\ln \left ( 2 \right ) b}}-{\frac{a\ln \left ( a+{{\rm e}^{x\ln \left ( 2 \right ) }}b \right ) }{\ln \left ( 2 \right ){b}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.43986, size = 41, normalized size = 1.37 \begin{align*} \frac{2^{x}}{b \log \left (2\right )} - \frac{a \log \left (2^{x} b + a\right )}{b^{2} \log \left (2\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.56517, size = 55, normalized size = 1.83 \begin{align*} \frac{2^{x} b - a \log \left (2^{x} b + a\right )}{b^{2} \log \left (2\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.310819, size = 41, normalized size = 1.37 \begin{align*} - \frac{a \log{\left (\frac{a}{b} + e^{\frac{x \log{\left (4 \right )}}{2}} \right )}}{b^{2} \log{\left (2 \right )}} + \begin{cases} \frac{e^{\frac{x \log{\left (4 \right )}}{2}}}{b \log{\left (2 \right )}} & \text{for}\: b \log{\left (2 \right )} \neq 0 \\\frac{x}{b} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-a*log(a/b + exp(x*log(4)/2))/(b**2*log(2)) + Piecewise((exp(x*log(4)/2)/(b*log(2)), Ne(b*log(2), 0)), (x/b, T
rue))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{4^{x}}{2^{x} b + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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