### 3.299 $$\int (3+2 x+5 x^2)^2 (2+x+3 x^2-5 x^3+4 x^4) \, dx$$

Optimal. Leaf size=60 $\frac{100 x^9}{9}-\frac{45 x^8}{8}+\frac{111 x^7}{7}-\frac{37 x^6}{6}+\frac{148 x^5}{5}+\frac{65 x^4}{4}+\frac{107 x^3}{3}+\frac{33 x^2}{2}+18 x$

[Out]

18*x + (33*x^2)/2 + (107*x^3)/3 + (65*x^4)/4 + (148*x^5)/5 - (37*x^6)/6 + (111*x^7)/7 - (45*x^8)/8 + (100*x^9)
/9

________________________________________________________________________________________

Rubi [A]  time = 0.0362729, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 31, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.032, Rules used = {1657} $\frac{100 x^9}{9}-\frac{45 x^8}{8}+\frac{111 x^7}{7}-\frac{37 x^6}{6}+\frac{148 x^5}{5}+\frac{65 x^4}{4}+\frac{107 x^3}{3}+\frac{33 x^2}{2}+18 x$

Antiderivative was successfully veriﬁed.

[In]

Int[(3 + 2*x + 5*x^2)^2*(2 + x + 3*x^2 - 5*x^3 + 4*x^4),x]

[Out]

18*x + (33*x^2)/2 + (107*x^3)/3 + (65*x^4)/4 + (148*x^5)/5 - (37*x^6)/6 + (111*x^7)/7 - (45*x^8)/8 + (100*x^9)
/9

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin{align*} \int \left (3+2 x+5 x^2\right )^2 \left (2+x+3 x^2-5 x^3+4 x^4\right ) \, dx &=\int \left (18+33 x+107 x^2+65 x^3+148 x^4-37 x^5+111 x^6-45 x^7+100 x^8\right ) \, dx\\ &=18 x+\frac{33 x^2}{2}+\frac{107 x^3}{3}+\frac{65 x^4}{4}+\frac{148 x^5}{5}-\frac{37 x^6}{6}+\frac{111 x^7}{7}-\frac{45 x^8}{8}+\frac{100 x^9}{9}\\ \end{align*}

Mathematica [A]  time = 0.0011501, size = 60, normalized size = 1. $\frac{100 x^9}{9}-\frac{45 x^8}{8}+\frac{111 x^7}{7}-\frac{37 x^6}{6}+\frac{148 x^5}{5}+\frac{65 x^4}{4}+\frac{107 x^3}{3}+\frac{33 x^2}{2}+18 x$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(3 + 2*x + 5*x^2)^2*(2 + x + 3*x^2 - 5*x^3 + 4*x^4),x]

[Out]

18*x + (33*x^2)/2 + (107*x^3)/3 + (65*x^4)/4 + (148*x^5)/5 - (37*x^6)/6 + (111*x^7)/7 - (45*x^8)/8 + (100*x^9)
/9

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 45, normalized size = 0.8 \begin{align*} 18\,x+{\frac{33\,{x}^{2}}{2}}+{\frac{107\,{x}^{3}}{3}}+{\frac{65\,{x}^{4}}{4}}+{\frac{148\,{x}^{5}}{5}}-{\frac{37\,{x}^{6}}{6}}+{\frac{111\,{x}^{7}}{7}}-{\frac{45\,{x}^{8}}{8}}+{\frac{100\,{x}^{9}}{9}} \end{align*}

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

[In]

int((5*x^2+2*x+3)^2*(4*x^4-5*x^3+3*x^2+x+2),x)

[Out]

18*x+33/2*x^2+107/3*x^3+65/4*x^4+148/5*x^5-37/6*x^6+111/7*x^7-45/8*x^8+100/9*x^9

________________________________________________________________________________________

Maxima [A]  time = 0.994845, size = 59, normalized size = 0.98 \begin{align*} \frac{100}{9} \, x^{9} - \frac{45}{8} \, x^{8} + \frac{111}{7} \, x^{7} - \frac{37}{6} \, x^{6} + \frac{148}{5} \, x^{5} + \frac{65}{4} \, x^{4} + \frac{107}{3} \, x^{3} + \frac{33}{2} \, x^{2} + 18 \, x \end{align*}

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

[In]

integrate((5*x^2+2*x+3)^2*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="maxima")

[Out]

100/9*x^9 - 45/8*x^8 + 111/7*x^7 - 37/6*x^6 + 148/5*x^5 + 65/4*x^4 + 107/3*x^3 + 33/2*x^2 + 18*x

________________________________________________________________________________________

Fricas [A]  time = 0.915561, size = 132, normalized size = 2.2 \begin{align*} \frac{100}{9} x^{9} - \frac{45}{8} x^{8} + \frac{111}{7} x^{7} - \frac{37}{6} x^{6} + \frac{148}{5} x^{5} + \frac{65}{4} x^{4} + \frac{107}{3} x^{3} + \frac{33}{2} x^{2} + 18 x \end{align*}

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

[In]

integrate((5*x^2+2*x+3)^2*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="fricas")

[Out]

100/9*x^9 - 45/8*x^8 + 111/7*x^7 - 37/6*x^6 + 148/5*x^5 + 65/4*x^4 + 107/3*x^3 + 33/2*x^2 + 18*x

________________________________________________________________________________________

Sympy [A]  time = 0.06944, size = 56, normalized size = 0.93 \begin{align*} \frac{100 x^{9}}{9} - \frac{45 x^{8}}{8} + \frac{111 x^{7}}{7} - \frac{37 x^{6}}{6} + \frac{148 x^{5}}{5} + \frac{65 x^{4}}{4} + \frac{107 x^{3}}{3} + \frac{33 x^{2}}{2} + 18 x \end{align*}

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

[In]

integrate((5*x**2+2*x+3)**2*(4*x**4-5*x**3+3*x**2+x+2),x)

[Out]

100*x**9/9 - 45*x**8/8 + 111*x**7/7 - 37*x**6/6 + 148*x**5/5 + 65*x**4/4 + 107*x**3/3 + 33*x**2/2 + 18*x

________________________________________________________________________________________

Giac [A]  time = 1.15295, size = 59, normalized size = 0.98 \begin{align*} \frac{100}{9} \, x^{9} - \frac{45}{8} \, x^{8} + \frac{111}{7} \, x^{7} - \frac{37}{6} \, x^{6} + \frac{148}{5} \, x^{5} + \frac{65}{4} \, x^{4} + \frac{107}{3} \, x^{3} + \frac{33}{2} \, x^{2} + 18 \, x \end{align*}

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

[In]

integrate((5*x^2+2*x+3)^2*(4*x^4-5*x^3+3*x^2+x+2),x, algorithm="giac")

[Out]

100/9*x^9 - 45/8*x^8 + 111/7*x^7 - 37/6*x^6 + 148/5*x^5 + 65/4*x^4 + 107/3*x^3 + 33/2*x^2 + 18*x