\(\int x (a^2+2 a c \sqrt {x}+c^2 x)^p \, dx\) [88]

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

Optimal result

Integrand size = 22, antiderivative size = 173 \[ \int x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx=-\frac {2 a^3 \left (a+c \sqrt {x}\right ) \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p}{c^4 (1+2 p)}+\frac {3 a^2 \left (a+c \sqrt {x}\right )^2 \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p}{c^4 (1+p)}-\frac {6 a \left (a+c \sqrt {x}\right )^3 \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p}{c^4 (3+2 p)}+\frac {\left (a+c \sqrt {x}\right )^4 \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p}{c^4 (2+p)} \] Output:

-2*a^3*(a+c*x^(1/2))*(a^2+2*a*c*x^(1/2)+c^2*x)^p/c^4/(1+2*p)+3*a^2*(a+c*x^ 
(1/2))^2*(a^2+2*a*c*x^(1/2)+c^2*x)^p/c^4/(p+1)-6*a*(a+c*x^(1/2))^3*(a^2+2* 
a*c*x^(1/2)+c^2*x)^p/c^4/(3+2*p)+(a+c*x^(1/2))^4*(a^2+2*a*c*x^(1/2)+c^2*x) 
^p/c^4/(2+p)
 

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.65 \[ \int x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx=\frac {\left (a+c \sqrt {x}\right ) \left (\left (a+c \sqrt {x}\right )^2\right )^p \left (-3 a^3+3 a^2 c (1+2 p) \sqrt {x}-3 a c^2 \left (1+3 p+2 p^2\right ) x+c^3 \left (3+11 p+12 p^2+4 p^3\right ) x^{3/2}\right )}{c^4 (1+p) (2+p) (1+2 p) (3+2 p)} \] Input:

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

Output:

((a + c*Sqrt[x])*((a + c*Sqrt[x])^2)^p*(-3*a^3 + 3*a^2*c*(1 + 2*p)*Sqrt[x] 
 - 3*a*c^2*(1 + 3*p + 2*p^2)*x + c^3*(3 + 11*p + 12*p^2 + 4*p^3)*x^(3/2))) 
/(c^4*(1 + p)*(2 + p)*(1 + 2*p)*(3 + 2*p))
 

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1385, 798, 53, 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 x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx\)

\(\Big \downarrow \) 1385

\(\displaystyle \left (\frac {c \sqrt {x}}{a}+1\right )^{-2 p} \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \int \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p} xdx\)

\(\Big \downarrow \) 798

\(\displaystyle 2 \left (\frac {c \sqrt {x}}{a}+1\right )^{-2 p} \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \int \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p} x^{3/2}d\sqrt {x}\)

\(\Big \downarrow \) 53

\(\displaystyle 2 \left (\frac {c \sqrt {x}}{a}+1\right )^{-2 p} \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \int \left (-\frac {a^3 \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p}}{c^3}+\frac {3 a^3 \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p+1}}{c^3}-\frac {3 a^3 \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p+2}}{c^3}+\frac {a^3 \left (\frac {\sqrt {x} c}{a}+1\right )^{2 p+3}}{c^3}\right )d\sqrt {x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 \left (\frac {3 a^4 \left (\frac {c \sqrt {x}}{a}+1\right )^{2 (p+1)}}{2 c^4 (p+1)}+\frac {a^4 \left (\frac {c \sqrt {x}}{a}+1\right )^{2 (p+2)}}{2 c^4 (p+2)}-\frac {a^4 \left (\frac {c \sqrt {x}}{a}+1\right )^{2 p+1}}{c^4 (2 p+1)}-\frac {3 a^4 \left (\frac {c \sqrt {x}}{a}+1\right )^{2 p+3}}{c^4 (2 p+3)}\right ) \left (\frac {c \sqrt {x}}{a}+1\right )^{-2 p} \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p\)

Input:

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

Output:

(2*((3*a^4*(1 + (c*Sqrt[x])/a)^(2*(1 + p)))/(2*c^4*(1 + p)) + (a^4*(1 + (c 
*Sqrt[x])/a)^(2*(2 + p)))/(2*c^4*(2 + p)) - (a^4*(1 + (c*Sqrt[x])/a)^(1 + 
2*p))/(c^4*(1 + 2*p)) - (3*a^4*(1 + (c*Sqrt[x])/a)^(3 + 2*p))/(c^4*(3 + 2* 
p)))*(a^2 + 2*a*c*Sqrt[x] + c^2*x)^p)/(1 + (c*Sqrt[x])/a)^(2*p)
 

Defintions of rubi rules used

rule 53
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, 
x] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0] && LeQ[7*m + 4*n + 4, 0]) 
|| LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])
 

