3.2.19 \(\int f^{a+\frac {b}{x}} x \, dx\) [119]

Optimal. Leaf size=56 \[ \frac {1}{2} f^{a+\frac {b}{x}} x^2+\frac {1}{2} b f^{a+\frac {b}{x}} x \log (f)-\frac {1}{2} b^2 f^a \text {Ei}\left (\frac {b \log (f)}{x}\right ) \log ^2(f) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2245, 2237, 2241} \begin {gather*} -\frac {1}{2} b^2 f^a \log ^2(f) \text {Ei}\left (\frac {b \log (f)}{x}\right )+\frac {1}{2} x^2 f^{a+\frac {b}{x}}+\frac {1}{2} b x \log (f) f^{a+\frac {b}{x}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2237

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> Simp[(c + d*x)*(F^(a + b*(c + d*x)^n)/d), x]
- Dist[b*n*Log[F], Int[(c + d*x)^n*F^(a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2/n]
 && ILtQ[n, 0]

Rule 2241

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> Simp[F^a*(ExpIntegralEi[
b*(c + d*x)^n*Log[F]]/(f*n)), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[d*e - c*f, 0]

Rule 2245

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*(F^(a + b*(c + d*x)^n)/(d*(m + 1))), x] - Dist[b*n*(Log[F]/(m + 1)), Int[(c + d*x)^(m + n)*F^(a + b*(c +
d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[-4, (m + 1)/n, 5] && IntegerQ[n
] && ((GtQ[n, 0] && LtQ[m, -1]) || (GtQ[-n, 0] && LeQ[-n, m + 1]))

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 40, normalized size = 0.71 \begin {gather*} \frac {1}{2} f^a \left (-b^2 \text {Ei}\left (\frac {b \log (f)}{x}\right ) \log ^2(f)+f^{b/x} x (x+b \log (f))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 55, normalized size = 0.98

method result size
risch \(\frac {f^{a} f^{\frac {b}{x}} x^{2}}{2}+\frac {b \ln \left (f \right ) f^{a} f^{\frac {b}{x}} x}{2}+\frac {b^{2} \ln \left (f \right )^{2} f^{a} \expIntegral \left (1, -\frac {b \ln \left (f \right )}{x}\right )}{2}\) \(55\)
meijerg \(-f^{a} b^{2} \ln \left (f \right )^{2} \left (\frac {x^{2} \left (\frac {9 b^{2} \ln \left (f \right )^{2}}{x^{2}}+\frac {12 b \ln \left (f \right )}{x}+6\right )}{12 b^{2} \ln \left (f \right )^{2}}-\frac {x^{2} \left (3+\frac {3 b \ln \left (f \right )}{x}\right ) {\mathrm e}^{\frac {b \ln \left (f \right )}{x}}}{6 b^{2} \ln \left (f \right )^{2}}-\frac {\ln \left (-\frac {b \ln \left (f \right )}{x}\right )}{2}-\frac {\expIntegral \left (1, -\frac {b \ln \left (f \right )}{x}\right )}{2}-\frac {3}{4}-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (-b \right )}{2}+\frac {\ln \left (\ln \left (f \right )\right )}{2}-\frac {x^{2}}{2 b^{2} \ln \left (f \right )^{2}}-\frac {x}{\ln \left (f \right ) b}\right )\) \(139\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*f^a*f^(b/x)*x^2+1/2*b*ln(f)*f^a*f^(b/x)*x+1/2*b^2*ln(f)^2*f^a*Ei(1,-b*ln(f)/x)

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 21, normalized size = 0.38 \begin {gather*} b^{2} f^{a} \Gamma \left (-2, -\frac {b \log \left (f\right )}{x}\right ) \log \left (f\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^2*f^a*gamma(-2, -b*log(f)/x)*log(f)^2

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 43, normalized size = 0.77 \begin {gather*} -\frac {1}{2} \, b^{2} f^{a} {\rm Ei}\left (\frac {b \log \left (f\right )}{x}\right ) \log \left (f\right )^{2} + \frac {1}{2} \, {\left (b x \log \left (f\right ) + x^{2}\right )} f^{\frac {a x + b}{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int f^{a + \frac {b}{x}} x\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f**(a+b/x)*x,x)

[Out]

Integral(f**(a + b/x)*x, 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(f^(a+b/x)*x,x, algorithm="giac")

[Out]

integrate(f^(a + b/x)*x, x)

________________________________________________________________________________________

Mupad [B]
time = 3.64, size = 54, normalized size = 0.96 \begin {gather*} b^2\,f^a\,{\ln \left (f\right )}^2\,\left (f^{b/x}\,\left (\frac {x^2}{2\,b^2\,{\ln \left (f\right )}^2}+\frac {x}{2\,b\,\ln \left (f\right )}\right )+\frac {\mathrm {expint}\left (-\frac {b\,\ln \left (f\right )}{x}\right )}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(f^(a + b/x)*x,x)

[Out]

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

________________________________________________________________________________________