\(\int (a+b x^n+c x^{2 n})^p (A+C x^{2 n}) \, dx\) [36]

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

Optimal result

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

C*x^(1+2*n)*(a+b*x^n+c*x^(2*n))^p*AppellF1(2+1/n,-p,-p,3+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)))/(1+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)+A*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)))/((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.76 (sec) , antiderivative size = 249, normalized size of antiderivative = 0.85 \[ \int \left (a+b x^n+c x^{2 n}\right )^p \left (A+C x^{2 n}\right ) \, 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 (C 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 )+A (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 )}{1+2 n} \] Input:

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

Output:

(x*(a + x^n*(b + c*x^n))^p*(C*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] 
)] + A*(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 + 2*n)*((b - Sqr 
t[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 [F]

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

\(\Big \downarrow \) 2329

\(\displaystyle \int \left (A+C x^{2 n}\right ) \left (a+b x^n+c x^{2 n}\right )^pdx\)

Input:

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

Output:

$Aborted
 

Defintions of rubi rules used

rule 2329
Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.))^(p_.), x_Symbol] :> 
 Unintegrable[Pq*(a + b*x^n + c*x^(2*n))^p, x] /; FreeQ[{a, b, c, n, p}, x] 
 && EqQ[n2, 2*n] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])
 
Maple [F]

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

Input:

int((a+b*x^n+c*x^(2*n))^p*(A+C*x^(2*n)),x)
 

Output:

int((a+b*x^n+c*x^(2*n))^p*(A+C*x^(2*n)),x)
 

Fricas [F]

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

integrate((a+b*x^n+c*x^(2*n))^p*(A+C*x^(2*n)),x, algorithm="fricas")
 

Output:

integral((C*x^(2*n) + A)*(c*x^(2*n) + b*x^n + a)^p, x)
 

Sympy [F(-1)]

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

integrate((a+b*x**n+c*x**(2*n))**p*(A+C*x**(2*n)),x)
 

Output:

Timed out
 

Maxima [F]

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

integrate((a+b*x^n+c*x^(2*n))^p*(A+C*x^(2*n)),x, algorithm="maxima")
 

Output:

integrate((C*x^(2*n) + A)*(c*x^(2*n) + b*x^n + a)^p, x)
 

Giac [F(-2)]

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

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

Mupad [F(-1)]

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

int((A + C*x^(2*n))*(a + b*x^n + c*x^(2*n))^p,x)
 

Output:

int((A + C*x^(2*n))*(a + b*x^n + c*x^(2*n))^p, x)
 

Reduce [F]

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

int((a+b*x^n+c*x^(2*n))^p*(A+C*x^(2*n)),x)
 

Output:

(2*x**(2*n)*(x**(2*n)*c + x**n*b + a)**p*c*n**2*p**2*x + x**(2*n)*(x**(2*n 
)*c + x**n*b + a)**p*c*n**2*p*x + 3*x**(2*n)*(x**(2*n)*c + x**n*b + a)**p* 
c*n*p*x + x**(2*n)*(x**(2*n)*c + x**n*b + a)**p*c*n*x + x**(2*n)*(x**(2*n) 
*c + x**n*b + a)**p*c*x + x**n*(x**(2*n)*c + x**n*b + a)**p*b*n**2*p**2*x 
+ x**n*(x**(2*n)*c + x**n*b + a)**p*b*n*p*x + 4*(x**(2*n)*c + x**n*b + a)* 
*p*a*n**2*p**2*x + 5*(x**(2*n)*c + x**n*b + a)**p*a*n**2*p*x + 2*(x**(2*n) 
*c + x**n*b + a)**p*a*n**2*x + 3*(x**(2*n)*c + x**n*b + a)**p*a*n*p*x + 3* 
(x**(2*n)*c + x**n*b + a)**p*a*n*x + (x**(2*n)*c + x**n*b + a)**p*a*x + 16 
*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*x**n*b*n**2 
*p**2 + 9*x**n*b*n**2*p + 2*x**n*b*n**2 + 5*x**n*b*n*p + 3*x**n*b*n + x**n 
*b + 4*a*n**3*p**3 + 6*a*n**3*p**2 + 2*a*n**3*p + 8*a*n**2*p**2 + 9*a*n**2 
*p + 2*a*n**2 + 5*a*n*p + 3*a*n + a),x)*a**2*n**6*p**6 + 48*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*x**n*b*n**2*p**2 + 9*x**n* 
b*n**2*p + 2*x**n*b*n**2 + 5*x**n*b*n*p + 3*x**n*b*n + x**n*b + 4*a*n**...