Integrand size = 29, antiderivative size = 145 \[ \int x^{-1-n (2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\frac {c (b c-2 a d (2+p)) x^{-n (1+p)} \left (a+b x^n\right )^{1+p}}{a^2 n (1+p) (2+p)}-\frac {c^2 x^{-n (2+p)} \left (a+b x^n\right )^{1+p}}{a n (2+p)}-\frac {d^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 )}{n p} \] Output:
c*(b*c-2*a*d*(2+p))*(a+b*x^n)^(p+1)/a^2/n/(p+1)/(2+p)/(x^(n*(p+1)))-c^2*(a +b*x^n)^(p+1)/a/n/(2+p)/(x^(n*(2+p)))-d^2*(a+b*x^n)^p*hypergeom([-p, -p],[ 1-p],-b*x^n/a)/n/p/(x^(n*p))/((1+b*x^n/a)^p)
Time = 5.22 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.01 \[ \int x^{-1-n (2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=-\frac {x^{-n (2+p)} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (a c^2 p (1+p) \operatorname {Hypergeometric2F1}\left (-2-p,-p,-1-p,-\frac {b x^n}{a}\right )+d (2+p) x^n \left (2 c p \left (a+b x^n\right ) \left (1+\frac {b x^n}{a}\right )^p+a d (1+p) x^n \operatorname {Hypergeometric2F1}\left (-p,-p,1-p,-\frac {b x^n}{a}\right )\right )\right )}{a n p (1+p) (2+p)} \] Input:
Integrate[x^(-1 - n*(2 + p))*(a + b*x^n)^p*(c + d*x^n)^2,x]
Output:
-(((a + b*x^n)^p*(a*c^2*p*(1 + p)*Hypergeometric2F1[-2 - p, -p, -1 - p, -( (b*x^n)/a)] + d*(2 + p)*x^n*(2*c*p*(a + b*x^n)*(1 + (b*x^n)/a)^p + a*d*(1 + p)*x^n*Hypergeometric2F1[-p, -p, 1 - p, -((b*x^n)/a)])))/(a*n*p*(1 + p)* (2 + p)*x^(n*(2 + p))*(1 + (b*x^n)/a)^p))
Time = 0.27 (sec) , antiderivative size = 1, normalized size of antiderivative = 0.01, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {1008}
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+2)-1} \left (c+d x^n\right )^2 \left (a+b x^n\right )^p \, dx\) |
\(\Big \downarrow \) 1008 |
\(\displaystyle \text {Indeterminate}\) |
Input:
Int[x^(-1 - n*(2 + p))*(a + b*x^n)^p*(c + d*x^n)^2,x]
Output:
Indeterminate
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^{-1-n \left (2+p \right )} \left (a +b \,x^{n}\right )^{p} \left (c +d \,x^{n}\right )^{2}d x\]
Input:
int(x^(-1-n*(2+p))*(a+b*x^n)^p*(c+d*x^n)^2,x)
Output:
int(x^(-1-n*(2+p))*(a+b*x^n)^p*(c+d*x^n)^2,x)
\[ \int x^{-1-n (2+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 {\left (p + 2\right )} - 1} \,d x } \] Input:
integrate(x^(-1-n*(2+p))*(a+b*x^n)^p*(c+d*x^n)^2,x, algorithm="fricas")
Output:
integral((d^2*x^(-n*p - 2*n - 1)*x^(2*n) + 2*c*d*x^(-n*p - 2*n - 1)*x^n + c^2*x^(-n*p - 2*n - 1))*(b*x^n + a)^p, x)
Timed out. \[ \int x^{-1-n (2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\text {Timed out} \] Input:
integrate(x**(-1-n*(2+p))*(a+b*x**n)**p*(c+d*x**n)**2,x)
Output:
Timed out
\[ \int x^{-1-n (2+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 {\left (p + 2\right )} - 1} \,d x } \] Input:
integrate(x^(-1-n*(2+p))*(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 + 2) - 1), x)
Exception generated. \[ \int x^{-1-n (2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\text {Exception raised: TypeError} \] Input:
integrate(x^(-1-n*(2+p))*(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 (2+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\,\left (p+2\right )+1}} \,d x \] Input:
int(((a + b*x^n)^p*(c + d*x^n)^2)/x^(n*(p + 2) + 1),x)
Output:
int(((a + b*x^n)^p*(c + d*x^n)^2)/x^(n*(p + 2) + 1), x)
\[ \int x^{-1-n (2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\frac {-2 x^{2 n} \left (x^{n} b +a \right )^{p} a b c d p -4 x^{2 n} \left (x^{n} b +a \right )^{p} a b c d +x^{2 n} \left (x^{n} b +a \right )^{p} b^{2} c^{2}-2 x^{n} \left (x^{n} b +a \right )^{p} a^{2} c d p -4 x^{n} \left (x^{n} b +a \right )^{p} a^{2} c d -x^{n} \left (x^{n} b +a \right )^{p} a b \,c^{2} p -\left (x^{n} b +a \right )^{p} a^{2} c^{2} p -\left (x^{n} b +a \right )^{p} a^{2} c^{2}+x^{n p +2 n} \left (\int \frac {\left (x^{n} b +a \right )^{p}}{x^{n p} x}d x \right ) a^{2} d^{2} n \,p^{2}+3 x^{n p +2 n} \left (\int \frac {\left (x^{n} b +a \right )^{p}}{x^{n p} x}d x \right ) a^{2} d^{2} n p +2 x^{n p +2 n} \left (\int \frac {\left (x^{n} b +a \right )^{p}}{x^{n p} x}d x \right ) a^{2} d^{2} n}{x^{n p +2 n} a^{2} n \left (p^{2}+3 p +2\right )} \] Input:
int(x^(-1-n*(2+p))*(a+b*x^n)^p*(c+d*x^n)^2,x)
Output:
( - 2*x**(2*n)*(x**n*b + a)**p*a*b*c*d*p - 4*x**(2*n)*(x**n*b + a)**p*a*b* c*d + x**(2*n)*(x**n*b + a)**p*b**2*c**2 - 2*x**n*(x**n*b + a)**p*a**2*c*d *p - 4*x**n*(x**n*b + a)**p*a**2*c*d - x**n*(x**n*b + a)**p*a*b*c**2*p - ( x**n*b + a)**p*a**2*c**2*p - (x**n*b + a)**p*a**2*c**2 + x**(n*p + 2*n)*in t((x**n*b + a)**p/(x**(n*p)*x),x)*a**2*d**2*n*p**2 + 3*x**(n*p + 2*n)*int( (x**n*b + a)**p/(x**(n*p)*x),x)*a**2*d**2*n*p + 2*x**(n*p + 2*n)*int((x**n *b + a)**p/(x**(n*p)*x),x)*a**2*d**2*n)/(x**(n*p + 2*n)*a**2*n*(p**2 + 3*p + 2))