\(\int (f x)^m (d+e x^n)^2 (a+b x^n+c x^{2 n})^p \, dx\) [184]

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

Optimal result

Integrand size = 31, antiderivative size = 504 \[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\frac {d^2 (f x)^{1+m} \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (\frac {1+m}{n},-p,-p,\frac {1+m+n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{f (1+m)}+\frac {2 d e x^n (f x)^{1+m} \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (\frac {1+m+n}{n},-p,-p,\frac {1+m+2 n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{f (1+m+n)}+\frac {e^2 x^{2 n} (f x)^{1+m} \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (\frac {1+m+2 n}{n},-p,-p,\frac {1+m+3 n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{f (1+m+2 n)} \] Output:

d^2*(f*x)^(1+m)*(a+b*x^n+c*x^(2*n))^p*AppellF1((1+m)/n,-p,-p,(1+m+n)/n,-2* 
c*x^n/(b-(-4*a*c+b^2)^(1/2)),-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/f/(1+m)/((1+ 
2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))^p)/((1+2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))^p)+ 
2*d*e*x^n*(f*x)^(1+m)*(a+b*x^n+c*x^(2*n))^p*AppellF1((1+m+n)/n,-p,-p,(1+m+ 
2*n)/n,-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)),-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/f/ 
(1+m+n)/((1+2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))^p)/((1+2*c*x^n/(b+(-4*a*c+b^2) 
^(1/2)))^p)+e^2*x^(2*n)*(f*x)^(1+m)*(a+b*x^n+c*x^(2*n))^p*AppellF1((1+m+2* 
n)/n,-p,-p,(1+m+3*n)/n,-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)),-2*c*x^n/(b+(-4*a*c 
+b^2)^(1/2)))/f/(1+m+2*n)/((1+2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))^p)/((1+2*c*x 
^n/(b+(-4*a*c+b^2)^(1/2)))^p)
 

Mathematica [A] (warning: unable to verify)

Time = 1.94 (sec) , antiderivative size = 391, normalized size of antiderivative = 0.78 \[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\frac {x (f x)^m \left (\frac {b-\sqrt {b^2-4 a c}+2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+x^n \left (b+c x^n\right )\right )^p \left (d^2 \left (1+m^2+3 n+2 n^2+m (2+3 n)\right ) \operatorname {AppellF1}\left (\frac {1+m}{n},-p,-p,\frac {1+m+n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )+e (1+m) x^n \left (2 d (1+m+2 n) \operatorname {AppellF1}\left (\frac {1+m+n}{n},-p,-p,\frac {1+m+2 n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )+e (1+m+n) x^n \operatorname {AppellF1}\left (\frac {1+m+2 n}{n},-p,-p,\frac {1+m+3 n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )\right )\right )}{(1+m) (1+m+n) (1+m+2 n)} \] Input:

Integrate[(f*x)^m*(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]
 

Output:

(x*(f*x)^m*(a + x^n*(b + c*x^n))^p*(d^2*(1 + m^2 + 3*n + 2*n^2 + m*(2 + 3* 
n))*AppellF1[(1 + m)/n, -p, -p, (1 + m + n)/n, (-2*c*x^n)/(b + Sqrt[b^2 - 
4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] + e*(1 + m)*x^n*(2*d*(1 + m + 
 2*n)*AppellF1[(1 + m + n)/n, -p, -p, (1 + m + 2*n)/n, (-2*c*x^n)/(b + Sqr 
t[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] + e*(1 + m + n)*x^n*A 
ppellF1[(1 + m + 2*n)/n, -p, -p, (1 + m + 3*n)/n, (-2*c*x^n)/(b + Sqrt[b^2 
 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])))/((1 + m)*(1 + m + n)*(1 
 + m + 2*n)*((b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p* 
((b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]))^p)
 

Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 498, normalized size of antiderivative = 0.99, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1884, 2009}

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

\(\Big \downarrow \) 1884

\(\displaystyle \int \left (d^2 (f x)^m \left (a+b x^n+c x^{2 n}\right )^p+2 d e x^n (f x)^m \left (a+b x^n+c x^{2 n}\right )^p+e^2 x^{2 n} (f x)^m \left (a+b x^n+c x^{2 n}\right )^p\right )dx\)

\(\Big \downarrow \) 2009

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

Input:

Int[(f*x)^m*(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]
 

Output:

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

Defintions of rubi rules used

rule 1884
Int[((f_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.)*( 
(d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*(d 
+ e*x^n)^q*(a + b*x^n + c*x^(2*n))^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p, q}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] &&  !RationalQ[n] && ( 
IGtQ[p, 0] || IGtQ[q, 0])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [F]

\[\int \left (f x \right )^{m} \left (d +e \,x^{n}\right )^{2} \left (a +b \,x^{n}+c \,x^{2 n}\right )^{p}d x\]

Input:

int((f*x)^m*(d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 

Output:

int((f*x)^m*(d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 

Fricas [F]

\[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int { {\left (e x^{n} + d\right )}^{2} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \left (f x\right )^{m} \,d x } \] Input:

integrate((f*x)^m*(d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x, algorithm="fricas")
 

Output:

integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)*(c*x^(2*n) + b*x^n + a)^p*(f*x)^m 
, x)
 

Sympy [F(-1)]

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

integrate((f*x)**m*(d+e*x**n)**2*(a+b*x**n+c*x**(2*n))**p,x)
 

Output:

Timed out
 

Maxima [F]

\[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int { {\left (e x^{n} + d\right )}^{2} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \left (f x\right )^{m} \,d x } \] Input:

integrate((f*x)^m*(d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x, algorithm="maxima")
 

Output:

integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p*(f*x)^m, x)
 

Giac [F(-2)]

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

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

Mupad [F(-1)]

Timed out. \[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int {\left (f\,x\right )}^m\,{\left (d+e\,x^n\right )}^2\,{\left (a+b\,x^n+c\,x^{2\,n}\right )}^p \,d x \] Input:

int((f*x)^m*(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x)
 

Output:

int((f*x)^m*(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p, x)
 

Reduce [F]

\[ \int (f x)^m \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\text {too large to display} \] Input:

int((f*x)^m*(d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 

Output:

(f**m*(x**(m + 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*m**2*x + 3*x**(m 
 + 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*m*n*p*x + x**(m + 2*n)*(x**( 
2*n)*c + x**n*b + a)**p*b*c*e**2*m*n*x + 2*x**(m + 2*n)*(x**(2*n)*c + x**n 
*b + a)**p*b*c*e**2*m*x + 2*x**(m + 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c* 
e**2*n**2*p**2*x + x**(m + 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*n**2 
*p*x + 3*x**(m + 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*n*p*x + x**(m 
+ 2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*n*x + x**(m + 2*n)*(x**(2*n)* 
c + x**n*b + a)**p*b*c*e**2*x + x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b* 
*2*e**2*m*n*p*x + x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b**2*e**2*n**2*p 
**2*x + x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b**2*e**2*n*p*x + 2*x**(m 
+ n)*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*m**2*x + 6*x**(m + n)*(x**(2*n)* 
c + x**n*b + a)**p*b*c*d*e*m*n*p*x + 4*x**(m + n)*(x**(2*n)*c + x**n*b + a 
)**p*b*c*d*e*m*n*x + 4*x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*m*x 
 + 4*x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*n**2*p**2*x + 4*x**(m 
 + n)*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*n**2*p*x + 6*x**(m + n)*(x**(2* 
n)*c + x**n*b + a)**p*b*c*d*e*n*p*x + 4*x**(m + n)*(x**(2*n)*c + x**n*b + 
a)**p*b*c*d*e*n*x + 2*x**(m + n)*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*x - 
x**m*(x**(2*n)*c + x**n*b + a)**p*a*b*e**2*m*n*p*x - x**m*(x**(2*n)*c + x* 
*n*b + a)**p*a*b*e**2*n**2*p*x - x**m*(x**(2*n)*c + x**n*b + a)**p*a*b*e** 
2*n*p*x + 4*x**m*(x**(2*n)*c + x**n*b + a)**p*a*c*d*e*m*n*p*x + 8*x**m*...