Integrand size = 28, antiderivative size = 314 \[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=-\frac {f \left (a+\frac {b}{x}\right )^{1+p} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (1+p,1,-q,2+p,1+\frac {b}{a x},-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d}\right )}{a e^2 (1+p)}-\frac {b \left (a+\frac {b}{x}\right )^{1+p} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (1+p,2,-q,2+p,1+\frac {b}{a x},-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d}\right )}{a^2 e (1+p)}-\frac {f^2 \left (a+\frac {b}{x}\right )^{1+p} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (1+p,-q,1,2+p,-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},-\frac {f \left (a+\frac {b}{x}\right )}{b e-a f}\right )}{e^2 (b e-a f) (1+p)} \] Output:
-f*(a+b/x)^(p+1)*(c+d/x)^q*AppellF1(p+1,-q,1,2+p,-d*(a+b/x)/(-a*d+b*c),1+b /a/x)/a/e^2/(p+1)/((b*(c+d/x)/(-a*d+b*c))^q)-b*(a+b/x)^(p+1)*(c+d/x)^q*App ellF1(p+1,-q,2,2+p,-d*(a+b/x)/(-a*d+b*c),1+b/a/x)/a^2/e/(p+1)/((b*(c+d/x)/ (-a*d+b*c))^q)-f^2*(a+b/x)^(p+1)*(c+d/x)^q*AppellF1(p+1,-q,1,2+p,-d*(a+b/x )/(-a*d+b*c),-f*(a+b/x)/(-a*f+b*e))/e^2/(-a*f+b*e)/(p+1)/((b*(c+d/x)/(-a*d +b*c))^q)
\[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx \] Input:
Integrate[((a + b/x)^p*(c + d/x)^q)/(e + f/x),x]
Output:
Integrate[((a + b/x)^p*(c + d/x)^q)/(e + f/x), x]
Time = 0.80 (sec) , antiderivative size = 316, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {1031, 198, 2009}
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 )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx\) |
\(\Big \downarrow \) 1031 |
\(\displaystyle -\int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q x^2}{e+\frac {f}{x}}d\frac {1}{x}\) |
\(\Big \downarrow \) 198 |
\(\displaystyle -\int \left (\frac {\left (c+\frac {d}{x}\right )^q x^2 \left (a+\frac {b}{x}\right )^p}{e}-\frac {f \left (c+\frac {d}{x}\right )^q x \left (a+\frac {b}{x}\right )^p}{e^2}+\frac {f^2 \left (c+\frac {d}{x}\right )^q \left (a+\frac {b}{x}\right )^p}{e^2 \left (e+\frac {f}{x}\right )}\right )d\frac {1}{x}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b \left (a+\frac {b}{x}\right )^{p+1} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (p+1,-q,2,p+2,-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},\frac {a+\frac {b}{x}}{a}\right )}{a^2 e (p+1)}-\frac {f^2 \left (a+\frac {b}{x}\right )^{p+1} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (p+1,-q,1,p+2,-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},-\frac {f \left (a+\frac {b}{x}\right )}{b e-a f}\right )}{e^2 (p+1) (b e-a f)}-\frac {f \left (a+\frac {b}{x}\right )^{p+1} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (p+1,-q,1,p+2,-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},\frac {a+\frac {b}{x}}{a}\right )}{a e^2 (p+1)}\) |
Input:
Int[((a + b/x)^p*(c + d/x)^q)/(e + f/x),x]
Output:
-((f*(a + b/x)^(1 + p)*(c + d/x)^q*AppellF1[1 + p, -q, 1, 2 + p, -((d*(a + b/x))/(b*c - a*d)), (a + b/x)/a])/(a*e^2*(1 + p)*((b*(c + d/x))/(b*c - a* d))^q)) - (f^2*(a + b/x)^(1 + p)*(c + d/x)^q*AppellF1[1 + p, -q, 1, 2 + p, -((d*(a + b/x))/(b*c - a*d)), -((f*(a + b/x))/(b*e - a*f))])/(e^2*(b*e - a*f)*(1 + p)*((b*(c + d/x))/(b*c - a*d))^q) - (b*(a + b/x)^(1 + p)*(c + d/ x)^q*AppellF1[1 + p, -q, 2, 2 + p, -((d*(a + b/x))/(b*c - a*d)), (a + b/x) /a])/(a^2*e*(1 + p)*((b*(c + d/x))/(b*c - a*d))^q)
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_))^(q_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && IntegersQ[p, q]
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_ .)*(x_)^(n_))^(r_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p*(c + d/x^n)^q*((e + f/x^n)^r/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, e, f, p, q, r}, x] && I LtQ[n, 0]
\[\int \frac {\left (a +\frac {b}{x}\right )^{p} \left (c +\frac {d}{x}\right )^{q}}{e +\frac {f}{x}}d x\]
Input:
int((a+b/x)^p*(c+d/x)^q/(e+f/x),x)
Output:
int((a+b/x)^p*(c+d/x)^q/(e+f/x),x)
\[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{p} {\left (c + \frac {d}{x}\right )}^{q}}{e + \frac {f}{x}} \,d x } \] Input:
integrate((a+b/x)^p*(c+d/x)^q/(e+f/x),x, algorithm="fricas")
Output:
integral(x*((a*x + b)/x)^p*((c*x + d)/x)^q/(e*x + f), x)
Timed out. \[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\text {Timed out} \] Input:
integrate((a+b/x)**p*(c+d/x)**q/(e+f/x),x)
Output:
Timed out
\[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{p} {\left (c + \frac {d}{x}\right )}^{q}}{e + \frac {f}{x}} \,d x } \] Input:
integrate((a+b/x)^p*(c+d/x)^q/(e+f/x),x, algorithm="maxima")
Output:
integrate((a + b/x)^p*(c + d/x)^q/(e + f/x), x)
Exception generated. \[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((a+b/x)^p*(c+d/x)^q/(e+f/x),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro unding error%%%{1,[0,1,1,0]%%%} / %%%{1,[0,0,0,1]%%%} Error: Bad Argument Value
Timed out. \[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\int \frac {{\left (a+\frac {b}{x}\right )}^p\,{\left (c+\frac {d}{x}\right )}^q}{e+\frac {f}{x}} \,d x \] Input:
int(((a + b/x)^p*(c + d/x)^q)/(e + f/x),x)
Output:
int(((a + b/x)^p*(c + d/x)^q)/(e + f/x), x)
\[ \int \frac {\left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q}{e+\frac {f}{x}} \, dx=\int \frac {\left (a +\frac {b}{x}\right )^{p} \left (c +\frac {d}{x}\right )^{q}}{e +\frac {f}{x}}d x \] Input:
int((a+b/x)^p*(c+d/x)^q/(e+f/x),x)
Output:
int((a+b/x)^p*(c+d/x)^q/(e+f/x),x)