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]
________________________________________________________________________________________
Rubi [A] time = 0.0431895, antiderivative size = 43, normalized size of antiderivative = 1., 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]
[Out]
Rule 2249
Rule 193
Rule 321
Rule 205
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.0200666, 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]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.029, size = 74, normalized size = 1.7 \begin{align*}{\frac{{2}^{x}}{a\ln \left ( 2 \right ) }}+{\frac{1}{2\,{a}^{2}\ln \left ( 2 \right ) }\sqrt{-ab}\ln \left ({2}^{x}-{\frac{1}{a}\sqrt{-ab}} \right ) }-{\frac{1}{2\,{a}^{2}\ln \left ( 2 \right ) }\sqrt{-ab}\ln \left ({2}^{x}+{\frac{1}{a}\sqrt{-ab}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.55328, size = 212, normalized size = 4.93 \begin{align*} \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 \left (2\right )}, -\frac{\sqrt{\frac{b}{a}} \arctan \left (\frac{2^{x} a \sqrt{\frac{b}{a}}}{b}\right ) - 2^{x}}{a \log \left (2\right )}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.201869, size = 39, normalized size = 0.91 \begin{align*} \begin{cases} \frac{2^{x}}{a \log{\left (2 \right )}} & \text{for}\: a \log{\left (2 \right )} \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 (2^{x} - 2 i a \right )} \right )\right )}}{\log{\left (2 \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{2^{x}}{a + \frac{b}{4^{x}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]