\(\int x (A+B x) (a+b x+c x^2)^p \, dx\) [242]

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

Optimal result

Integrand size = 19, antiderivative size = 175 \[ \int x (A+B x) \left (a+b x+c x^2\right )^p \, dx=-\frac {(b B (2+p)-A c (3+2 p)-2 B c (1+p) x) \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (1+p) (3+2 p)}-\frac {4^{-1-p} \left (2 a B c-b^2 B (2+p)+A b c (3+2 p)\right ) (b+2 c x) \left (a+b x+c x^2\right )^p \left (-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},\frac {(b+2 c x)^2}{b^2-4 a c}\right )}{c^3 (3+2 p)} \] Output:

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

Mathematica [C] (verified)

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

Time = 0.55 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.20 \[ \int x (A+B x) \left (a+b x+c x^2\right )^p \, dx=\frac {1}{6} x^2 \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{b+\sqrt {b^2-4 a c}}\right )^{-p} (a+x (b+c x))^p \left (3 A \operatorname {AppellF1}\left (2,-p,-p,3,-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )+2 B x \operatorname {AppellF1}\left (3,-p,-p,4,-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )\right ) \] Input:

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

Output:

(x^2*(a + x*(b + c*x))^p*(3*A*AppellF1[2, -p, -p, 3, (-2*c*x)/(b + Sqrt[b^ 
2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + 2*B*x*AppellF1[3, -p, -p, 
 4, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])]))/ 
(6*((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt[ 
b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b^2 - 4*a*c]))^p)
 

Rubi [A] (warning: unable to verify)

Time = 0.31 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.21, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {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 (A+B x) \left (a+b x+c x^2\right )^p \, dx\)

\(\Big \downarrow \) 1225

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

\(\Big \downarrow \) 1096

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

Input:

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

Output:

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

Defintions of rubi rules used

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 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]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

Integral(x*(A + B*x)*(a + b*x + c*x**2)**p, x)
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 6*(a + b*x + c*x**2)**p*a**2*c*p - 7*(a + b*x + c*x**2)**p*a**2*c + (a 
 + b*x + c*x**2)**p*a*b**2*p + 2*(a + b*x + c*x**2)**p*a*b**2 + 6*(a + b*x 
 + c*x**2)**p*a*b*c*p**2*x + 7*(a + b*x + c*x**2)**p*a*b*c*p*x + 4*(a + b* 
x + c*x**2)**p*a*c**2*p**2*x**2 + 8*(a + b*x + c*x**2)**p*a*c**2*p*x**2 + 
3*(a + b*x + c*x**2)**p*a*c**2*x**2 - (a + b*x + c*x**2)**p*b**3*p**2*x - 
2*(a + b*x + c*x**2)**p*b**3*p*x + 2*(a + b*x + c*x**2)**p*b**2*c*p**2*x** 
2 + (a + b*x + c*x**2)**p*b**2*c*p*x**2 + 4*(a + b*x + c*x**2)**p*b*c**2*p 
**2*x**3 + 6*(a + b*x + c*x**2)**p*b*c**2*p*x**3 + 2*(a + b*x + c*x**2)**p 
*b*c**2*x**3 + 32*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 3*a + 
4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x**2),x)*a 
**2*c**2*p**5 + 176*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 3*a 
+ 4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x**2),x) 
*a**2*c**2*p**4 + 328*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 3* 
a + 4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x**2), 
x)*a**2*c**2*p**3 + 244*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 
3*a + 4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x**2 
),x)*a**2*c**2*p**2 + 60*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 
 3*a + 4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x** 
2),x)*a**2*c**2*p - 24*int(((a + b*x + c*x**2)**p*x)/(4*a*p**2 + 8*a*p + 3 
*a + 4*b*p**2*x + 8*b*p*x + 3*b*x + 4*c*p**2*x**2 + 8*c*p*x**2 + 3*c*x*...