### 3.2150 $$\int (a+b x+c x^2)^4 \, dx$$

Optimal. Leaf size=133 $\frac{1}{5} x^5 \left (6 a^2 c^2+12 a b^2 c+b^4\right )+\frac{2}{3} a^2 x^3 \left (2 a c+3 b^2\right )+2 a^3 b x^2+a^4 x+\frac{2}{7} c^2 x^7 \left (2 a c+3 b^2\right )+\frac{2}{3} b c x^6 \left (3 a c+b^2\right )+a b x^4 \left (3 a c+b^2\right )+\frac{1}{2} b c^3 x^8+\frac{c^4 x^9}{9}$

[Out]

a^4*x + 2*a^3*b*x^2 + (2*a^2*(3*b^2 + 2*a*c)*x^3)/3 + a*b*(b^2 + 3*a*c)*x^4 + ((b^4 + 12*a*b^2*c + 6*a^2*c^2)*
x^5)/5 + (2*b*c*(b^2 + 3*a*c)*x^6)/3 + (2*c^2*(3*b^2 + 2*a*c)*x^7)/7 + (b*c^3*x^8)/2 + (c^4*x^9)/9

________________________________________________________________________________________

Rubi [A]  time = 0.116593, antiderivative size = 133, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.083, Rules used = {611} $\frac{1}{5} x^5 \left (6 a^2 c^2+12 a b^2 c+b^4\right )+\frac{2}{3} a^2 x^3 \left (2 a c+3 b^2\right )+2 a^3 b x^2+a^4 x+\frac{2}{7} c^2 x^7 \left (2 a c+3 b^2\right )+\frac{2}{3} b c x^6 \left (3 a c+b^2\right )+a b x^4 \left (3 a c+b^2\right )+\frac{1}{2} b c^3 x^8+\frac{c^4 x^9}{9}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^4*x + 2*a^3*b*x^2 + (2*a^2*(3*b^2 + 2*a*c)*x^3)/3 + a*b*(b^2 + 3*a*c)*x^4 + ((b^4 + 12*a*b^2*c + 6*a^2*c^2)*
x^5)/5 + (2*b*c*(b^2 + 3*a*c)*x^6)/3 + (2*c^2*(3*b^2 + 2*a*c)*x^7)/7 + (b*c^3*x^8)/2 + (c^4*x^9)/9

Rule 611

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x + c*x^2)^p, x], x] /;
FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && (EqQ[a, 0] ||  !PerfectSquareQ[b^2 - 4*a*c])

Rubi steps

\begin{align*} \int \left (a+b x+c x^2\right )^4 \, dx &=\int \left (a^4+4 a^3 b x+6 a^2 b^2 \left (1+\frac{2 a c}{3 b^2}\right ) x^2+4 a b^3 \left (1+\frac{3 a c}{b^2}\right ) x^3+b^4 \left (1+\frac{6 a c \left (2 b^2+a c\right )}{b^4}\right ) x^4+4 b^3 c \left (1+\frac{3 a c}{b^2}\right ) x^5+6 b^2 c^2 \left (1+\frac{2 a c}{3 b^2}\right ) x^6+4 b c^3 x^7+c^4 x^8\right ) \, dx\\ &=a^4 x+2 a^3 b x^2+\frac{2}{3} a^2 \left (3 b^2+2 a c\right ) x^3+a b \left (b^2+3 a c\right ) x^4+\frac{1}{5} \left (b^4+12 a b^2 c+6 a^2 c^2\right ) x^5+\frac{2}{3} b c \left (b^2+3 a c\right ) x^6+\frac{2}{7} c^2 \left (3 b^2+2 a c\right ) x^7+\frac{1}{2} b c^3 x^8+\frac{c^4 x^9}{9}\\ \end{align*}

