3.2.60 \(\int a^x b^{-x} \, dx\) [160]

Optimal. Leaf size=18 \[ \frac {a^x b^{-x}}{\log (a)-\log (b)} \]

[Out]

a^x/(b^x)/(ln(a)-ln(b))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2325, 2225} \begin {gather*} \frac {a^x b^{-x}}{\log (a)-\log (b)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a^x/b^x,x]

[Out]

a^x/(b^x*(Log[a] - Log[b]))

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2325

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

Rubi steps

\begin {align*} \int a^x b^{-x} \, dx &=\int e^{x (\log (a)-\log (b))} \, dx\\ &=\frac {a^x b^{-x}}{\log (a)-\log (b)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 18, normalized size = 1.00 \begin {gather*} \frac {a^x b^{-x}}{\log (a)-\log (b)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a^x/b^x,x]

[Out]

a^x/(b^x*(Log[a] - Log[b]))

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: Invalid NaN comparison} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[a^x/b^x,x]')

[Out]

cought exception: Invalid NaN comparison

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 19, normalized size = 1.06

method result size
gosper \(\frac {a^{x} b^{-x}}{\ln \left (a \right )-\ln \left (b \right )}\) \(19\)
risch \(\frac {a^{x} b^{-x}}{\ln \left (a \right )-\ln \left (b \right )}\) \(19\)
norman \(\frac {{\mathrm e}^{x \ln \left (a \right )} {\mathrm e}^{-x \ln \left (b \right )}}{\ln \left (a \right )-\ln \left (b \right )}\) \(23\)
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\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a^x/(b^x),x,method=_RETURNVERBOSE)

[Out]

a^x/(b^x)/(ln(a)-ln(b))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(-log(b)/log(a)>0)', see `assum
e?` for more

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 18, normalized size = 1.00 \begin {gather*} \frac {a^{x}}{b^{x} {\left (\log \left (a\right ) - \log \left (b\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a^x/(b^x),x, algorithm="fricas")

[Out]

a^x/(b^x*(log(a) - log(b)))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a**x/(b**x),x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [F] N/A
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]

integrate(a^x/(b^x),x)

[Out]

Could not integrate

________________________________________________________________________________________

Mupad [B]
time = 0.20, size = 18, normalized size = 1.00 \begin {gather*} \frac {a^x}{b^x\,\left (\ln \left (a\right )-\ln \left (b\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a^x/b^x,x)

[Out]

a^x/(b^x*(log(a) - log(b)))

________________________________________________________________________________________