3.6.65 \(\int a^x b^x \, dx\) [565]

Optimal. Leaf size=14 \[ \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 = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, 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.01, size = 14, 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])

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 15, normalized size = 1.07

method result size
gosper \(\frac {a^{x} b^{x}}{\ln \left (a \right )+\ln \left (b \right )}\) \(15\)
risch \(\frac {a^{x} b^{x}}{\ln \left (a \right )+\ln \left (b \right )}\) \(15\)
norman \(\frac {{\mathrm e}^{\ln \left (a \right ) x} {\mathrm e}^{\ln \left (b \right ) x}}{\ln \left (a \right )+\ln \left (b \right )}\) \(19\)
meijerg \(-\frac {1-{\mathrm e}^{x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}}{\ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}\) \(36\)

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 `assume
?` for more

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 14, normalized size = 1.00 \begin {gather*} \frac {a^{x} b^{x}}{\log \left (a\right ) + \log \left (b\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 [B] Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (12) = 24\).
time = 0.24, size = 31, normalized size = 2.21 \begin {gather*} \begin {cases} \frac {a^{x} b^{x}}{\log {\left (a \right )} + \log {\left (b \right )}} & \text {for}\: a \neq \frac {1}{b} \\\frac {b^{x} \left (\frac {1}{b}\right )^{x}}{\log {\left (\frac {1}{b} \right )} + \log {\left (b \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((a**x*b**x/(log(a) + log(b)), Ne(a, 1/b)), (b**x*(1/b)**x/(log(1/b) + log(b)), True))

________________________________________________________________________________________

Giac [C] Result contains complex when optimal does not.
time = 5.86, size = 237, normalized size = 16.93 \begin {gather*} 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 ) + \pi x\right )}{{\left (2 \, \pi - \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 (2 \, \pi - \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 ) + \pi x\right )}{{\left (2 \, \pi - \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 ) - i \, \pi x\right )}}{-2 i \, \pi + 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 ) + i \, \pi x\right )}}{2 i \, \pi - 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 )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a^x*b^x,x, algorithm="giac")

[Out]

2*(2*(log(abs(a)) + log(abs(b)))*cos(-1/2*pi*x*sgn(a) - 1/2*pi*x*sgn(b) + pi*x)/((2*pi - pi*sgn(a) - pi*sgn(b)
)^2 + 4*(log(abs(a)) + log(abs(b)))^2) + (2*pi - pi*sgn(a) - pi*sgn(b))*sin(-1/2*pi*x*sgn(a) - 1/2*pi*x*sgn(b)
 + pi*x)/((2*pi - pi*sgn(a) - pi*sgn(b))^2 + 4*(log(abs(a)) + log(abs(b)))^2))*e^(x*(log(abs(a)) + log(abs(b))
)) + I*(I*e^(1/2*I*pi*x*sgn(a) + 1/2*I*pi*x*sgn(b) - I*pi*x)/(-2*I*pi + I*pi*sgn(a) + I*pi*sgn(b) + 2*log(abs(
a)) + 2*log(abs(b))) - I*e^(-1/2*I*pi*x*sgn(a) - 1/2*I*pi*x*sgn(b) + I*pi*x)/(2*I*pi - I*pi*sgn(a) - I*pi*sgn(
b) + 2*log(abs(a)) + 2*log(abs(b))))*e^(x*(log(abs(a)) + log(abs(b))))

________________________________________________________________________________________

Mupad [B]
time = 3.60, size = 14, normalized size = 1.00 \begin {gather*} \frac {a^x\,b^x}{\ln \left (a\right )+\ln \left (b\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))

________________________________________________________________________________________