Integrand size = 27, antiderivative size = 171 \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=-\frac {c^2 x^{-n p} \left (a+b x^n\right )^{1+p}}{a n p}+\frac {d^2 x^{n-n p} \left (a+b x^n\right )^{1+p}}{2 b n}+\frac {\left (2 b^2 c^2+4 a b c d p-a^2 d^2 (1-p) p\right ) x^{n-n 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 )}{2 a b n (1-p) p} \] Output:
-c^2*(a+b*x^n)^(p+1)/a/n/p/(x^(n*p))+1/2*d^2*x^(-n*p+n)*(a+b*x^n)^(p+1)/b/ n+1/2*(2*b^2*c^2+4*a*b*c*d*p-a^2*d^2*(1-p)*p)*x^(-n*p+n)*(a+b*x^n)^p*hyper geom([-p, 1-p],[-p+2],-b*x^n/a)/a/b/n/(1-p)/p/((1+b*x^n/a)^p)
Time = 5.18 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.87 \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=-\frac {x^{-n p} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (2 c d (-2+p) p x^n \operatorname {Hypergeometric2F1}\left (1-p,-p,2-p,-\frac {b x^n}{a}\right )+(-1+p) \left (d^2 p x^{2 n} \operatorname {Hypergeometric2F1}\left (2-p,-p,3-p,-\frac {b x^n}{a}\right )+c^2 (-2+p) \operatorname {Hypergeometric2F1}\left (-p,-p,1-p,-\frac {b x^n}{a}\right )\right )\right )}{n (-2+p) (-1+p) p} \] Input:
Integrate[x^(-1 - n*p)*(a + b*x^n)^p*(c + d*x^n)^2,x]
Output:
-(((a + b*x^n)^p*(2*c*d*(-2 + p)*p*x^n*Hypergeometric2F1[1 - p, -p, 2 - p, -((b*x^n)/a)] + (-1 + p)*(d^2*p*x^(2*n)*Hypergeometric2F1[2 - p, -p, 3 - p, -((b*x^n)/a)] + c^2*(-2 + p)*Hypergeometric2F1[-p, -p, 1 - p, -((b*x^n) /a)])))/(n*(-2 + p)*(-1 + p)*p*x^(n*p)*(1 + (b*x^n)/a)^p))
Time = 0.61 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.94, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1008, 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 )^2 \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 n (3 b c-a d (1-p)) x^n+c n (2 b c+a d p)\right )dx}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{2 b n}\) |
\(\Big \downarrow \) 959 |
\(\displaystyle \frac {\frac {n \left (-a^2 d^2 (1-p) p+4 a b c d p+2 b^2 c^2\right ) \int x^{-n p-1} \left (b x^n+a\right )^pdx}{b}+\frac {d x^{-n p} (3 b c-a d (1-p)) \left (a+b x^n\right )^{p+1}}{b}}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{2 b n}\) |
\(\Big \downarrow \) 882 |
\(\displaystyle \frac {\frac {x^{-n p} \left (-a^2 d^2 (1-p) p+4 a b c d p+2 b^2 c^2\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 x^{-n p} (3 b c-a d (1-p)) \left (a+b x^n\right )^{p+1}}{b}}{2 b n}+\frac {d x^{-n p} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{2 b n}\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \frac {\frac {d x^{-n p} (3 b c-a d (1-p)) \left (a+b x^n\right )^{p+1}}{b}-\frac {x^{-n p} \left (-a^2 d^2 (1-p) p+4 a b c d p+2 b^2 c^2\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 ) \left (a+b x^n\right )^{p+1}}{2 b n}\) |
Input:
Int[x^(-1 - n*p)*(a + b*x^n)^p*(c + d*x^n)^2,x]
Output:
(d*(a + b*x^n)^(1 + p)*(c + d*x^n))/(2*b*n*x^(n*p)) + ((d*(3*b*c - a*d*(1 - p))*(a + b*x^n)^(1 + p))/(b*x^(n*p)) - ((2*b^2*c^2 + 4*a*b*c*d*p - a^2*d ^2*(1 - p)*p)*(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)
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])))
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]]
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]
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]
\[\int x^{-n p -1} \left (a +b \,x^{n}\right )^{p} \left (c +d \,x^{n}\right )^{2}d x\]
Input:
int(x^(-n*p-1)*(a+b*x^n)^p*(c+d*x^n)^2,x)
Output:
int(x^(-n*p-1)*(a+b*x^n)^p*(c+d*x^n)^2,x)
\[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\int { {\left (d x^{n} + c\right )}^{2} {\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)^2,x, algorithm="fricas")
Output:
integral((d^2*x^(-n*p - 1)*x^(2*n) + 2*c*d*x^(-n*p - 1)*x^n + c^2*x^(-n*p - 1))*(b*x^n + a)^p, x)
Timed out. \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\text {Timed out} \] Input:
integrate(x**(-n*p-1)*(a+b*x**n)**p*(c+d*x**n)**2,x)
Output:
Timed out
\[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\int { {\left (d x^{n} + c\right )}^{2} {\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)^2,x, algorithm="maxima")
Output:
integrate((d*x^n + c)^2*(b*x^n + a)^p*x^(-n*p - 1), x)
Exception generated. \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\text {Exception raised: TypeError} \] Input:
integrate(x^(-n*p-1)*(a+b*x^n)^p*(c+d*x^n)^2,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,[1,0,4,3,1,3,3,2,0]%%%}+%%%{-3,[1,0,4,3,1,3,2,2,0]%%%}+ %%%{-3,[1
Timed out. \[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\int \frac {{\left (a+b\,x^n\right )}^p\,{\left (c+d\,x^n\right )}^2}{x^{n\,p+1}} \,d x \] Input:
int(((a + b*x^n)^p*(c + d*x^n)^2)/x^(n*p + 1),x)
Output:
int(((a + b*x^n)^p*(c + d*x^n)^2)/x^(n*p + 1), x)
\[ \int x^{-1-n p} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, 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}+4 x^{n} \left (x^{n} b +a \right )^{p} b c d p -2 \left (x^{n} b +a \right )^{p} b \,c^{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^{2} d^{2} n \,p^{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^{2} d^{2} n \,p^{2}+4 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 c d n \,p^{2}+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 ) b^{2} c^{2} n p}{2 x^{n p} b n p} \] Input:
int(x^(-n*p-1)*(a+b*x^n)^p*(c+d*x^n)^2,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 + 4* x**n*(x**n*b + a)**p*b*c*d*p - 2*(x**n*b + a)**p*b*c**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**2*d**2*n*p**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**2*d**2*n*p**2 + 4*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*c*d*n*p**2 + 2*x**(n*p)*int((x**n*(x**n*b + a)**p )/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*b**2*c**2*n*p)/(2*x**(n*p)*b*n*p)