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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 5.20 (sec) , antiderivative size = 203, normalized size of antiderivative = 0.81 \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^3 \, dx=-\frac {x^{-n p} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (3 c^2 d p \left (6-5 p+p^2\right ) x^n \operatorname {Hypergeometric2F1}\left (1-p,-p,2-p,-\frac {b x^n}{a}\right )+(-1+p) \left (3 c d^2 (-3+p) p x^{2 n} \operatorname {Hypergeometric2F1}\left (2-p,-p,3-p,-\frac {b x^n}{a}\right )+(-2+p) \left (d^3 p x^{3 n} \operatorname {Hypergeometric2F1}\left (3-p,-p,4-p,-\frac {b x^n}{a}\right )+c^3 (-3+p) \operatorname {Hypergeometric2F1}\left (-p,-p,1-p,-\frac {b x^n}{a}\right )\right )\right )\right )}{n (-3+p) (-2+p) (-1+p) p} \] Input:

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

Output:

-(((a + b*x^n)^p*(3*c^2*d*p*(6 - 5*p + p^2)*x^n*Hypergeometric2F1[1 - p, - 
p, 2 - p, -((b*x^n)/a)] + (-1 + p)*(3*c*d^2*(-3 + p)*p*x^(2*n)*Hypergeomet 
ric2F1[2 - p, -p, 3 - p, -((b*x^n)/a)] + (-2 + p)*(d^3*p*x^(3*n)*Hypergeom 
etric2F1[3 - p, -p, 4 - p, -((b*x^n)/a)] + c^3*(-3 + p)*Hypergeometric2F1[ 
-p, -p, 1 - p, -((b*x^n)/a)]))))/(n*(-3 + p)*(-2 + p)*(-1 + p)*p*x^(n*p)*( 
1 + (b*x^n)/a)^p))
 

Rubi [A] (verified)

Time = 0.88 (sec) , antiderivative size = 264, normalized size of antiderivative = 1.06, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {1008, 1066, 959, 882, 74}

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

\(\Big \downarrow \) 1008

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

\(\Big \downarrow \) 1066

\(\displaystyle \frac {\frac {\int x^{-n p-1} \left (b x^n+a\right )^p \left (d n^2 \left (11 b^2 c^2-a b d (7-8 p) c+a^2 d^2 \left (p^2-3 p+2\right )\right ) x^n+c n^2 \left (6 b^2 c^2+7 a b d p c-a^2 d^2 (2-p) p\right )\right )dx}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) (5 b c-a d (2-p)) \left (a+b x^n\right )^{p+1}}{2 b}}{3 b n}+\frac {d x^{-n p} \left (c+d x^n\right )^2 \left (a+b x^n\right )^{p+1}}{3 b n}\)

\(\Big \downarrow \) 959

\(\displaystyle \frac {\frac {\frac {n^2 \left (a^3 d^3 p \left (p^2-3 p+2\right )-9 a^2 b c d^2 (1-p) p+18 a b^2 c^2 d p+6 b^3 c^3\right ) \int x^{-n p-1} \left (b x^n+a\right )^pdx}{b}+\frac {d n x^{-n p} \left (a^2 d^2 \left (p^2-3 p+2\right )-a b c d (7-8 p)+11 b^2 c^2\right ) \left (a+b x^n\right )^{p+1}}{b}}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) (5 b c-a d (2-p)) \left (a+b x^n\right )^{p+1}}{2 b}}{3 b n}+\frac {d x^{-n p} \left (c+d x^n\right )^2 \left (a+b x^n\right )^{p+1}}{3 b n}\)

\(\Big \downarrow \) 882

\(\displaystyle \frac {\frac {\frac {n x^{-n p} \left (a^3 d^3 p \left (p^2-3 p+2\right )-9 a^2 b c d^2 (1-p) p+18 a b^2 c^2 d p+6 b^3 c^3\right ) \left (\frac {x^n}{a+b x^n}\right )^p \left (a+b x^n\right )^p \int \frac {\left (\frac {x^n}{b x^n+a}\right )^{-p-1}}{1-\frac {b x^n}{b x^n+a}}d\frac {x^n}{b x^n+a}}{b}+\frac {d n x^{-n p} \left (a^2 d^2 \left (p^2-3 p+2\right )-a b c d (7-8 p)+11 b^2 c^2\right ) \left (a+b x^n\right )^{p+1}}{b}}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) (5 b c-a d (2-p)) \left (a+b x^n\right )^{p+1}}{2 b}}{3 b n}+\frac {d x^{-n p} \left (c+d x^n\right )^2 \left (a+b x^n\right )^{p+1}}{3 b n}\)

\(\Big \downarrow \) 74

\(\displaystyle \frac {\frac {\frac {d n x^{-n p} \left (a^2 d^2 \left (p^2-3 p+2\right )-a b c d (7-8 p)+11 b^2 c^2\right ) \left (a+b x^n\right )^{p+1}}{b}-\frac {n x^{-n p} \left (a^3 d^3 p \left (p^2-3 p+2\right )-9 a^2 b c d^2 (1-p) p+18 a b^2 c^2 d p+6 b^3 c^3\right ) \left (a+b x^n\right )^p \operatorname {Hypergeometric2F1}\left (1,-p,1-p,\frac {b x^n}{b x^n+a}\right )}{b p}}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) (5 b c-a d (2-p)) \left (a+b x^n\right )^{p+1}}{2 b}}{3 b n}+\frac {d x^{-n p} \left (c+d x^n\right )^2 \left (a+b x^n\right )^{p+1}}{3 b n}\)

