3.567 \(\int \frac{a^x b^x}{x^2} \, dx\)

Optimal. Leaf size=26 \[ (\log (a)+\log (b)) \text{Ei}(x (\log (a)+\log (b)))-\frac{a^x b^x}{x} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0619315, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {2287, 2177, 2178} \[ (\log (a)+\log (b)) \text{Ei}(x (\log (a)+\log (b)))-\frac{a^x b^x}{x} \]

Antiderivative was successfully verified.

[In]

Int[(a^x*b^x)/x^2,x]

[Out]

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

Rule 2287

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]

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rubi steps

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

Mathematica [F]  time = 0.0489283, size = 0, normalized size = 0. \[ \int \frac{a^x b^x}{x^2} \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(a^x*b^x)/x^2,x]

[Out]

Integrate[(a^x*b^x)/x^2, x]

________________________________________________________________________________________

Maple [C]  time = 0.036, size = 160, normalized size = 6.2 \begin{align*} -\ln \left ( b \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) \left ({\frac{1}{\ln \left ( b \right ) x} \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) ^{-1}}+1-\ln \left ( x \right ) -i\pi -\ln \left ( \ln \left ( b \right ) \right ) -\ln \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) -{\frac{1}{2\,\ln \left ( b \right ) x} \left ( 2+2\,x\ln \left ( b \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) ^{-1}}+{\frac{1}{\ln \left ( b \right ) x}{{\rm e}^{x\ln \left ( b \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) }} \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) ^{-1}}+\ln \left ( -x\ln \left ( b \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) \right ) +{\it Ei} \left ( 1,-x\ln \left ( b \right ) \left ( 1+{\frac{\ln \left ( a \right ) }{\ln \left ( b \right ) }} \right ) \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(b)*(1+ln(a)/ln(b))*(1/x/ln(b)/(1+ln(a)/ln(b))+1-ln(x)-I*Pi-ln(ln(b))-ln(1+ln(a)/ln(b))-1/2/x/ln(b)/(1+ln(a
)/ln(b))*(2+2*x*ln(b)*(1+ln(a)/ln(b)))+1/x/ln(b)/(1+ln(a)/ln(b))*exp(x*ln(b)*(1+ln(a)/ln(b)))+ln(-x*ln(b)*(1+l
n(a)/ln(b)))+Ei(1,-x*ln(b)*(1+ln(a)/ln(b))))

________________________________________________________________________________________

Maxima [A]  time = 1.11111, size = 22, normalized size = 0.85 \begin{align*}{\left (\log \left (a\right ) + \log \left (b\right )\right )} \Gamma \left (-1, -x{\left (\log \left (a\right ) + \log \left (b\right )\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(a) + log(b))*gamma(-1, -x*(log(a) + log(b)))

________________________________________________________________________________________

Fricas [A]  time = 1.27189, size = 84, normalized size = 3.23 \begin{align*} -\frac{a^{x} b^{x} -{\left (x \log \left (a\right ) + x \log \left (b\right )\right )}{\rm Ei}\left (x \log \left (a\right ) + x \log \left (b\right )\right )}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a^{x} b^{x}}{x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(a**x*b**x/x**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a^{x} b^{x}}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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