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

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 = 20, antiderivative size = 84 \[ \int \frac {\left (a+\frac {b}{x}\right )^n}{x^2 (c+d x)} \, dx=-\frac {\left (a+\frac {b}{x}\right )^{1+n}}{b c (1+n)}-\frac {d \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 )}{c (a c-b d) (1+n)} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1016, 948, 90, 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}{x^2 (c+d x)} \, dx\)

\(\Big \downarrow \) 1016

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

\(\Big \downarrow \) 948

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

\(\Big \downarrow \) 90

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

\(\Big \downarrow \) 78

\(\displaystyle -\frac {d \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 )}{c (n+1) (a c-b d)}-\frac {\left (a+\frac {b}{x}\right )^{n+1}}{b c (n+1)}\)

Input:

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

Output:

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

Defintions of rubi rules used

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 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

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]]
 

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

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

((a*x + b)**n*a*x - (a*x + b)**n*b*n + x**n*int((a*x + b)**n/(x**n*a*c*x** 
2 + x**n*a*d*x**3 + x**n*b*c*x + x**n*b*d*x**2),x)*a*b*c*n**2*x + x**n*int 
((a*x + b)**n/(x**n*a*c*x**2 + x**n*a*d*x**3 + x**n*b*c*x + x**n*b*d*x**2) 
,x)*a*b*c*n*x - x**n*int((a*x + b)**n/(x**n*a*c*x**2 + x**n*a*d*x**3 + x** 
n*b*c*x + x**n*b*d*x**2),x)*b**2*d*n**2*x - x**n*int((a*x + b)**n/(x**n*a* 
c*x**2 + x**n*a*d*x**3 + x**n*b*c*x + x**n*b*d*x**2),x)*b**2*d*n*x)/(x**n* 
b*c*n*x*(n + 1))