Input:

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

Output:

(d*(a + b*x^n)^(1 + p)*(c + d*x^n)^2)/(3*b*n*x^(n*p)) + ((d*(5*b*c - a*d*( 
2 - p))*(a + b*x^n)^(1 + p)*(c + d*x^n))/(2*b*x^(n*p)) + ((d*n*(11*b^2*c^2 
 - a*b*c*d*(7 - 8*p) + a^2*d^2*(2 - 3*p + p^2))*(a + b*x^n)^(1 + p))/(b*x^ 
(n*p)) - (n*(6*b^3*c^3 + 18*a*b^2*c^2*d*p - 9*a^2*b*c*d^2*(1 - p)*p + a^3* 
d^3*p*(2 - 3*p + p^2))*(a + b*x^n)^p*Hypergeometric2F1[1, -p, 1 - p, (b*x^ 
n)/(a + b*x^n)])/(b*p*x^(n*p)))/(2*b*n))/(3*b*n)
 

Defintions of rubi rules used

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

rule 882
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^Simplify[ 
(m + 1)/n + p]*x^m*(a + b*x^n)^p*((x^n/(a + b*x^n))^p/(n*x^Simplify[m + n*p 
]))   Subst[Int[x^((m + 1)/n - 1)/(1 - b*x)^(Simplify[(m + 1)/n + p] + 1), 
x], x, x^n/(a + b*x^n)], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simpli 
fy[(m + 1)/n + p]]
 

rule 959
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n 
_)), x_Symbol] :> Simp[d*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p 
+ 1) + 1))), x] - Simp[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m + n*(p 
 + 1) + 1))   Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, 
 n, p}, x] && NeQ[b*c - a*d, 0] && NeQ[m + n*(p + 1) + 1, 0]
 

rule 1008
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ 
))^(q_), x_Symbol] :> Simp[d*(e*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n) 
^(q - 1)/(b*e*(m + n*(p + q) + 1))), x] + Simp[1/(b*(m + n*(p + q) + 1)) 
Int[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^(q - 2)*Simp[c*((c*b - a*d)*(m + 1) + 
 c*b*n*(p + q)) + (d*(c*b - a*d)*(m + 1) + d*n*(q - 1)*(b*c - a*d) + c*b*d* 
n*(p + q))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c 
 - a*d, 0] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]
 

rule 1066
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n 
_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[f*(g*x)^(m + 1)*(a + 
b*x^n)^(p + 1)*((c + d*x^n)^q/(b*g*(m + n*(p + q + 1) + 1))), x] + Simp[1/( 
b*(m + n*(p + q + 1) + 1))   Int[(g*x)^m*(a + b*x^n)^p*(c + d*x^n)^(q - 1)* 
Simp[c*((b*e - a*f)*(m + 1) + b*e*n*(p + q + 1)) + (d*(b*e - a*f)*(m + 1) + 
 f*n*q*(b*c - a*d) + b*e*d*n*(p + q + 1))*x^n, x], x], x] /; FreeQ[{a, b, c 
, d, e, f, g, m, n, p}, x] && GtQ[q, 0] &&  !(EqQ[q, 1] && SimplerQ[e + f*x 
^n, c + d*x^n])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F(-2)]

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

integrate(x^(-n*p-1)*(a+b*x^n)^p*(c+d*x^n)^3,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,[2,0,6,4,2,4,4,3,0]%%%}+%%%{4,[2,0,6,4,2,4,3,3,0]%%%}+%% 
%{6,[2,0,
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(2*x**(3*n)*(x**n*b + a)**p*b**2*d**3*p + x**(2*n)*(x**n*b + a)**p*a*b*d** 
3*p**2 + 9*x**(2*n)*(x**n*b + a)**p*b**2*c*d**2*p + x**n*(x**n*b + a)**p*a 
**2*d**3*p**3 - 2*x**n*(x**n*b + a)**p*a**2*d**3*p**2 + 9*x**n*(x**n*b + a 
)**p*a*b*c*d**2*p**2 + 18*x**n*(x**n*b + a)**p*b**2*c**2*d*p - 6*(x**n*b + 
 a)**p*b**2*c**3 + x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + 
 x**(n*p)*a*x),x)*a**3*d**3*n*p**4 - 3*x**(n*p)*int((x**n*(x**n*b + a)**p) 
/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*a**3*d**3*n*p**3 + 2*x**(n*p)*int((x 
**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*a**3*d**3*n*p**2 
 + 9*x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x) 
,x)*a**2*b*c*d**2*n*p**3 - 9*x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p 
+ n)*b*x + x**(n*p)*a*x),x)*a**2*b*c*d**2*n*p**2 + 18*x**(n*p)*int((x**n*( 
x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*a*b**2*c**2*d*n*p**2 
+ 6*x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x), 
x)*b**3*c**3*n*p)/(6*x**(n*p)*b**2*n*p)