3.6.67 \(\int \frac {a^x b^x}{x^2} \, dx\) [567]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2325, 2208, 2209} \begin {gather*} (\log (a)+\log (b)) \text {Ei}(x (\log (a)+\log (b)))-\frac {a^x b^x}{x} \end {gather*}

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 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

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

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 \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.04, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a^x b^x}{x^2} \, dx \end {gather*}

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] Result contains complex when optimal does not.
time = 0.03, size = 160, normalized size = 6.15

method result size
meijerg \(-\ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right ) \left (-\frac {2+2 x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}{2 x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}+\frac {{\mathrm e}^{x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}}{x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}+\ln \left (-x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )\right )+\expIntegral \left (1, -x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )\right )+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}{x \ln \left (b \right ) \left (1+\frac {\ln \left (a \right )}{\ln \left (b \right )}\right )}\right )\) \(160\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(b)*(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))*e
xp(x*ln(b)*(1+ln(a)/ln(b)))+ln(-x*ln(b)*(1+ln(a)/ln(b)))+Ei(1,-x*ln(b)*(1+ln(a)/ln(b)))+1-ln(x)-I*Pi-ln(ln(b))
-ln(1+ln(a)/ln(b))+1/x/ln(b)/(1+ln(a)/ln(b)))

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 16, normalized size = 0.62 \begin {gather*} {\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 {gather*}

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 = 0.39, size = 34, normalized size = 1.31 \begin {gather*} -\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 {gather*}

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.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a^{x} b^{x}}{x^{2}}\, dx \end {gather*}

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.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^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.50, size = 28, normalized size = 1.08 \begin {gather*} -\mathrm {expint}\left (-x\,\left (\ln \left (a\right )+\ln \left (b\right )\right )\right )\,\left (\ln \left (a\right )+\ln \left (b\right )\right )-\frac {a^x\,b^x}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________