Optimal. Leaf size=43 \[ \frac {2^x}{a \log (2)}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2281, 199, 327,
214} \begin {gather*} \frac {2^x}{a \log (2)}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {a} 2^x}{\sqrt {b}}\right )}{a^{3/2} \log (2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 199
Rule 214
Rule 327
Rule 2281
Rubi steps
\begin {align*} \int \frac {2^x}{a-4^{-x} b} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{a-\frac {b}{x^2}} \, dx,x,2^x\right )}{\log (2)}\\ &=\frac {\text {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 \text {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} \tanh ^{-1}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2} \log (2)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 40, normalized size = 0.93 \begin {gather*} \frac {\frac {2^x}{a}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {2^x \sqrt {a}}{\sqrt {b}}\right )}{a^{3/2}}}{\log (2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 70, normalized size = 1.63
method | result | size |
risch | \(\frac {2^{x}}{a \ln \left (2\right )}+\frac {\sqrt {b a}\, \ln \left (2^{x}-\frac {\sqrt {b a}}{a}\right )}{2 a^{2} \ln \left (2\right )}-\frac {\sqrt {b a}\, \ln \left (2^{x}+\frac {\sqrt {b a}}{a}\right )}{2 a^{2} \ln \left (2\right )}\) | \(70\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (35) = 70\).
time = 0.50, size = 88, normalized size = 2.05 \begin {gather*} \frac {b \log \left (-\frac {\sqrt {a b} - \frac {b}{2^{x}}}{\sqrt {a b} + \frac {b}{2^{x}}}\right )}{2 \, \sqrt {a b} a \log \left (2\right )} + \frac {4^{\frac {1}{2} \, x} a - \frac {b}{4^{\frac {1}{2} \, x}}}{a^{2} \log \left (2\right )} + \frac {b}{2^{x} a^{2} \log \left (2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 103, normalized size = 2.40 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 39, normalized size = 0.91 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.68, size = 35, normalized size = 0.81 \begin {gather*} \frac {2^x}{a\,\ln \left (2\right )}-\frac {\sqrt {b}\,\mathrm {atanh}\left (\frac {2^x\,\sqrt {a}}{\sqrt {b}}\right )}{a^{3/2}\,\ln \left (2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________