rule 798
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[1/n   Subst 
[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p, x], x, x^n], x] /; FreeQ[{a, 
b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]
 

rule 1385
Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> S 
imp[a^IntPart[p]*((a + b*x^n + c*x^(2*n))^FracPart[p]/(1 + 2*c*(x^n/b))^(2* 
FracPart[p]))   Int[u*(1 + 2*c*(x^n/b))^(2*p), x], x] /; FreeQ[{a, b, c, n, 
 p}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[2*p] && NeQ[u, 
 x^(n - 1)] && NeQ[u, x^(2*n - 1)]
 

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

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

Input:

int(x*(a^2+2*a*c*x^(1/2)+c^2*x)^p,x)
 

Output:

int(x*(a^2+2*a*c*x^(1/2)+c^2*x)^p,x)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.92 \[ \int x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx=-\frac {{\left (3 \, a^{4} - {\left (4 \, c^{4} p^{3} + 12 \, c^{4} p^{2} + 11 \, c^{4} p + 3 \, c^{4}\right )} x^{2} + 3 \, {\left (2 \, a^{2} c^{2} p^{2} + a^{2} c^{2} p\right )} x - 2 \, {\left (3 \, a^{3} c p + {\left (2 \, a c^{3} p^{3} + 3 \, a c^{3} p^{2} + a c^{3} p\right )} x\right )} \sqrt {x}\right )} {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p}}{4 \, c^{4} p^{4} + 20 \, c^{4} p^{3} + 35 \, c^{4} p^{2} + 25 \, c^{4} p + 6 \, c^{4}} \] Input:

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

Output:

-(3*a^4 - (4*c^4*p^3 + 12*c^4*p^2 + 11*c^4*p + 3*c^4)*x^2 + 3*(2*a^2*c^2*p 
^2 + a^2*c^2*p)*x - 2*(3*a^3*c*p + (2*a*c^3*p^3 + 3*a*c^3*p^2 + a*c^3*p)*x 
)*sqrt(x))*(c^2*x + 2*a*c*sqrt(x) + a^2)^p/(4*c^4*p^4 + 20*c^4*p^3 + 35*c^ 
4*p^2 + 25*c^4*p + 6*c^4)
 

Sympy [F]

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

integrate(x*(a**2+2*a*c*x**(1/2)+c**2*x)**p,x)
 

Output:

Integral(x*(a**2 + 2*a*c*sqrt(x) + c**2*x)**p, x)
 

Maxima [F]

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 348 vs. \(2 (157) = 314\).

Time = 0.13 (sec) , antiderivative size = 348, normalized size of antiderivative = 2.01 \[ \int x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx=\frac {4 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} c^{4} p^{3} x^{2} + 4 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a c^{3} p^{3} x^{\frac {3}{2}} + 12 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} c^{4} p^{2} x^{2} + 6 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a c^{3} p^{2} x^{\frac {3}{2}} - 6 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a^{2} c^{2} p^{2} x + 11 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} c^{4} p x^{2} + 2 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a c^{3} p x^{\frac {3}{2}} - 3 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a^{2} c^{2} p x + 3 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} c^{4} x^{2} + 6 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a^{3} c p \sqrt {x} - 3 \, {\left (c^{2} x + 2 \, a c \sqrt {x} + a^{2}\right )}^{p} a^{4}}{4 \, c^{4} p^{4} + 20 \, c^{4} p^{3} + 35 \, c^{4} p^{2} + 25 \, c^{4} p + 6 \, c^{4}} \] Input:

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

Output:

(4*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*c^4*p^3*x^2 + 4*(c^2*x + 2*a*c*sqrt(x) 
+ a^2)^p*a*c^3*p^3*x^(3/2) + 12*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*c^4*p^2*x^ 
2 + 6*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*a*c^3*p^2*x^(3/2) - 6*(c^2*x + 2*a*c 
*sqrt(x) + a^2)^p*a^2*c^2*p^2*x + 11*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*c^4*p 
*x^2 + 2*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*a*c^3*p*x^(3/2) - 3*(c^2*x + 2*a* 
c*sqrt(x) + a^2)^p*a^2*c^2*p*x + 3*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*c^4*x^2 
 + 6*(c^2*x + 2*a*c*sqrt(x) + a^2)^p*a^3*c*p*sqrt(x) - 3*(c^2*x + 2*a*c*sq 
rt(x) + a^2)^p*a^4)/(4*c^4*p^4 + 20*c^4*p^3 + 35*c^4*p^2 + 25*c^4*p + 6*c^ 
4)
 

Mupad [F(-1)]

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

int(x*(c^2*x + a^2 + 2*a*c*x^(1/2))^p,x)
 

Output:

int(x*(c^2*x + a^2 + 2*a*c*x^(1/2))^p, x)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.88 \[ \int x \left (a^2+2 a c \sqrt {x}+c^2 x\right )^p \, dx=\frac {\left (2 \sqrt {x}\, a c +a^{2}+c^{2} x \right )^{p} \left (6 \sqrt {x}\, a^{3} c p +4 \sqrt {x}\, a \,c^{3} p^{3} x +6 \sqrt {x}\, a \,c^{3} p^{2} x +2 \sqrt {x}\, a \,c^{3} p x -3 a^{4}-6 a^{2} c^{2} p^{2} x -3 a^{2} c^{2} p x +4 c^{4} p^{3} x^{2}+12 c^{4} p^{2} x^{2}+11 c^{4} p \,x^{2}+3 c^{4} x^{2}\right )}{c^{4} \left (4 p^{4}+20 p^{3}+35 p^{2}+25 p +6\right )} \] Input:

int(x*(a^2+2*a*c*x^(1/2)+c^2*x)^p,x)
 

Output:

((2*sqrt(x)*a*c + a**2 + c**2*x)**p*(6*sqrt(x)*a**3*c*p + 4*sqrt(x)*a*c**3 
*p**3*x + 6*sqrt(x)*a*c**3*p**2*x + 2*sqrt(x)*a*c**3*p*x - 3*a**4 - 6*a**2 
*c**2*p**2*x - 3*a**2*c**2*p*x + 4*c**4*p**3*x**2 + 12*c**4*p**2*x**2 + 11 
*c**4*p*x**2 + 3*c**4*x**2))/(c**4*(4*p**4 + 20*p**3 + 35*p**2 + 25*p + 6) 
)