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

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

Optimal result

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

e^2*x*(a+b*x^n+c*x^(2*n))^(p+1)/c/(2*n*p+2*n+1)-e*(b*e*(n*p+n+1)-2*c*d*(1+ 
2*n*(p+1)))*x^(1+n)*(a+b*x^n+c*x^(2*n))^p*AppellF1(1+1/n,-p,-p,2+1/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)))/c/(1+n)/(1+2*n 
*(p+1))/((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)-(a*e^2-c*d^2*(1+2*n*(p+1)))*x*(a+b*x^n+c*x^(2*n))^p*AppellF1(1 
/n,-p,-p,1+1/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)))/c/(1+2*n*(p+1))/((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 = 0.95 (sec) , antiderivative size = 338, normalized size of antiderivative = 0.86 \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\frac {x \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 (2 d e (1+2 n) x^n \operatorname {AppellF1}\left (1+\frac {1}{n},-p,-p,2+\frac {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 )+(1+n) \left (e^2 x^{2 n} \operatorname {AppellF1}\left (2+\frac {1}{n},-p,-p,3+\frac {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 )+d^2 (1+2 n) \operatorname {AppellF1}\left (\frac {1}{n},-p,-p,1+\frac {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 )\right )\right )}{(1+n) (1+2 n)} \] Input:

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

Output:

(x*(a + x^n*(b + c*x^n))^p*(2*d*e*(1 + 2*n)*x^n*AppellF1[1 + n^(-1), -p, - 
p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^ 
2 - 4*a*c])] + (1 + n)*(e^2*x^(2*n)*AppellF1[2 + n^(-1), -p, -p, 3 + n^(-1 
), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] 
 + d^2*(1 + 2*n)*AppellF1[n^(-1), -p, -p, 1 + n^(-1), (-2*c*x^n)/(b + Sqrt 
[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])))/((1 + n)*(1 + 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] (warning: unable to verify)

Time = 0.72 (sec) , antiderivative size = 447, normalized size of antiderivative = 1.13, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1766, 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 \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx\)

\(\Big \downarrow \) 1766

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

\(\Big \downarrow \) 2009

\(\displaystyle d^2 x \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 {1}{n},-p,-p,1+\frac {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 )+\frac {2 d e x^{n+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 (1+\frac {1}{n},-p,-p,2+\frac {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 )}{n+1}+\frac {e^2 x^{2 n+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 (2+\frac {1}{n},-p,-p,3+\frac {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 )}{2 n+1}\)

Input:

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

Output:

(2*d*e*x^(1 + n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[1 + n^(-1), -p, -p, 2 
+ n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4 
*a*c])])/((1 + 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)*(a + b*x^n + c*x^(2*n))^p* 
AppellF1[2 + n^(-1), -p, -p, 3 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c] 
), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((1 + 2*n)*(1 + (2*c*x^n)/(b - Sqr 
t[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]))^p) + (d^2*x*(a 
+ b*x^n + c*x^(2*n))^p*AppellF1[n^(-1), -p, -p, 1 + n^(-1), (-2*c*x^n)/(b 
- Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((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 1766
Int[((d_) + (e_.)*(x_)^(n_))^(q_)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_ 
))^(p_), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q*(a + b*x^n + c*x^(2 
*n))^p, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && EqQ[n2, 2*n] && NeQ 
[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && ((IntegersQ[p, q] && 
!IntegerQ[n]) || IGtQ[p, 0] || (IGtQ[q, 0] &&  !IntegerQ[n]))
 

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

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

Input:

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

Output:

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

Fricas [F]

\[ \int \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} \,d x } \] Input:

integrate((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, x)
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

\[ \int \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} \,d x } \] Input:

integrate((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, x)
 

Giac [F(-2)]

Exception generated. \[ \int \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((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,6,4,1,6,0,2]%%%}+%%%{512,[1,0,5,3,6,4,0,7,1, 
1]%%%}+%%
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \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((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 

Output:

(2*x**(2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*n**2*p**2*x + x**(2*n)*( 
x**(2*n)*c + x**n*b + a)**p*b*c*e**2*n**2*p*x + 3*x**(2*n)*(x**(2*n)*c + x 
**n*b + a)**p*b*c*e**2*n*p*x + x**(2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e 
**2*n*x + x**(2*n)*(x**(2*n)*c + x**n*b + a)**p*b*c*e**2*x + x**n*(x**(2*n 
)*c + x**n*b + a)**p*b**2*e**2*n**2*p**2*x + x**n*(x**(2*n)*c + x**n*b + a 
)**p*b**2*e**2*n*p*x + 4*x**n*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*n**2*p* 
*2*x + 4*x**n*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*n**2*p*x + 6*x**n*(x**( 
2*n)*c + x**n*b + a)**p*b*c*d*e*n*p*x + 4*x**n*(x**(2*n)*c + x**n*b + a)** 
p*b*c*d*e*n*x + 2*x**n*(x**(2*n)*c + x**n*b + a)**p*b*c*d*e*x - (x**(2*n)* 
c + x**n*b + a)**p*a*b*e**2*n**2*p*x - (x**(2*n)*c + x**n*b + a)**p*a*b*e* 
*2*n*p*x + 8*(x**(2*n)*c + x**n*b + a)**p*a*c*d*e*n**2*p**2*x + 8*(x**(2*n 
)*c + x**n*b + a)**p*a*c*d*e*n**2*p*x + 4*(x**(2*n)*c + x**n*b + a)**p*a*c 
*d*e*n*p*x + 4*(x**(2*n)*c + x**n*b + a)**p*b*c*d**2*n**2*p**2*x + 6*(x**( 
2*n)*c + x**n*b + a)**p*b*c*d**2*n**2*p*x + 2*(x**(2*n)*c + x**n*b + a)**p 
*b*c*d**2*n**2*x + 4*(x**(2*n)*c + x**n*b + a)**p*b*c*d**2*n*p*x + 3*(x**( 
2*n)*c + x**n*b + a)**p*b*c*d**2*n*x + (x**(2*n)*c + x**n*b + a)**p*b*c*d* 
*2*x + 4*int((x**(2*n)*c + x**n*b + a)**p/(4*x**(2*n)*c*n**3*p**3 + 6*x**( 
2*n)*c*n**3*p**2 + 2*x**(2*n)*c*n**3*p + 8*x**(2*n)*c*n**2*p**2 + 9*x**(2* 
n)*c*n**2*p + 2*x**(2*n)*c*n**2 + 5*x**(2*n)*c*n*p + 3*x**(2*n)*c*n + x**( 
2*n)*c + 4*x**n*b*n**3*p**3 + 6*x**n*b*n**3*p**2 + 2*x**n*b*n**3*p + 8*...