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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 137 \[ \int \left (a+b x^n+c x^{2 n}\right )^p \, dx=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:

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] (verified)

Time = 0.27 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.20 \[ \int \left (a+b x^n+c x^{2 n}\right )^p \, dx=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 \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 ) \] Input:

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

Output:

(x*(a + x^n*(b + c*x^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])])/(((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.29 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1686, 936}

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

\(\Big \downarrow \) 1686

\(\displaystyle \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 \int \left (\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}+1\right )^p \left (\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}+1\right )^pdx\)

\(\Big \downarrow \) 936

\(\displaystyle 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 )\)

Input:

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

Output:

(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 936
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] 
:> Simp[a^p*c^q*x*AppellF1[1/n, -p, -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c) 
], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] 
 && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
 

rule 1686
Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^ 
IntPart[p]*((a + b*x^n + c*x^(2*n))^FracPart[p]/((1 + 2*c*(x^n/(b + Rt[b^2 
- 4*a*c, 2])))^FracPart[p]*(1 + 2*c*(x^n/(b - Rt[b^2 - 4*a*c, 2])))^FracPar 
t[p]))   Int[(1 + 2*c*(x^n/(b + Sqrt[b^2 - 4*a*c])))^p*(1 + 2*c*(x^n/(b - S 
qrt[b^2 - 4*a*c])))^p, x], x] /; FreeQ[{a, b, c, n, p}, x] && EqQ[n2, 2*n] 
&& NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral((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 \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

((x**(2*n)*c + x**n*b + a)**p*x + int((x**(2*n)*c + x**n*b + a)**p/(x**(2* 
n)*c*n*p + x**(2*n)*c + x**n*b*n*p + x**n*b + a*n*p + a),x)*a*n**2*p**2 + 
int((x**(2*n)*c + x**n*b + a)**p/(x**(2*n)*c*n*p + x**(2*n)*c + x**n*b*n*p 
 + x**n*b + a*n*p + a),x)*a*n*p - int((x**(2*n)*(x**(2*n)*c + x**n*b + a)* 
*p)/(x**(2*n)*c*n*p + x**(2*n)*c + x**n*b*n*p + x**n*b + a*n*p + a),x)*c*n 
**2*p**2 - int((x**(2*n)*(x**(2*n)*c + x**n*b + a)**p)/(x**(2*n)*c*n*p + x 
**(2*n)*c + x**n*b*n*p + x**n*b + a*n*p + a),x)*c*n*p)/(n*p + 1)