Mathematica [A]  time = 0.0191627, size = 133, normalized size = 1. $\frac{1}{5} x^5 \left (6 a^2 c^2+12 a b^2 c+b^4\right )+\frac{2}{3} a^2 x^3 \left (2 a c+3 b^2\right )+2 a^3 b x^2+a^4 x+\frac{2}{7} c^2 x^7 \left (2 a c+3 b^2\right )+\frac{2}{3} b c x^6 \left (3 a c+b^2\right )+a b x^4 \left (3 a c+b^2\right )+\frac{1}{2} b c^3 x^8+\frac{c^4 x^9}{9}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^4*x + 2*a^3*b*x^2 + (2*a^2*(3*b^2 + 2*a*c)*x^3)/3 + a*b*(b^2 + 3*a*c)*x^4 + ((b^4 + 12*a*b^2*c + 6*a^2*c^2)*
x^5)/5 + (2*b*c*(b^2 + 3*a*c)*x^6)/3 + (2*c^2*(3*b^2 + 2*a*c)*x^7)/7 + (b*c^3*x^8)/2 + (c^4*x^9)/9

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 168, normalized size = 1.3 \begin{align*}{\frac{{c}^{4}{x}^{9}}{9}}+{\frac{b{c}^{3}{x}^{8}}{2}}+{\frac{ \left ( 2\, \left ( 2\,ac+{b}^{2} \right ){c}^{2}+4\,{b}^{2}{c}^{2} \right ){x}^{7}}{7}}+{\frac{ \left ( 4\,ba{c}^{2}+4\, \left ( 2\,ac+{b}^{2} \right ) bc \right ){x}^{6}}{6}}+{\frac{ \left ( 2\,{a}^{2}{c}^{2}+8\,ac{b}^{2}+ \left ( 2\,ac+{b}^{2} \right ) ^{2} \right ){x}^{5}}{5}}+{\frac{ \left ( 4\,{a}^{2}bc+4\,ab \left ( 2\,ac+{b}^{2} \right ) \right ){x}^{4}}{4}}+{\frac{ \left ( 2\,{a}^{2} \left ( 2\,ac+{b}^{2} \right ) +4\,{b}^{2}{a}^{2} \right ){x}^{3}}{3}}+2\,{a}^{3}b{x}^{2}+{a}^{4}x \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*c^4*x^9+1/2*b*c^3*x^8+1/7*(2*(2*a*c+b^2)*c^2+4*b^2*c^2)*x^7+1/6*(4*b*a*c^2+4*(2*a*c+b^2)*b*c)*x^6+1/5*(2*a
^2*c^2+8*a*c*b^2+(2*a*c+b^2)^2)*x^5+1/4*(4*a^2*b*c+4*a*b*(2*a*c+b^2))*x^4+1/3*(2*a^2*(2*a*c+b^2)+4*b^2*a^2)*x^
3+2*a^3*b*x^2+a^4*x

________________________________________________________________________________________

Maxima [A]  time = 0.998654, size = 184, normalized size = 1.38 \begin{align*} \frac{1}{9} \, c^{4} x^{9} + \frac{1}{2} \, b c^{3} x^{8} + \frac{6}{7} \, b^{2} c^{2} x^{7} + \frac{2}{3} \, b^{3} c x^{6} + \frac{1}{5} \, b^{4} x^{5} + a^{4} x + \frac{2}{3} \,{\left (2 \, c x^{3} + 3 \, b x^{2}\right )} a^{3} + \frac{1}{5} \,{\left (6 \, c^{2} x^{5} + 15 \, b c x^{4} + 10 \, b^{2} x^{3}\right )} a^{2} + \frac{1}{35} \,{\left (20 \, c^{3} x^{7} + 70 \, b c^{2} x^{6} + 84 \, b^{2} c x^{5} + 35 \, b^{3} x^{4}\right )} a \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*c^4*x^9 + 1/2*b*c^3*x^8 + 6/7*b^2*c^2*x^7 + 2/3*b^3*c*x^6 + 1/5*b^4*x^5 + a^4*x + 2/3*(2*c*x^3 + 3*b*x^2)*
a^3 + 1/5*(6*c^2*x^5 + 15*b*c*x^4 + 10*b^2*x^3)*a^2 + 1/35*(20*c^3*x^7 + 70*b*c^2*x^6 + 84*b^2*c*x^5 + 35*b^3*
x^4)*a

________________________________________________________________________________________

