\(\int \frac {(a+\frac {b}{x})^n}{c+d x} \, dx\) [286]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 17, antiderivative size = 101 \[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=-\frac {c \left (a+\frac {b}{x}\right )^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )}{d (a c-b d) (1+n)}+\frac {\left (a+\frac {b}{x}\right )^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b}{a x}\right )}{a d (1+n)} \] Output:

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

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.96 \[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\frac {\left (a+\frac {b}{x}\right )^n (b+a x) \left (a c \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )+(-a c+b d) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b}{a x}\right )\right )}{a d (-a c+b d) (1+n) x} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {941, 948, 97, 75, 78}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx\)

\(\Big \downarrow \) 941

\(\displaystyle \int \frac {\left (a+\frac {b}{x}\right )^n}{x \left (\frac {c}{x}+d\right )}dx\)

\(\Big \downarrow \) 948

\(\displaystyle -\int \frac {\left (a+\frac {b}{x}\right )^n x}{\frac {c}{x}+d}d\frac {1}{x}\)

\(\Big \downarrow \) 97

\(\displaystyle \frac {c \int \frac {\left (a+\frac {b}{x}\right )^n}{\frac {c}{x}+d}d\frac {1}{x}}{d}-\frac {\int \left (a+\frac {b}{x}\right )^n xd\frac {1}{x}}{d}\)

\(\Big \downarrow \) 75

\(\displaystyle \frac {c \int \frac {\left (a+\frac {b}{x}\right )^n}{\frac {c}{x}+d}d\frac {1}{x}}{d}+\frac {\left (a+\frac {b}{x}\right )^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b}{a x}+1\right )}{a d (n+1)}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {\left (a+\frac {b}{x}\right )^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b}{a x}+1\right )}{a d (n+1)}-\frac {c \left (a+\frac {b}{x}\right )^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )}{d (n+1) (a c-b d)}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 75
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] && (IntegerQ[m] 
 || GtQ[-d/(b*c), 0])
 

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

rule 97
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), 
x_] :> Simp[b/(b*c - a*d)   Int[(e + f*x)^p/(a + b*x), x], x] - Simp[d/(b*c 
 - a*d)   Int[(e + f*x)^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p}, 
 x] &&  !IntegerQ[p]
 

rule 941
Int[((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Sym 
bol] :> 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 948
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[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]]
 
Maple [F]

\[\int \frac {\left (a +\frac {b}{x}\right )^{n}}{d x +c}d x\]

Input:

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

Output:

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

Fricas [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n}}{d x + c} \,d x } \] Input:

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

Output:

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

Sympy [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int \frac {\left (a + \frac {b}{x}\right )^{n}}{c + d x}\, dx \] Input:

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

Output:

Integral((a + b/x)**n/(c + d*x), x)
 

Maxima [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n}}{d x + c} \,d x } \] Input:

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

Output:

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

Giac [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n}}{d x + c} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int \frac {{\left (a+\frac {b}{x}\right )}^n}{c+d\,x} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n}{c+d x} \, dx=\int \frac {\left (a x +b \right )^{n}}{x^{n} c +x^{n} d x}d x \] Input:

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

Output:

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