\(\int \frac {x^{-1-n (-3+p)} (a+b x^n)^p}{c+d x^n} \, dx\) [557]

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

Optimal result

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

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

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.

Time = 0.19 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.29 \[ \int \frac {x^{-1-n (-3+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=-\frac {x^{-n (-3+p)} \left (a+b x^n\right )^p \left (\frac {a+b x^n}{a}\right )^{-p} \operatorname {AppellF1}\left (3-p,-p,1,4-p,-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{c n (-3+p)} \] Input:

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

Output:

-(((a + b*x^n)^p*AppellF1[3 - p, -p, 1, 4 - p, -((b*x^n)/a), -((d*x^n)/c)] 
)/(c*n*(-3 + p)*x^(n*(-3 + p))*((a + b*x^n)/a)^p))
 

Rubi [C] (verified)

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.30, 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-3)-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 (3-p)-1} \left (\frac {b x^n}{a}+1\right )^p}{d x^n+c}dx\)

\(\Big \downarrow \) 1012

\(\displaystyle \frac {x^{n (3-p)} \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \operatorname {AppellF1}\left (3-p,-p,1,4-p,-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{c n (3-p)}\)

Input:

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

Output:

(x^(n*(3 - p))*(a + b*x^n)^p*AppellF1[3 - p, -p, 1, 4 - p, -((b*x^n)/a), - 
((d*x^n)/c)])/(c*n*(3 - p)*(1 + (b*x^n)/a)^p)
 

Defintions of rubi rules used

rule 1012
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])
 

rule 1013
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])
 
Maple [F]

\[\int \frac {x^{-1-n \left (-3+p \right )} \left (a +b \,x^{n}\right )^{p}}{c +d \,x^{n}}d x\]

Input:

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

Output:

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

Fricas [F]

\[ \int \frac {x^{-1-n (-3+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 - 3\right )} - 1}}{d x^{n} + c} \,d x } \] Input:

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

Output:

integral((b*x^n + a)^p*x^(-n*p + 3*n - 1)/(d*x^n + c), x)
 

Sympy [F(-2)]

Exception generated. \[ \int \frac {x^{-1-n (-3+p)} \left (a+b x^n\right )^p}{c+d x^n} \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:

integrate(x**(-1-n*(-3+p))*(a+b*x**n)**p/(c+d*x**n),x)
 

Output:

Exception raised: HeuristicGCDFailed >> no luck
 

Maxima [F]

\[ \int \frac {x^{-1-n (-3+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 - 3\right )} - 1}}{d x^{n} + c} \,d x } \] Input:

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

Output:

integrate((b*x^n + a)^p*x^(-n*(p - 3) - 1)/(d*x^n + c), x)
 

Giac [F]

\[ \int \frac {x^{-1-n (-3+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 - 3\right )} - 1}}{d x^{n} + c} \,d x } \] Input:

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

Output:

integrate((b*x^n + a)^p*x^(-n*(p - 3) - 1)/(d*x^n + c), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^{-1-n (-3+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-3\right )+1}\,\left (c+d\,x^n\right )} \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

(x**(2*n)*(x**n*b + a)**p*b*d**2*p + x**n*(x**n*b + a)**p*a*d**2*p**2 - 2* 
x**n*(x**n*b + a)**p*b*c*d*p - (x**n*b + a)**p*a*c*d*p**2 + (x**n*b + a)** 
p*a*c*d*p + 2*(x**n*b + a)**p*b*c**2*p - 2*(x**n*b + a)**p*b*c**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**2*c**2*d*n*p**3 + 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**2*c**2*d*n*p**2 + 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*b*c**3*n*p**2 - 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*b* 
c**3*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**2*d**3*n* 
p**3 - 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**2*d**3*n*p**2 
 - 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)*a*b*c*d**2*n*p**2 
+ 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**2*c**2*d*n*p)/(2 
*x**(n*p)*b*d**3*n*p)