Fricas [A]  time = 1.51721, size = 308, normalized size = 2.32 \begin{align*} \frac{1}{9} x^{9} c^{4} + \frac{1}{2} x^{8} c^{3} b + \frac{6}{7} x^{7} c^{2} b^{2} + \frac{4}{7} x^{7} c^{3} a + \frac{2}{3} x^{6} c b^{3} + 2 x^{6} c^{2} b a + \frac{1}{5} x^{5} b^{4} + \frac{12}{5} x^{5} c b^{2} a + \frac{6}{5} x^{5} c^{2} a^{2} + x^{4} b^{3} a + 3 x^{4} c b a^{2} + 2 x^{3} b^{2} a^{2} + \frac{4}{3} x^{3} c a^{3} + 2 x^{2} b a^{3} + x a^{4} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*x^9*c^4 + 1/2*x^8*c^3*b + 6/7*x^7*c^2*b^2 + 4/7*x^7*c^3*a + 2/3*x^6*c*b^3 + 2*x^6*c^2*b*a + 1/5*x^5*b^4 +
12/5*x^5*c*b^2*a + 6/5*x^5*c^2*a^2 + x^4*b^3*a + 3*x^4*c*b*a^2 + 2*x^3*b^2*a^2 + 4/3*x^3*c*a^3 + 2*x^2*b*a^3 +
x*a^4

________________________________________________________________________________________

Sympy [A]  time = 0.082604, size = 141, normalized size = 1.06 \begin{align*} a^{4} x + 2 a^{3} b x^{2} + \frac{b c^{3} x^{8}}{2} + \frac{c^{4} x^{9}}{9} + x^{7} \left (\frac{4 a c^{3}}{7} + \frac{6 b^{2} c^{2}}{7}\right ) + x^{6} \left (2 a b c^{2} + \frac{2 b^{3} c}{3}\right ) + x^{5} \left (\frac{6 a^{2} c^{2}}{5} + \frac{12 a b^{2} c}{5} + \frac{b^{4}}{5}\right ) + x^{4} \left (3 a^{2} b c + a b^{3}\right ) + x^{3} \left (\frac{4 a^{3} c}{3} + 2 a^{2} b^{2}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+b*x+a)**4,x)

[Out]

a**4*x + 2*a**3*b*x**2 + b*c**3*x**8/2 + c**4*x**9/9 + x**7*(4*a*c**3/7 + 6*b**2*c**2/7) + x**6*(2*a*b*c**2 +
2*b**3*c/3) + x**5*(6*a**2*c**2/5 + 12*a*b**2*c/5 + b**4/5) + x**4*(3*a**2*b*c + a*b**3) + x**3*(4*a**3*c/3 +
2*a**2*b**2)

________________________________________________________________________________________

Giac [A]  time = 1.08395, size = 186, normalized size = 1.4 \begin{align*} \frac{1}{9} \, c^{4} x^{9} + \frac{1}{2} \, b c^{3} x^{8} + \frac{6}{7} \, b^{2} c^{2} x^{7} + \frac{4}{7} \, a c^{3} x^{7} + \frac{2}{3} \, b^{3} c x^{6} + 2 \, a b c^{2} x^{6} + \frac{1}{5} \, b^{4} x^{5} + \frac{12}{5} \, a b^{2} c x^{5} + \frac{6}{5} \, a^{2} c^{2} x^{5} + a b^{3} x^{4} + 3 \, a^{2} b c x^{4} + 2 \, a^{2} b^{2} x^{3} + \frac{4}{3} \, a^{3} c x^{3} + 2 \, a^{3} b x^{2} + a^{4} x \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*c^4*x^9 + 1/2*b*c^3*x^8 + 6/7*b^2*c^2*x^7 + 4/7*a*c^3*x^7 + 2/3*b^3*c*x^6 + 2*a*b*c^2*x^6 + 1/5*b^4*x^5 +
12/5*a*b^2*c*x^5 + 6/5*a^2*c^2*x^5 + a*b^3*x^4 + 3*a^2*b*c*x^4 + 2*a^2*b^2*x^3 + 4/3*a^3*c*x^3 + 2*a^3*b*x^2 +
a^4*x