3.1111 $$\int (b d+2 c d x)^2 (a+b x+c x^2) \, dx$$

Optimal. Leaf size=45 $\frac{d^2 (b+2 c x)^5}{40 c^2}-\frac{d^2 \left (b^2-4 a c\right ) (b+2 c x)^3}{24 c^2}$

[Out]

-((b^2 - 4*a*c)*d^2*(b + 2*c*x)^3)/(24*c^2) + (d^2*(b + 2*c*x)^5)/(40*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0397384, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 22, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.045, Rules used = {683} $\frac{d^2 (b+2 c x)^5}{40 c^2}-\frac{d^2 \left (b^2-4 a c\right ) (b+2 c x)^3}{24 c^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((b^2 - 4*a*c)*d^2*(b + 2*c*x)^3)/(24*c^2) + (d^2*(b + 2*c*x)^5)/(40*c^2)

Rule 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rubi steps

\begin{align*} \int (b d+2 c d x)^2 \left (a+b x+c x^2\right ) \, dx &=\int \left (\frac{\left (-b^2+4 a c\right ) (b d+2 c d x)^2}{4 c}+\frac{(b d+2 c d x)^4}{4 c d^2}\right ) \, dx\\ &=-\frac{\left (b^2-4 a c\right ) d^2 (b+2 c x)^3}{24 c^2}+\frac{d^2 (b+2 c x)^5}{40 c^2}\\ \end{align*}

Mathematica [A]  time = 0.0099655, size = 64, normalized size = 1.42 $d^2 \left (\frac{1}{3} c x^3 \left (4 a c+5 b^2\right )+\frac{1}{2} b x^2 \left (4 a c+b^2\right )+a b^2 x+2 b c^2 x^4+\frac{4 c^3 x^5}{5}\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

d^2*(a*b^2*x + (b*(b^2 + 4*a*c)*x^2)/2 + (c*(5*b^2 + 4*a*c)*x^3)/3 + 2*b*c^2*x^4 + (4*c^3*x^5)/5)

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 79, normalized size = 1.8 \begin{align*}{\frac{4\,{c}^{3}{d}^{2}{x}^{5}}{5}}+2\,b{d}^{2}{c}^{2}{x}^{4}+{\frac{ \left ( 4\,{c}^{2}{d}^{2}a+5\,{b}^{2}{d}^{2}c \right ){x}^{3}}{3}}+{\frac{ \left ( 4\,b{d}^{2}ca+{b}^{3}{d}^{2} \right ){x}^{2}}{2}}+{b}^{2}{d}^{2}ax \end{align*}

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

[In]

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

[Out]

4/5*c^3*d^2*x^5+2*b*d^2*c^2*x^4+1/3*(4*a*c^2*d^2+5*b^2*c*d^2)*x^3+1/2*(4*a*b*c*d^2+b^3*d^2)*x^2+b^2*d^2*a*x

________________________________________________________________________________________

Maxima [A]  time = 1.26757, size = 96, normalized size = 2.13 \begin{align*} \frac{4}{5} \, c^{3} d^{2} x^{5} + 2 \, b c^{2} d^{2} x^{4} + a b^{2} d^{2} x + \frac{1}{3} \,{\left (5 \, b^{2} c + 4 \, a c^{2}\right )} d^{2} x^{3} + \frac{1}{2} \,{\left (b^{3} + 4 \, a b c\right )} d^{2} x^{2} \end{align*}

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

[In]

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

[Out]

4/5*c^3*d^2*x^5 + 2*b*c^2*d^2*x^4 + a*b^2*d^2*x + 1/3*(5*b^2*c + 4*a*c^2)*d^2*x^3 + 1/2*(b^3 + 4*a*b*c)*d^2*x^
2

________________________________________________________________________________________

Fricas [A]  time = 1.968, size = 169, normalized size = 3.76 \begin{align*} \frac{4}{5} x^{5} d^{2} c^{3} + 2 x^{4} d^{2} c^{2} b + \frac{5}{3} x^{3} d^{2} c b^{2} + \frac{4}{3} x^{3} d^{2} c^{2} a + \frac{1}{2} x^{2} d^{2} b^{3} + 2 x^{2} d^{2} c b a + x d^{2} b^{2} a \end{align*}

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

[In]

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

[Out]

4/5*x^5*d^2*c^3 + 2*x^4*d^2*c^2*b + 5/3*x^3*d^2*c*b^2 + 4/3*x^3*d^2*c^2*a + 1/2*x^2*d^2*b^3 + 2*x^2*d^2*c*b*a
+ x*d^2*b^2*a

________________________________________________________________________________________

Sympy [B]  time = 0.084387, size = 85, normalized size = 1.89 \begin{align*} a b^{2} d^{2} x + 2 b c^{2} d^{2} x^{4} + \frac{4 c^{3} d^{2} x^{5}}{5} + x^{3} \left (\frac{4 a c^{2} d^{2}}{3} + \frac{5 b^{2} c d^{2}}{3}\right ) + x^{2} \left (2 a b c d^{2} + \frac{b^{3} d^{2}}{2}\right ) \end{align*}

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

[In]

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

[Out]

a*b**2*d**2*x + 2*b*c**2*d**2*x**4 + 4*c**3*d**2*x**5/5 + x**3*(4*a*c**2*d**2/3 + 5*b**2*c*d**2/3) + x**2*(2*a
*b*c*d**2 + b**3*d**2/2)

________________________________________________________________________________________

Giac [A]  time = 1.19415, size = 107, normalized size = 2.38 \begin{align*} \frac{4}{5} \, c^{3} d^{2} x^{5} + 2 \, b c^{2} d^{2} x^{4} + \frac{5}{3} \, b^{2} c d^{2} x^{3} + \frac{4}{3} \, a c^{2} d^{2} x^{3} + \frac{1}{2} \, b^{3} d^{2} x^{2} + 2 \, a b c d^{2} x^{2} + a b^{2} d^{2} x \end{align*}

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

[In]

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

[Out]

4/5*c^3*d^2*x^5 + 2*b*c^2*d^2*x^4 + 5/3*b^2*c*d^2*x^3 + 4/3*a*c^2*d^2*x^3 + 1/2*b^3*d^2*x^2 + 2*a*b*c*d^2*x^2
+ a*b^2*d^2*x