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])

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 1.95, size = 51, normalized size = 2.32 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\frac {a^{m x} b^{n x}}{m \text {Log}\left [a\right ]+n \text {Log}\left [b\right ]},m\text {!=}-\frac {n \text {Log}\left [b\right ]}{\text {Log}\left [a\right ]}\right \}\right \},x E^{-n x \text {Log}\left [b\right ]} b^{n x}\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

Piecewise[{{a ^ (m x) b ^ (n x) / (m Log[a] + n Log[b]), m != -n Log[b] / Log[a]}}, x E ^ (-n x Log[b]) b ^ (n
 x)]

________________________________________________________________________________________

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.32, 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 [A]
time = 0.32, 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 = 0.00, size = 319, normalized size = 14.50 \begin {gather*} \mathrm {e}^{\left (m \ln \left |a\right |+n \ln \left |b\right |\right ) x} \left (\frac {2 \left (2 m \ln \left |a\right |+2 n \ln \left |b\right |\right ) \cos \left (\left (\frac {1}{2} \pi m \left (1-\mathrm {sign}\left (a\right )\right )+\frac {1}{2} \pi n \left (1-\mathrm {sign}\left (b\right )\right )\right ) x\right )}{\left (2 m \ln \left |a\right |+2 n \ln \left |b\right |\right )^{2}+\left (-\pi m \mathrm {sign}\left (a\right )+\pi m-\pi n \mathrm {sign}\left (b\right )+\pi n\right )^{2}}-\frac {2 \left (\pi m \mathrm {sign}\left (a\right )-\pi m+\pi n \mathrm {sign}\left (b\right )-\pi n\right ) \sin \left (\left (\frac {1}{2} \pi m \left (1-\mathrm {sign}\left (a\right )\right )+\frac {1}{2} \pi n \left (1-\mathrm {sign}\left (b\right )\right )\right ) x\right )}{\left (2 m \ln \left |a\right |+2 n \ln \left |b\right |\right )^{2}+\left (-\pi m \mathrm {sign}\left (a\right )+\pi m-\pi n \mathrm {sign}\left (b\right )+\pi n\right )^{2}}\right )+\frac {\mathrm {e}^{\left (m \ln \left |a\right |+n \ln \left |b\right |\right ) x} \left (\frac {2 \mathrm {i} \mathrm {e}^{\mathrm {i} \left (\frac {1}{2} \pi m \left (1-\mathrm {sign}\left (a\right )\right )+\frac {1}{2} \pi n \left (1-\mathrm {sign}\left (b\right )\right )\right ) x}}{2 m \ln \left |a\right |-\pi \mathrm {i} m \mathrm {sign}\left (a\right )+\pi \mathrm {i} m+2 n \ln \left |b\right |-\pi \mathrm {i} n \mathrm {sign}\left (b\right )+\pi \mathrm {i} n}-\frac {2 \mathrm {i} \mathrm {e}^{-\mathrm {i} \left (\frac {1}{2} \pi m \left (1-\mathrm {sign}\left (a\right )\right )+\frac {1}{2} \pi n \left (1-\mathrm {sign}\left (b\right )\right )\right ) x}}{2 m \ln \left |a\right |+\pi \mathrm {i} m \mathrm {sign}\left (a\right )-\pi \mathrm {i} m+2 n \ln \left |b\right |+\pi \mathrm {i} n \mathrm {sign}\left (b\right )-\pi \mathrm {i} n}\right )}{2 \mathrm {i}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*e^((m*log(abs(a)) + n*log(abs(b)))*x)*(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)/((pi*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)*(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^(-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))))

________________________________________________________________________________________

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))

________________________________________________________________________________________