Integrand size = 29, antiderivative size = 192 \[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=-\frac {c x^{-n p} \left (a+b x^n\right )^p \operatorname {Hypergeometric2F1}\left (1,-p,1-p,\frac {(b c-a d) x^n}{c \left (a+b x^n\right )}\right )}{d^2 n p}+\frac {x^{n (1-p)} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (1-p,-p,2-p,-\frac {b x^n}{a}\right )}{d n (1-p)}+\frac {c x^{-n p} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-p,-p,1-p,-\frac {b x^n}{a}\right )}{d^2 n p} \] Output:
-c*(a+b*x^n)^p*hypergeom([1, -p],[1-p],(-a*d+b*c)*x^n/c/(a+b*x^n))/d^2/n/p /(x^(n*p))+x^(n*(1-p))*(a+b*x^n)^p*hypergeom([-p, 1-p],[-p+2],-b*x^n/a)/d/ n/(1-p)/((1+b*x^n/a)^p)+c*(a+b*x^n)^p*hypergeom([-p, -p],[1-p],-b*x^n/a)/d ^2/n/p/(x^(n*p))/((1+b*x^n/a)^p)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 0.18 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.41 \[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=-\frac {x^{-n (-2+p)} \left (a+b x^n\right )^p \left (\frac {a+b x^n}{a}\right )^{-p} \operatorname {AppellF1}\left (2-p,-p,1,3-p,-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{c n (-2+p)} \] Input:
Integrate[(x^(-1 - n*(-2 + p))*(a + b*x^n)^p)/(c + d*x^n),x]
Output:
-(((a + b*x^n)^p*AppellF1[2 - p, -p, 1, 3 - p, -((b*x^n)/a), -((d*x^n)/c)] )/(c*n*(-2 + p)*x^(n*(-2 + p))*((a + b*x^n)/a)^p))
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 0.38 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.41, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {1013, 1012}
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 {x^{-n (p-2)-1} \left (a+b x^n\right )^p}{c+d x^n} \, dx\) |
\(\Big \downarrow \) 1013 |
\(\displaystyle \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \int \frac {x^{n (2-p)-1} \left (\frac {b x^n}{a}+1\right )^p}{d x^n+c}dx\) |
\(\Big \downarrow \) 1012 |
\(\displaystyle \frac {x^{n (2-p)} \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \operatorname {AppellF1}\left (2-p,-p,1,3-p,-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{c n (2-p)}\) |
Input:
Int[(x^(-1 - n*(-2 + p))*(a + b*x^n)^p)/(c + d*x^n),x]
Output:
(x^(n*(2 - p))*(a + b*x^n)^p*AppellF1[2 - p, -p, 1, 3 - p, -((b*x^n)/a), - ((d*x^n)/c)])/(c*n*(2 - p)*(1 + (b*x^n)/a)^p)
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ ))^(q_), x_Symbol] :> Simp[a^p*c^q*((e*x)^(m + 1)/(e*(m + 1)))*AppellF1[(m + 1)/n, -p, -q, 1 + (m + 1)/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, n - 1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ ))^(q_), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^ n/a))^FracPart[p]) Int[(e*x)^m*(1 + b*(x^n/a))^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] & & NeQ[m, n - 1] && !(IntegerQ[p] || GtQ[a, 0])
\[\int \frac {x^{-1-n \left (-2+p \right )} \left (a +b \,x^{n}\right )^{p}}{c +d \,x^{n}}d x\]
Input:
int(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x)
Output:
int(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x)
\[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{p} x^{-n {\left (p - 2\right )} - 1}}{d x^{n} + c} \,d x } \] Input:
integrate(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x, algorithm="fricas")
Output:
integral((b*x^n + a)^p*x^(-n*p + 2*n - 1)/(d*x^n + c), x)
Exception generated. \[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate(x**(-1-n*(-2+p))*(a+b*x**n)**p/(c+d*x**n),x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
\[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{p} x^{-n {\left (p - 2\right )} - 1}}{d x^{n} + c} \,d x } \] Input:
integrate(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x, algorithm="maxima")
Output:
integrate((b*x^n + a)^p*x^(-n*(p - 2) - 1)/(d*x^n + c), x)
\[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{p} x^{-n {\left (p - 2\right )} - 1}}{d x^{n} + c} \,d x } \] Input:
integrate(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x, algorithm="giac")
Output:
integrate((b*x^n + a)^p*x^(-n*(p - 2) - 1)/(d*x^n + c), x)
Timed out. \[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\int \frac {{\left (a+b\,x^n\right )}^p}{x^{n\,\left (p-2\right )+1}\,\left (c+d\,x^n\right )} \,d x \] Input:
int((a + b*x^n)^p/(x^(n*(p - 2) + 1)*(c + d*x^n)),x)
Output:
int((a + b*x^n)^p/(x^(n*(p - 2) + 1)*(c + d*x^n)), x)
\[ \int \frac {x^{-1-n (-2+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\frac {x^{n} \left (x^{n} b +a \right )^{p} d p -\left (x^{n} b +a \right )^{p} c p +\left (x^{n} b +a \right )^{p} c -x^{n p} \left (\int \frac {\left (x^{n} b +a \right )^{p}}{x^{n p +2 n} b d x +x^{n p +n} a d x +x^{n p +n} b c x +x^{n p} a c x}d x \right ) a \,c^{2} n \,p^{2}+x^{n p} \left (\int \frac {\left (x^{n} b +a \right )^{p}}{x^{n p +2 n} b d x +x^{n p +n} a d x +x^{n p +n} b c x +x^{n p} a c x}d x \right ) a \,c^{2} n p +x^{n p} \left (\int \frac {x^{2 n} \left (x^{n} b +a \right )^{p}}{x^{n p +2 n} b d x +x^{n p +n} a d x +x^{n p +n} b c x +x^{n p} a c x}d x \right ) a \,d^{2} n \,p^{2}-x^{n p} \left (\int \frac {x^{2 n} \left (x^{n} b +a \right )^{p}}{x^{n p +2 n} b d x +x^{n p +n} a d x +x^{n p +n} b c x +x^{n p} a c x}d x \right ) b c d n p}{x^{n p} d^{2} n p} \] Input:
int(x^(-1-n*(-2+p))*(a+b*x^n)^p/(c+d*x^n),x)
Output:
(x**n*(x**n*b + a)**p*d*p - (x**n*b + a)**p*c*p + (x**n*b + a)**p*c - x**( n*p)*int((x**n*b + a)**p/(x**(n*p + 2*n)*b*d*x + x**(n*p + n)*a*d*x + x**( n*p + n)*b*c*x + x**(n*p)*a*c*x),x)*a*c**2*n*p**2 + x**(n*p)*int((x**n*b + a)**p/(x**(n*p + 2*n)*b*d*x + x**(n*p + n)*a*d*x + x**(n*p + n)*b*c*x + x **(n*p)*a*c*x),x)*a*c**2*n*p + x**(n*p)*int((x**(2*n)*(x**n*b + a)**p)/(x* *(n*p + 2*n)*b*d*x + x**(n*p + n)*a*d*x + x**(n*p + n)*b*c*x + x**(n*p)*a* c*x),x)*a*d**2*n*p**2 - x**(n*p)*int((x**(2*n)*(x**n*b + a)**p)/(x**(n*p + 2*n)*b*d*x + x**(n*p + n)*a*d*x + x**(n*p + n)*b*c*x + x**(n*p)*a*c*x),x) *b*c*d*n*p)/(x**(n*p)*d**2*n*p)