3.5.94 \(\int a^{m x} b^{n x} \, dx\) [494]

Optimal. Leaf size=22 \[ \frac {a^{m x} b^{n x}}{m \log (a)+n \log (b)} \]

[Out]

a^(m*x)*b^(n*x)/(m*ln(a)+n*ln(b))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2325, 2225} \begin {gather*} \frac {a^{m x} b^{n x}}{m \log (a)+n \log (b)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a^(m*x)*b^(n*x),x]

[Out]

(a^(m*x)*b^(n*x))/(m*Log[a] + n*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^{m x} b^{n x} \, dx &=\int e^{x (m \log (a)+n \log (b))} \, dx\\ &=\frac {a^{m x} b^{n x}}{m \log (a)+n \log (b)}\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[a^(m*x)*b^(n*x),x]

[Out]

(a^(m*x)*b^(n*x))/(m*Log[a] + n*Log[b])

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 23, normalized size = 1.05

method result size
gosper \(\frac {a^{m x} b^{n x}}{m \ln \left (a \right )+n \ln \left (b \right )}\) \(23\)
risch \(\frac {a^{m x} b^{n x}}{m \ln \left (a \right )+n \ln \left (b \right )}\) \(23\)
norman \(\frac {{\mathrm e}^{m x \ln \left (a \right )} {\mathrm e}^{n x \ln \left (b \right )}}{m \ln \left (a \right )+n \ln \left (b \right )}\) \(25\)
meijerg \(-\frac {1-{\mathrm e}^{x n \ln \left (b \right ) \left (1+\frac {m \ln \left (a \right )}{n \ln \left (b \right )}\right )}}{n \ln \left (b \right ) \left (1+\frac {m \ln \left (a \right )}{n \ln \left (b \right )}\right )}\) \(48\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a^(m*x)*b^(n*x),x,method=_RETURNVERBOSE)

[Out]

a^(m*x)*b^(n*x)/(m*ln(a)+n*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^(m*x)*b^(n*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)*n)/(log(a)*m)>0)', see
 `assume?` f

________________________________________________________________________________________

Fricas [A]
time = 0.69, size = 22, normalized size = 1.00 \begin {gather*} \frac {a^{m x} b^{n x}}{m \log \left (a\right ) + n \log \left (b\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a^(m*x)*b^(n*x),x, algorithm="fricas")

[Out]

a^(m*x)*b^(n*x)/(m*log(a) + n*log(b))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (19) = 38\).
time = 0.28, size = 42, normalized size = 1.91 \begin {gather*} \begin {cases} \frac {a^{m x} b^{n x}}{m \log {\left (a \right )} + n \log {\left (b \right )}} & \text {for}\: m \neq - \frac {n \log {\left (b \right )}}{\log {\left (a \right )}} \\b^{n x} x e^{- n x \log {\left (b \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((a**(m*x)*b**(n*x)/(m*log(a) + n*log(b)), Ne(m, -n*log(b)/log(a))), (b**(n*x)*x*exp(-n*x*log(b)), Tr
ue))

________________________________________________________________________________________

Giac [C] Result contains complex when optimal does not.
time = 1.24, size = 325, normalized size = 14.77 \begin {gather*} 2 \, {\left (\frac {2 \, {\left (m \log \left ({\left | a \right |}\right ) + n \log \left ({\left | b \right |}\right )\right )} \cos \left (-\frac {1}{2} \, \pi m x \mathrm {sgn}\left (a\right ) - \frac {1}{2} \, \pi n x \mathrm {sgn}\left (b\right ) + \frac {1}{2} \, \pi m x + \frac {1}{2} \, \pi n x\right )}{{\left (\pi m \mathrm {sgn}\left (a\right ) + \pi n \mathrm {sgn}\left (b\right ) - \pi m - \pi n\right )}^{2} + 4 \, {\left (m \log \left ({\left | a \right |}\right ) + n \log \left ({\left | b \right |}\right )\right )}^{2}} - \frac {{\left (\pi m \mathrm {sgn}\left (a\right ) + \pi n \mathrm {sgn}\left (b\right ) - \pi m - \pi n\right )} \sin \left (-\frac {1}{2} \, \pi m x \mathrm {sgn}\left (a\right ) - \frac {1}{2} \, \pi n x \mathrm {sgn}\left (b\right ) + \frac {1}{2} \, \pi m x + \frac {1}{2} \, \pi n x\right )}{{\left (\pi m \mathrm {sgn}\left (a\right ) + \pi n \mathrm {sgn}\left (b\right ) - \pi m - \pi n\right )}^{2} + 4 \, {\left (m \log \left ({\left | a \right |}\right ) + n \log \left ({\left | b \right |}\right )\right )}^{2}}\right )} e^{\left ({\left (m \log \left ({\left | a \right |}\right ) + n \log \left ({\left | b \right |}\right )\right )} x\right )} + i \, {\left (\frac {i \, e^{\left (\frac {1}{2} i \, \pi m x \mathrm {sgn}\left (a\right ) + \frac {1}{2} i \, \pi n x \mathrm {sgn}\left (b\right ) - \frac {1}{2} i \, \pi m x - \frac {1}{2} i \, \pi n x\right )}}{i \, \pi m \mathrm {sgn}\left (a\right ) + i \, \pi n \mathrm {sgn}\left (b\right ) - i \, \pi m - i \, \pi n + 2 \, m \log \left ({\left | a \right |}\right ) + 2 \, n \log \left ({\left | b \right |}\right )} - \frac {i \, e^{\left (-\frac {1}{2} i \, \pi m x \mathrm {sgn}\left (a\right ) - \frac {1}{2} i \, \pi n x \mathrm {sgn}\left (b\right ) + \frac {1}{2} i \, \pi m x + \frac {1}{2} i \, \pi n x\right )}}{-i \, \pi m \mathrm {sgn}\left (a\right ) - i \, \pi n \mathrm {sgn}\left (b\right ) + i \, \pi m + i \, \pi n + 2 \, m \log \left ({\left | a \right |}\right ) + 2 \, n \log \left ({\left | b \right |}\right )}\right )} e^{\left ({\left (m \log \left ({\left | a \right |}\right ) + n \log \left ({\left | b \right |}\right )\right )} x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.33, size = 22, normalized size = 1.00 \begin {gather*} \frac {a^{m\,x}\,b^{n\,x}}{m\,\ln \left (a\right )+n\,\ln \left (b\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a^(m*x)*b^(n*x),x)

[Out]

(a^(m*x)*b^(n*x))/(m*log(a) + n*log(b))

________________________________________________________________________________________