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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (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 = 13, antiderivative size = 30 \[ \int \frac {2^x}{a+4^x b} \, dx=\frac {\arctan \left (\frac {2^x \sqrt {b}}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} \log (2)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2281, 211} \[ \int \frac {2^x}{a+4^x b} \, dx=\frac {\arctan \left (\frac {\sqrt {b} 2^x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} \log (2)} \]

[In]

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

[Out]

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

Rule 211

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

Rule 2281

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(52\) vs. \(2(22)=44\).

Time = 0.05 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.77

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

[In]

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

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.87 \[ \int \frac {2^x}{a+4^x b} \, dx=\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 ] \]

[In]

integrate(2^x/(a+4^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] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.97 \[ \int \frac {2^x}{a+4^x b} \, dx=\frac {\operatorname {RootSum} {\left (4 z^{2} a b + 1, \left ( i \mapsto i \log {\left (2 i a + e^{\frac {x \log {\left (4 \right )}}{2}} \right )} \right )\right )}}{\log {\left (2 \right )}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70 \[ \int \frac {2^x}{a+4^x b} \, dx=\frac {\arctan \left (\frac {2^{x} b}{\sqrt {a b}}\right )}{\sqrt {a b} \log \left (2\right )} \]

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \frac {2^x}{a+4^x b} \, dx=\frac {\mathrm {atan}\left (\frac {2^x\,\sqrt {b}}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}\,\ln \left (2\right )} \]

[In]

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

[Out]

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