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

Optimal result
Mathematica [C] (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 = 256 \[ \int x \left (a+b \sqrt {x}+c x\right )^p \, dx=\frac {\left (b^2 (2+p) (3+p)-2 a c (3+2 p)-2 b c (1+p) (3+p) \sqrt {x}\right ) \left (a+b \sqrt {x}+c x\right )^{1+p}}{2 c^3 (1+p) (2+p) (3+2 p)}+\frac {x \left (a+b \sqrt {x}+c x\right )^{1+p}}{c (2+p)}-\frac {2^p b \left (6 a c-b^2 (3+p)\right ) \left (-\frac {b-\sqrt {b^2-4 a c}+2 c \sqrt {x}}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b \sqrt {x}+c x\right )^{1+p} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,\frac {b+\sqrt {b^2-4 a c}+2 c \sqrt {x}}{2 \sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c} (1+p) (3+2 p)} \] Output:

1/2*(b^2*(2+p)*(3+p)-2*a*c*(3+2*p)-2*b*c*(p+1)*(3+p)*x^(1/2))*(a+b*x^(1/2) 
+c*x)^(p+1)/c^3/(p+1)/(2+p)/(3+2*p)+x*(a+b*x^(1/2)+c*x)^(p+1)/c/(2+p)-2^p* 
b*(6*a*c-b^2*(3+p))*(-(b-(-4*a*c+b^2)^(1/2)+2*c*x^(1/2))/(-4*a*c+b^2)^(1/2 
))^(-1-p)*(a+b*x^(1/2)+c*x)^(p+1)*hypergeom([-p, p+1],[2+p],1/2*(b+(-4*a*c 
+b^2)^(1/2)+2*c*x^(1/2))/(-4*a*c+b^2)^(1/2))/c^3/(-4*a*c+b^2)^(1/2)/(p+1)/ 
(3+2*p)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.

Time = 0.61 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.66 \[ \int x \left (a+b \sqrt {x}+c x\right )^p \, dx=\frac {1}{2} \left (\frac {b-\sqrt {b^2-4 a c}+2 c \sqrt {x}}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c \sqrt {x}}{b+\sqrt {b^2-4 a c}}\right )^{-p} x^2 \left (a+b \sqrt {x}+c x\right )^p \operatorname {AppellF1}\left (4,-p,-p,5,-\frac {2 c \sqrt {x}}{b+\sqrt {b^2-4 a c}},\frac {2 c \sqrt {x}}{-b+\sqrt {b^2-4 a c}}\right ) \] Input:

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

Output:

(x^2*(a + b*Sqrt[x] + c*x)^p*AppellF1[4, -p, -p, 5, (-2*c*Sqrt[x])/(b + Sq 
rt[b^2 - 4*a*c]), (2*c*Sqrt[x])/(-b + Sqrt[b^2 - 4*a*c])])/(2*((b - Sqrt[b 
^2 - 4*a*c] + 2*c*Sqrt[x])/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt[b^2 - 4*a 
*c] + 2*c*Sqrt[x])/(b + Sqrt[b^2 - 4*a*c]))^p)
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.06, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {1693, 1166, 25, 1225, 1096}

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

\(\Big \downarrow \) 1693

\(\displaystyle 2 \int x^{3/2} \left (a+c x+b \sqrt {x}\right )^pd\sqrt {x}\)

\(\Big \downarrow \) 1166

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 1225

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

\(\Big \downarrow \) 1096

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

Input:

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

Output:

2*((x*(a + b*Sqrt[x] + c*x)^(1 + p))/(2*c*(2 + p)) - (-1/2*((b^2*(2 + p)*( 
3 + p) - 2*a*c*(3 + 2*p) - 2*b*c*(1 + p)*(3 + p)*Sqrt[x])*(a + b*Sqrt[x] + 
 c*x)^(1 + p))/(c^2*(1 + p)*(3 + 2*p)) + (2^p*b*(2 + p)*(6*a*c - b^2*(3 + 
p))*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*Sqrt[x])/Sqrt[b^2 - 4*a*c]))^(-1 - p)* 
(a + b*Sqrt[x] + c*x)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqr 
t[b^2 - 4*a*c] + 2*c*Sqrt[x])/(2*Sqrt[b^2 - 4*a*c])])/(c^2*Sqrt[b^2 - 4*a* 
c]*(1 + p)*(3 + 2*p)))/(2*c*(2 + p)))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1096
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 
 - 4*a*c, 2]}, Simp[(-(a + b*x + c*x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x) 
/(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q) 
], x]] /; FreeQ[{a, b, c, p}, x] &&  !IntegerQ[4*p] &&  !IntegerQ[3*p]
 

