Integrand size = 9, antiderivative size = 18 \[ \int a^x b^{-x} \, dx=\frac {a^x b^{-x}}{\log (a)-\log (b)} \]
[Out]
Time = 0.01 (sec) , antiderivative size = 18, 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.222, Rules used = {2325, 2225} \[ \int a^x b^{-x} \, dx=\frac {a^x b^{-x}}{\log (a)-\log (b)} \]
[In]
[Out]
Rule 2225
Rule 2325
Rubi steps \begin{align*} \text {integral}& = \int e^{x (\log (a)-\log (b))} \, dx \\ & = \frac {a^x b^{-x}}{\log (a)-\log (b)} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int a^x b^{-x} \, dx=\frac {a^x b^{-x}}{\log (a)-\log (b)} \]
[In]
[Out]
Time = 0.04 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.11
method | result | size |
gosper | \(-\frac {a^{x} b^{-x}}{\ln \left (b \right )-\ln \left (a \right )}\) | \(20\) |
risch | \(-\frac {a^{x} b^{-x}}{\ln \left (b \right )-\ln \left (a \right )}\) | \(20\) |
parallelrisch | \(-\frac {a^{x} b^{-x}}{\ln \left (b \right )-\ln \left (a \right )}\) | \(20\) |
norman | \(-\frac {{\mathrm e}^{\ln \left (a \right ) x} {\mathrm e}^{-\ln \left (b \right ) x}}{\ln \left (b \right )-\ln \left (a \right )}\) | \(24\) |
meijerg | \(-\frac {1-{\mathrm e}^{x \ln \left (a \right ) \left (1-\frac {\ln \left (b \right )}{\ln \left (a \right )}\right )}}{\ln \left (a \right ) \left (1-\frac {\ln \left (b \right )}{\ln \left (a \right )}\right )}\) | \(38\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int a^x b^{-x} \, dx=\frac {a^{x}}{b^{x} {\left (\log \left (a\right ) - \log \left (b\right )\right )}} \]
[In]
[Out]
Exception generated. \[ \int a^x b^{-x} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Exception generated. \[ \int a^x b^{-x} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.34 (sec) , antiderivative size = 216, normalized size of antiderivative = 12.00 \[ \int a^x b^{-x} \, dx=2 \, {\left (\frac {2 \, {\left (\log \left ({\left | a \right |}\right ) - \log \left ({\left | b \right |}\right )\right )} \cos \left (-\frac {1}{2} \, \pi x \mathrm {sgn}\left (a\right ) + \frac {1}{2} \, \pi x \mathrm {sgn}\left (b\right )\right )}{{\left (\pi \mathrm {sgn}\left (a\right ) - \pi \mathrm {sgn}\left (b\right )\right )}^{2} + 4 \, {\left (\log \left ({\left | a \right |}\right ) - \log \left ({\left | b \right |}\right )\right )}^{2}} - \frac {{\left (\pi \mathrm {sgn}\left (a\right ) - \pi \mathrm {sgn}\left (b\right )\right )} \sin \left (-\frac {1}{2} \, \pi x \mathrm {sgn}\left (a\right ) + \frac {1}{2} \, \pi x \mathrm {sgn}\left (b\right )\right )}{{\left (\pi \mathrm {sgn}\left (a\right ) - \pi \mathrm {sgn}\left (b\right )\right )}^{2} + 4 \, {\left (\log \left ({\left | a \right |}\right ) - \log \left ({\left | b \right |}\right )\right )}^{2}}\right )} e^{\left (x {\left (\log \left ({\left | a \right |}\right ) - \log \left ({\left | b \right |}\right )\right )}\right )} + i \, {\left (\frac {i \, e^{\left (\frac {1}{2} i \, \pi x \mathrm {sgn}\left (a\right ) - \frac {1}{2} i \, \pi x \mathrm {sgn}\left (b\right )\right )}}{i \, \pi \mathrm {sgn}\left (a\right ) - i \, \pi \mathrm {sgn}\left (b\right ) + 2 \, \log \left ({\left | a \right |}\right ) - 2 \, \log \left ({\left | b \right |}\right )} - \frac {i \, e^{\left (-\frac {1}{2} i \, \pi x \mathrm {sgn}\left (a\right ) + \frac {1}{2} i \, \pi x \mathrm {sgn}\left (b\right )\right )}}{-i \, \pi \mathrm {sgn}\left (a\right ) + i \, \pi \mathrm {sgn}\left (b\right ) + 2 \, \log \left ({\left | a \right |}\right ) - 2 \, \log \left ({\left | b \right |}\right )}\right )} e^{\left (x {\left (\log \left ({\left | a \right |}\right ) - \log \left ({\left | b \right |}\right )\right )}\right )} \]
[In]
[Out]
Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int a^x b^{-x} \, dx=\frac {a^x}{b^x\,\left (\ln \left (a\right )-\ln \left (b\right )\right )} \]
[In]
[Out]