3.6.89 \(\int (a+\frac {b}{x})^m (c+d x) \, dx\) [589]

Optimal. Leaf size=79 \[ \frac {d \left (a+\frac {b}{x}\right )^{1+m} x^2}{2 a}-\frac {b (2 a c-b d (1-m)) \left (a+\frac {b}{x}\right )^{1+m} \, _2F_1\left (2,1+m;2+m;1+\frac {b}{a x}\right )}{2 a^3 (1+m)} \]

[Out]

1/2*d*(a+b/x)^(1+m)*x^2/a-1/2*b*(2*a*c-b*d*(1-m))*(a+b/x)^(1+m)*hypergeom([2, 1+m],[2+m],1+b/a/x)/a^3/(1+m)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {445, 457, 79, 67} \begin {gather*} \frac {d x^2 \left (a+\frac {b}{x}\right )^{m+1}}{2 a}-\frac {b \left (a+\frac {b}{x}\right )^{m+1} (2 a c-b d (1-m)) \, _2F_1\left (2,m+1;m+2;\frac {b}{a x}+1\right )}{2 a^3 (m+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b/x)^m*(c + d*x),x]

[Out]

(d*(a + b/x)^(1 + m)*x^2)/(2*a) - (b*(2*a*c - b*d*(1 - m))*(a + b/x)^(1 + m)*Hypergeometric2F1[2, 1 + m, 2 + m
, 1 + b/(a*x)])/(2*a^3*(1 + m))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 445

Int[((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[(a + b*x^n)^p*((d + c*x
^n)^q/x^(n*q)), x] /; FreeQ[{a, b, c, d, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] ||  !IntegerQ[p])

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \left (a+\frac {b}{x}\right )^m (c+d x) \, dx &=\int \left (a+\frac {b}{x}\right )^m \left (d+\frac {c}{x}\right ) x \, dx\\ &=-\text {Subst}\left (\int \frac {(a+b x)^m (d+c x)}{x^3} \, dx,x,\frac {1}{x}\right )\\ &=\frac {d \left (a+\frac {b}{x}\right )^{1+m} x^2}{2 a}-\frac {(2 a c+b d (-1+m)) \text {Subst}\left (\int \frac {(a+b x)^m}{x^2} \, dx,x,\frac {1}{x}\right )}{2 a}\\ &=\frac {d \left (a+\frac {b}{x}\right )^{1+m} x^2}{2 a}-\frac {b (2 a c-b d (1-m)) \left (a+\frac {b}{x}\right )^{1+m} \, _2F_1\left (2,1+m;2+m;1+\frac {b}{a x}\right )}{2 a^3 (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 73, normalized size = 0.92 \begin {gather*} \frac {\left (a+\frac {b}{x}\right )^m (b+a x) \left (a^2 d (1+m) x^2+b (-2 a c-b d (-1+m)) \, _2F_1\left (2,1+m;2+m;1+\frac {b}{a x}\right )\right )}{2 a^3 (1+m) x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b/x)^m*(c + d*x),x]

[Out]

((a + b/x)^m*(b + a*x)*(a^2*d*(1 + m)*x^2 + b*(-2*a*c - b*d*(-1 + m))*Hypergeometric2F1[2, 1 + m, 2 + m, 1 + b
/(a*x)]))/(2*a^3*(1 + m)*x)

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \left (a +\frac {b}{x}\right )^{m} \left (d x +c \right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b/x)^m*(d*x+c),x)

[Out]

int((a+b/x)^m*(d*x+c),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^m*(d*x+c),x, algorithm="maxima")

[Out]

integrate((d*x + c)*(a + b/x)^m, x)

________________________________________________________________________________________

Fricas [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+b/x)^m*(d*x+c),x, algorithm="fricas")

[Out]

integral((d*x + c)*((a*x + b)/x)^m, x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 2.67, size = 75, normalized size = 0.95 \begin {gather*} \frac {b^{m} c x x^{- m} \Gamma \left (1 - m\right ) {{}_{2}F_{1}\left (\begin {matrix} - m, 1 - m \\ 2 - m \end {matrix}\middle | {\frac {a x e^{i \pi }}{b}} \right )}}{\Gamma \left (2 - m\right )} + \frac {b^{m} d x^{2} x^{- m} \Gamma \left (2 - m\right ) {{}_{2}F_{1}\left (\begin {matrix} - m, 2 - m \\ 3 - m \end {matrix}\middle | {\frac {a x e^{i \pi }}{b}} \right )}}{\Gamma \left (3 - m\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)**m*(d*x+c),x)

[Out]

b**m*c*x*gamma(1 - m)*hyper((-m, 1 - m), (2 - m,), a*x*exp_polar(I*pi)/b)/(x**m*gamma(2 - m)) + b**m*d*x**2*ga
mma(2 - m)*hyper((-m, 2 - m), (3 - m,), a*x*exp_polar(I*pi)/b)/(x**m*gamma(3 - m))

________________________________________________________________________________________

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+b/x)^m*(d*x+c),x, algorithm="giac")

[Out]

integrate((d*x + c)*(a + b/x)^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {b}{x}\right )}^m\,\left (c+d\,x\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/x)^m*(c + d*x),x)

[Out]

int((a + b/x)^m*(c + d*x), x)

________________________________________________________________________________________