rule 1166
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[e*(d + e*x)^(m - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(m + 2*p + 
 1))), x] + Simp[1/(c*(m + 2*p + 1))   Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m 
+ 2*p + 1) - e*(a*e*(m - 1) + b*d*(p + 1)) + e*(2*c*d - b*e)*(m + p)*x, x]* 
(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && If[Ration 
alQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadrat 
icQ[a, b, c, d, e, m, p, x]
 

rule 1225
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*( 
x_)^2)^(p_), x_Symbol] :> Simp[(-(b*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 
 2*c*e*g*(p + 1)*x))*((a + b*x + c*x^2)^(p + 1)/(2*c^2*(p + 1)*(2*p + 3))), 
 x] + Simp[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p 
+ 3))/(2*c^2*(2*p + 3))   Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c 
, d, e, f, g, p}, x] &&  !LeQ[p, -1]
 

rule 1693
Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x + c*x^2)^p, 
x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && IntegerQ 
[Simplify[(m + 1)/n]]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral((c*x + b*sqrt(x) + a)^p*x, x)
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 8*sqrt(x)*(sqrt(x)*b + a + c*x)**p*a*b*c*p**3 - 40*sqrt(x)*(sqrt(x)*b 
+ a + c*x)**p*a*b*c*p**2 - 36*sqrt(x)*(sqrt(x)*b + a + c*x)**p*a*b*c*p + 2 
*sqrt(x)*(sqrt(x)*b + a + c*x)**p*b**3*p**3 + 10*sqrt(x)*(sqrt(x)*b + a + 
c*x)**p*b**3*p**2 + 12*sqrt(x)*(sqrt(x)*b + a + c*x)**p*b**3*p + 8*sqrt(x) 
*(sqrt(x)*b + a + c*x)**p*b*c**2*p**3*x + 12*sqrt(x)*(sqrt(x)*b + a + c*x) 
**p*b*c**2*p**2*x + 4*sqrt(x)*(sqrt(x)*b + a + c*x)**p*b*c**2*p*x + 8*(sqr 
t(x)*b + a + c*x)**p*a**2*c*p**2 + 40*(sqrt(x)*b + a + c*x)**p*a**2*c*p + 
36*(sqrt(x)*b + a + c*x)**p*a**2*c - 2*(sqrt(x)*b + a + c*x)**p*a*b**2*p** 
2 - 10*(sqrt(x)*b + a + c*x)**p*a*b**2*p - 12*(sqrt(x)*b + a + c*x)**p*a*b 
**2 + 16*(sqrt(x)*b + a + c*x)**p*a*c**2*p**3*x + 32*(sqrt(x)*b + a + c*x) 
**p*a*c**2*p**2*x + 12*(sqrt(x)*b + a + c*x)**p*a*c**2*p*x - 4*(sqrt(x)*b 
+ a + c*x)**p*b**2*c*p**3*x - 14*(sqrt(x)*b + a + c*x)**p*b**2*c*p**2*x - 
6*(sqrt(x)*b + a + c*x)**p*b**2*c*p*x + 16*(sqrt(x)*b + a + c*x)**p*c**3*p 
**3*x**2 + 48*(sqrt(x)*b + a + c*x)**p*c**3*p**2*x**2 + 44*(sqrt(x)*b + a 
+ c*x)**p*c**3*p*x**2 + 12*(sqrt(x)*b + a + c*x)**p*c**3*x**2 - 96*int((sq 
rt(x)*b + a + c*x)**p/(4*sqrt(x)*b*p**2 + 8*sqrt(x)*b*p + 3*sqrt(x)*b + 4* 
a*p**2 + 8*a*p + 3*a + 4*c*p**2*x + 8*c*p*x + 3*c*x),x)*a**2*c**2*p**5 - 4 
80*int((sqrt(x)*b + a + c*x)**p/(4*sqrt(x)*b*p**2 + 8*sqrt(x)*b*p + 3*sqrt 
(x)*b + 4*a*p**2 + 8*a*p + 3*a + 4*c*p**2*x + 8*c*p*x + 3*c*x),x)*a**2*c** 
2*p**4 - 840*int((sqrt(x)*b + a + c*x)**p/(4*sqrt(x)*b*p**2 + 8*sqrt(x)...