Integrand size = 29, antiderivative size = 188 \[ \int x^{-1-n (-2+p)} \left (a+b x^n\right )^p \left (c+d x^n\right )^2 \, dx=\frac {c^2 x^{n (2-p)} \left (a+b x^n\right )^{1+p}}{a n (2-p)}+\frac {d^2 x^{n (3-p)} \left (a+b x^n\right )^{1+p}}{4 b n}-\frac {\left (12 b^2 c^2-8 a b c d (2-p)+a^2 d^2 \left (6-5 p+p^2\right )\right ) x^{n (3-p)} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (3-p,-p,4-p,-\frac {b x^n}{a}\right )}{4 a b n (2-p) (3-p)} \] Output:
c^2*x^(n*(-p+2))*(a+b*x^n)^(p+1)/a/n/(-p+2)+1/4*d^2*x^(n*(3-p))*(a+b*x^n)^ (p+1)/b/n-1/4*(12*b^2*c^2-8*a*b*c*d*(-p+2)+a^2*d^2*(p^2-5*p+6))*x^(n*(3-p) )*(a+b*x^n)^p*hypergeom([-p, 3-p],[4-p],-b*x^n/a)/a/b/n/(-p+2)/(3-p)/((1+b *x^n/a)^p)
Time = 5.22 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.83 \[ \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 (c^2 \left (12-7 p+p^2\right ) \operatorname {Hypergeometric2F1}\left (2-p,-p,3-p,-\frac {b x^n}{a}\right )+d (-2+p) x^n \left (2 c (-4+p) \operatorname {Hypergeometric2F1}\left (3-p,-p,4-p,-\frac {b x^n}{a}\right )+d (-3+p) x^n \operatorname {Hypergeometric2F1}\left (4-p,-p,5-p,-\frac {b x^n}{a}\right )\right )\right )}{n (-4+p) (-3+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*(c^2*(12 - 7*p + p^2)*Hypergeometric2F1[2 - p, -p, 3 - p, -((b*x^n)/a)] + d*(-2 + p)*x^n*(2*c*(-4 + p)*Hypergeometric2F1[3 - p, -p, 4 - p, -((b*x^n)/a)] + d*(-3 + p)*x^n*Hypergeometric2F1[4 - p, -p, 5 - p, -((b*x^n)/a)])))/(n*(-4 + p)*(-3 + p)*(-2 + p)*x^(n*(-2 + p))*(1 + (b*x^n )/a)^p))
Time = 0.63 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.02, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, 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-2)-1} \left (c+d x^n\right )^2 \left (a+b x^n\right )^p \, dx\) |
\(\Big \downarrow \) 1008 |
\(\displaystyle \frac {\int x^{n (2-p)-1} \left (b x^n+a\right )^p \left (d n (5 b c-a d (3-p)) x^n+c n (4 b c-a d (2-p))\right )dx}{4 b n}+\frac {d x^{n (2-p)} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{4 b n}\) |
\(\Big \downarrow \) 959 |
\(\displaystyle \frac {\frac {n \left (a^2 d^2 \left (p^2-5 p+6\right )-8 a b c d (2-p)+12 b^2 c^2\right ) \int x^{n (2-p)-1} \left (b x^n+a\right )^pdx}{3 b}+\frac {d x^{n (2-p)} (5 b c-a d (3-p)) \left (a+b x^n\right )^{p+1}}{3 b}}{4 b n}+\frac {d x^{n (2-p)} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{4 b n}\) |
\(\Big \downarrow \) 882 |
\(\displaystyle \frac {\frac {a^2 x^{-n p} \left (a^2 d^2 \left (p^2-5 p+6\right )-8 a b c d (2-p)+12 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 )^{1-p}}{\left (1-\frac {b x^n}{b x^n+a}\right )^3}d\frac {x^n}{b x^n+a}}{3 b}+\frac {d x^{n (2-p)} (5 b c-a d (3-p)) \left (a+b x^n\right )^{p+1}}{3 b}}{4 b n}+\frac {d x^{n (2-p)} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{4 b n}\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \frac {\frac {a^2 x^{2 n-n p} \left (a^2 d^2 \left (p^2-5 p+6\right )-8 a b c d (2-p)+12 b^2 c^2\right ) \left (a+b x^n\right )^{p-2} \operatorname {Hypergeometric2F1}\left (3,2-p,3-p,\frac {b x^n}{b x^n+a}\right )}{3 b (2-p)}+\frac {d x^{n (2-p)} (5 b c-a d (3-p)) \left (a+b x^n\right )^{p+1}}{3 b}}{4 b n}+\frac {d x^{n (2-p)} \left (c+d x^n\right ) \left (a+b x^n\right )^{p+1}}{4 b n}\) |
Input:
Int[x^(-1 - n*(-2 + p))*(a + b*x^n)^p*(c + d*x^n)^2,x]
Output:
(d*x^(n*(2 - p))*(a + b*x^n)^(1 + p)*(c + d*x^n))/(4*b*n) + ((d*(5*b*c - a *d*(3 - p))*x^(n*(2 - p))*(a + b*x^n)^(1 + p))/(3*b) + (a^2*(12*b^2*c^2 - 8*a*b*c*d*(2 - p) + a^2*d^2*(6 - 5*p + p^2))*x^(2*n - n*p)*(a + b*x^n)^(-2 + p)*Hypergeometric2F1[3, 2 - p, 3 - p, (b*x^n)/(a + b*x^n)])/(3*b*(2 - p )))/(4*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^{-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 {6 x^{4 n} \left (x^{n} b +a \right )^{p} b^{3} d^{2}+2 x^{3 n} \left (x^{n} b +a \right )^{p} a \,b^{2} d^{2} p +16 x^{3 n} \left (x^{n} b +a \right )^{p} b^{3} c d +x^{2 n} \left (x^{n} b +a \right )^{p} a^{2} b \,d^{2} p^{2}-3 x^{2 n} \left (x^{n} b +a \right )^{p} a^{2} b \,d^{2} p +8 x^{2 n} \left (x^{n} b +a \right )^{p} a \,b^{2} c d p +12 x^{2 n} \left (x^{n} b +a \right )^{p} b^{3} c^{2}+x^{n} \left (x^{n} b +a \right )^{p} a^{3} d^{2} p^{3}-5 x^{n} \left (x^{n} b +a \right )^{p} a^{3} d^{2} p^{2}+6 x^{n} \left (x^{n} b +a \right )^{p} a^{3} d^{2} p +8 x^{n} \left (x^{n} b +a \right )^{p} a^{2} b c d \,p^{2}-16 x^{n} \left (x^{n} b +a \right )^{p} a^{2} b c d p +12 x^{n} \left (x^{n} b +a \right )^{p} a \,b^{2} c^{2} p +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^{4} d^{2} n \,p^{4}-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 ) a^{4} d^{2} n \,p^{3}+11 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^{4} d^{2} 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 ) a^{4} d^{2} n p +8 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} b c d n \,p^{3}-24 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} b c d n \,p^{2}+16 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} b c d n p +12 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^{2} c^{2} n \,p^{2}-12 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^{2} c^{2} n p}{24 x^{n p} b^{3} n} \] Input:
int(x^(-1-n*(-2+p))*(a+b*x^n)^p*(c+d*x^n)^2,x)
Output:
(6*x**(4*n)*(x**n*b + a)**p*b**3*d**2 + 2*x**(3*n)*(x**n*b + a)**p*a*b**2* d**2*p + 16*x**(3*n)*(x**n*b + a)**p*b**3*c*d + x**(2*n)*(x**n*b + a)**p*a **2*b*d**2*p**2 - 3*x**(2*n)*(x**n*b + a)**p*a**2*b*d**2*p + 8*x**(2*n)*(x **n*b + a)**p*a*b**2*c*d*p + 12*x**(2*n)*(x**n*b + a)**p*b**3*c**2 + x**n* (x**n*b + a)**p*a**3*d**2*p**3 - 5*x**n*(x**n*b + a)**p*a**3*d**2*p**2 + 6 *x**n*(x**n*b + a)**p*a**3*d**2*p + 8*x**n*(x**n*b + a)**p*a**2*b*c*d*p**2 - 16*x**n*(x**n*b + a)**p*a**2*b*c*d*p + 12*x**n*(x**n*b + a)**p*a*b**2*c **2*p + x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a *x),x)*a**4*d**2*n*p**4 - 6*x**(n*p)*int((x**n*(x**n*b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*a**4*d**2*n*p**3 + 11*x**(n*p)*int((x**n*(x**n* b + a)**p)/(x**(n*p + n)*b*x + x**(n*p)*a*x),x)*a**4*d**2*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)*a**4*d **2*n*p + 8*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*b*c*d*n*p**3 - 24*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*b*c*d*n*p**2 + 16*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*b*c*d*n*p + 12 *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**2*c**2*n*p**2 - 12*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**2*c**2*n*p)/(24*x**(n*p)*b**3*n)