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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2249, 193, 321, 205} \[ \frac {2^x}{a \log (2)}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} 2^x}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 193

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 205

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

Rule 321

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 40, normalized size = 0.93 \[ \frac {\frac {2^x}{a}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} 2^x}{\sqrt {b}}\right )}{a^{3/2}}}{\log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 102, normalized size = 2.37 \[ \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 \relax (2)}, -\frac {\sqrt {\frac {b}{a}} \arctan \left (\frac {2^{x} a \sqrt {\frac {b}{a}}}{b}\right ) - 2^{x}}{a \log \relax (2)}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2^x/(a+b/(4^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)*a
rctan(2^x*a*sqrt(b/a)/b) - 2^x)/(a*log(2))]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.05, size = 74, normalized size = 1.72 \[ \frac {2^{x}}{\ln \relax (2) a}+\frac {\sqrt {-a b}\, \ln \left (2^{x}-\frac {\sqrt {-a b}}{a}\right )}{2 \ln \relax (2) a^{2}}-\frac {\sqrt {-a b}\, \ln \left (2^{x}+\frac {\sqrt {-a b}}{a}\right )}{2 \ln \relax (2) a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.98, size = 68, normalized size = 1.58 \[ \frac {b \arctan \left (\frac {b}{\sqrt {a b} 2^{x}}\right )}{\sqrt {a b} a \log \relax (2)} + \frac {4^{\frac {1}{2} \, x} a + \frac {b}{4^{\frac {1}{2} \, x}}}{a^{2} \log \relax (2)} - \frac {b}{2^{x} a^{2} \log \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.61, size = 35, normalized size = 0.81 \[ \frac {2^x}{a\,\ln \relax (2)}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {2^x\,\sqrt {a}}{\sqrt {b}}\right )}{a^{3/2}\,\ln \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.38, size = 54, normalized size = 1.26 \[ \begin {cases} \frac {e^{\frac {x \log {\relax (4 )}}{2}}}{a \log {\relax (2 )}} & \text {for}\: a \log {\relax (2 )} \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 (\frac {2 i a^{2}}{b} + e^{- \frac {x \log {\relax (4 )}}{2}} \right )} \right )\right )}}{\log {\relax (2 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________