### 3.1841 $$\int (a d e+(c d^2+a e^2) x+c d e x^2)^2 \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0882099, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 27, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.074, Rules used = {610, 43} $-\frac{c d (d+e x)^4 \left (c d^2-a e^2\right )}{2 e^3}+\frac{(d+e x)^3 \left (c d^2-a e^2\right )^2}{3 e^3}+\frac{c^2 d^2 (d+e x)^5}{5 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 610

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[1/c^p, Int[Simp[
b/2 - q/2 + c*x, x]^p*Simp[b/2 + q/2 + c*x, x]^p, x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && IGt
Q[p, 0] && PerfectSquareQ[b^2 - 4*a*c]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

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

Mathematica [A]  time = 0.0242541, size = 87, normalized size = 1.13 $\frac{1}{30} x \left (10 a^2 e^2 \left (3 d^2+3 d e x+e^2 x^2\right )+5 a c d e x \left (6 d^2+8 d e x+3 e^2 x^2\right )+c^2 d^2 x^2 \left (10 d^2+15 d e x+6 e^2 x^2\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(x*(10*a^2*e^2*(3*d^2 + 3*d*e*x + e^2*x^2) + 5*a*c*d*e*x*(6*d^2 + 8*d*e*x + 3*e^2*x^2) + c^2*d^2*x^2*(10*d^2 +
15*d*e*x + 6*e^2*x^2)))/30

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 93, normalized size = 1.2 \begin{align*}{\frac{{d}^{2}{e}^{2}{c}^{2}{x}^{5}}{5}}+{\frac{ \left ( a{e}^{2}+c{d}^{2} \right ) dec{x}^{4}}{2}}+{\frac{ \left ( 2\,ac{d}^{2}{e}^{2}+ \left ( a{e}^{2}+c{d}^{2} \right ) ^{2} \right ){x}^{3}}{3}}+ade \left ( a{e}^{2}+c{d}^{2} \right ){x}^{2}+{a}^{2}{d}^{2}{e}^{2}x \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.37704, size = 225, normalized size = 2.92 \begin{align*} \frac{1}{5} x^{5} e^{2} d^{2} c^{2} + \frac{1}{2} x^{4} e d^{3} c^{2} + \frac{1}{2} x^{4} e^{3} d c a + \frac{1}{3} x^{3} d^{4} c^{2} + \frac{4}{3} x^{3} e^{2} d^{2} c a + \frac{1}{3} x^{3} e^{4} a^{2} + x^{2} e d^{3} c a + x^{2} e^{3} d a^{2} + x e^{2} d^{2} a^{2} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.119938, size = 104, normalized size = 1.35 \begin{align*} a^{2} d^{2} e^{2} x + \frac{c^{2} d^{2} e^{2} x^{5}}{5} + x^{4} \left (\frac{a c d e^{3}}{2} + \frac{c^{2} d^{3} e}{2}\right ) + x^{3} \left (\frac{a^{2} e^{4}}{3} + \frac{4 a c d^{2} e^{2}}{3} + \frac{c^{2} d^{4}}{3}\right ) + x^{2} \left (a^{2} d e^{3} + a c d^{3} e\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.18371, size = 136, normalized size = 1.77 \begin{align*} \frac{1}{5} \, c^{2} d^{2} x^{5} e^{2} + \frac{1}{2} \, c^{2} d^{3} x^{4} e + \frac{1}{3} \, c^{2} d^{4} x^{3} + \frac{1}{2} \, a c d x^{4} e^{3} + \frac{4}{3} \, a c d^{2} x^{3} e^{2} + a c d^{3} x^{2} e + \frac{1}{3} \, a^{2} x^{3} e^{4} + a^{2} d x^{2} e^{3} + a^{2} d^{2} x e^{2} \end{align*}

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

[In]

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

[Out]

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