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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0503699, antiderivative size = 90, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 35, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.057, Rules used = {626, 43} $\frac{\left (c d^2-a e^2\right )^2 (d+e x)^{m+3}}{e^3 (m+3)}-\frac{2 c d \left (c d^2-a e^2\right ) (d+e x)^{m+4}}{e^3 (m+4)}+\frac{c^2 d^2 (d+e x)^{m+5}}{e^3 (m+5)}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x)^m*(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 + m))/(e^3*(3 + m)) - (2*c*d*(c*d^2 - a*e^2)*(d + e*x)^(4 + m))/(e^3*(4 + m))
+ (c^2*d^2*(d + e*x)^(5 + m))/(e^3*(5 + m))

Rule 626

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

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 (d+e x)^m \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^2 \, dx &=\int (a e+c d x)^2 (d+e x)^{2+m} \, dx\\ &=\int \left (\frac{\left (-c d^2+a e^2\right )^2 (d+e x)^{2+m}}{e^2}-\frac{2 c d \left (c d^2-a e^2\right ) (d+e x)^{3+m}}{e^2}+\frac{c^2 d^2 (d+e x)^{4+m}}{e^2}\right ) \, dx\\ &=\frac{\left (c d^2-a e^2\right )^2 (d+e x)^{3+m}}{e^3 (3+m)}-\frac{2 c d \left (c d^2-a e^2\right ) (d+e x)^{4+m}}{e^3 (4+m)}+\frac{c^2 d^2 (d+e x)^{5+m}}{e^3 (5+m)}\\ \end{align*}

Mathematica [A]  time = 0.0829189, size = 79, normalized size = 0.88 $\frac{(d+e x)^{m+3} \left (-\frac{2 c d (d+e x) \left (c d^2-a e^2\right )}{m+4}+\frac{\left (c d^2-a e^2\right )^2}{m+3}+\frac{c^2 d^2 (d+e x)^2}{m+5}\right )}{e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 183, normalized size = 2. \begin{align*}{\frac{ \left ( ex+d \right ) ^{3+m} \left ({c}^{2}{d}^{2}{e}^{2}{m}^{2}{x}^{2}+2\,acd{e}^{3}{m}^{2}x+7\,{c}^{2}{d}^{2}{e}^{2}m{x}^{2}+{a}^{2}{e}^{4}{m}^{2}+16\,acd{e}^{3}mx-2\,{c}^{2}{d}^{3}emx+12\,{c}^{2}{d}^{2}{x}^{2}{e}^{2}+9\,{a}^{2}{e}^{4}m-2\,ac{d}^{2}{e}^{2}m+30\,acd{e}^{3}x-6\,{c}^{2}{d}^{3}ex+20\,{a}^{2}{e}^{4}-10\,ac{d}^{2}{e}^{2}+2\,{c}^{2}{d}^{4} \right ) }{{e}^{3} \left ({m}^{3}+12\,{m}^{2}+47\,m+60 \right ) }} \end{align*}

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

[In]

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

[Out]

(e*x+d)^(3+m)*(c^2*d^2*e^2*m^2*x^2+2*a*c*d*e^3*m^2*x+7*c^2*d^2*e^2*m*x^2+a^2*e^4*m^2+16*a*c*d*e^3*m*x-2*c^2*d^
3*e*m*x+12*c^2*d^2*e^2*x^2+9*a^2*e^4*m-2*a*c*d^2*e^2*m+30*a*c*d*e^3*x-6*c^2*d^3*e*x+20*a^2*e^4-10*a*c*d^2*e^2+
2*c^2*d^4)/e^3/(m^3+12*m^2+47*m+60)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.86772, size = 979, normalized size = 10.88 \begin{align*} \frac{{\left (a^{2} d^{3} e^{4} m^{2} + 2 \, c^{2} d^{7} - 10 \, a c d^{5} e^{2} + 20 \, a^{2} d^{3} e^{4} +{\left (c^{2} d^{2} e^{5} m^{2} + 7 \, c^{2} d^{2} e^{5} m + 12 \, c^{2} d^{2} e^{5}\right )} x^{5} +{\left (30 \, c^{2} d^{3} e^{4} + 30 \, a c d e^{6} +{\left (3 \, c^{2} d^{3} e^{4} + 2 \, a c d e^{6}\right )} m^{2} +{\left (19 \, c^{2} d^{3} e^{4} + 16 \, a c d e^{6}\right )} m\right )} x^{4} +{\left (20 \, c^{2} d^{4} e^{3} + 80 \, a c d^{2} e^{5} + 20 \, a^{2} e^{7} +{\left (3 \, c^{2} d^{4} e^{3} + 6 \, a c d^{2} e^{5} + a^{2} e^{7}\right )} m^{2} +{\left (15 \, c^{2} d^{4} e^{3} + 46 \, a c d^{2} e^{5} + 9 \, a^{2} e^{7}\right )} m\right )} x^{3} +{\left (60 \, a c d^{3} e^{4} + 60 \, a^{2} d e^{6} +{\left (c^{2} d^{5} e^{2} + 6 \, a c d^{3} e^{4} + 3 \, a^{2} d e^{6}\right )} m^{2} +{\left (c^{2} d^{5} e^{2} + 42 \, a c d^{3} e^{4} + 27 \, a^{2} d e^{6}\right )} m\right )} x^{2} -{\left (2 \, a c d^{5} e^{2} - 9 \, a^{2} d^{3} e^{4}\right )} m +{\left (60 \, a^{2} d^{2} e^{5} +{\left (2 \, a c d^{4} e^{3} + 3 \, a^{2} d^{2} e^{5}\right )} m^{2} -{\left (2 \, c^{2} d^{6} e - 10 \, a c d^{4} e^{3} - 27 \, a^{2} d^{2} e^{5}\right )} m\right )} x\right )}{\left (e x + d\right )}^{m}}{e^{3} m^{3} + 12 \, e^{3} m^{2} + 47 \, e^{3} m + 60 \, e^{3}} \end{align*}

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

[In]

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

[Out]

(a^2*d^3*e^4*m^2 + 2*c^2*d^7 - 10*a*c*d^5*e^2 + 20*a^2*d^3*e^4 + (c^2*d^2*e^5*m^2 + 7*c^2*d^2*e^5*m + 12*c^2*d
^2*e^5)*x^5 + (30*c^2*d^3*e^4 + 30*a*c*d*e^6 + (3*c^2*d^3*e^4 + 2*a*c*d*e^6)*m^2 + (19*c^2*d^3*e^4 + 16*a*c*d*
e^6)*m)*x^4 + (20*c^2*d^4*e^3 + 80*a*c*d^2*e^5 + 20*a^2*e^7 + (3*c^2*d^4*e^3 + 6*a*c*d^2*e^5 + a^2*e^7)*m^2 +
(15*c^2*d^4*e^3 + 46*a*c*d^2*e^5 + 9*a^2*e^7)*m)*x^3 + (60*a*c*d^3*e^4 + 60*a^2*d*e^6 + (c^2*d^5*e^2 + 6*a*c*d
^3*e^4 + 3*a^2*d*e^6)*m^2 + (c^2*d^5*e^2 + 42*a*c*d^3*e^4 + 27*a^2*d*e^6)*m)*x^2 - (2*a*c*d^5*e^2 - 9*a^2*d^3*
e^4)*m + (60*a^2*d^2*e^5 + (2*a*c*d^4*e^3 + 3*a^2*d^2*e^5)*m^2 - (2*c^2*d^6*e - 10*a*c*d^4*e^3 - 27*a^2*d^2*e^
5)*m)*x)*(e*x + d)^m/(e^3*m^3 + 12*e^3*m^2 + 47*e^3*m + 60*e^3)

________________________________________________________________________________________

Sympy [A]  time = 4.90235, size = 2839, normalized size = 31.54 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

Piecewise((c**2*d**4*d**m*x**3/3, Eq(e, 0)), (-5*a**2*d**2*e**4/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*
x**2) + 2*a**2*d*e**5*x/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) + a**2*e**6*x**2/(12*d**4*e**3 + 2
4*d**3*e**4*x + 12*d**2*e**5*x**2) - 2*a*c*d**4*e**2/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) - 4*a
*c*d**3*e**3*x/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) + 10*a*c*d**2*e**4*x**2/(12*d**4*e**3 + 24*
d**3*e**4*x + 12*d**2*e**5*x**2) + 12*c**2*d**6*log(d/e + x)/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**
2) + 7*c**2*d**6/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) + 24*c**2*d**5*e*x*log(d/e + x)/(12*d**4*
e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) + 2*c**2*d**5*e*x/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**
2) + 12*c**2*d**4*e**2*x**2*log(d/e + x)/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2) - 11*c**2*d**4*e*
*2*x**2/(12*d**4*e**3 + 24*d**3*e**4*x + 12*d**2*e**5*x**2), Eq(m, -5)), (-2*a**2*d*e**4/(3*d**2*e**3 + 3*d*e*
*4*x) + a**2*e**5*x/(3*d**2*e**3 + 3*d*e**4*x) + 6*a*c*d**3*e**2*log(d/e + x)/(3*d**2*e**3 + 3*d*e**4*x) + 4*a
*c*d**3*e**2/(3*d**2*e**3 + 3*d*e**4*x) + 6*a*c*d**2*e**3*x*log(d/e + x)/(3*d**2*e**3 + 3*d*e**4*x) - 2*a*c*d*
*2*e**3*x/(3*d**2*e**3 + 3*d*e**4*x) - 6*c**2*d**5*log(d/e + x)/(3*d**2*e**3 + 3*d*e**4*x) - 5*c**2*d**5/(3*d*
*2*e**3 + 3*d*e**4*x) - 6*c**2*d**4*e*x*log(d/e + x)/(3*d**2*e**3 + 3*d*e**4*x) + c**2*d**4*e*x/(3*d**2*e**3 +
3*d*e**4*x) + 3*c**2*d**3*e**2*x**2/(3*d**2*e**3 + 3*d*e**4*x), Eq(m, -4)), (a**2*e*log(d/e + x) - 2*a*c*d**2
*log(d/e + x)/e + 2*a*c*d*x + c**2*d**4*log(d/e + x)/e**3 - c**2*d**3*x/e**2 + c**2*d**2*x**2/(2*e), Eq(m, -3)
), (a**2*d**3*e**4*m**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 9*a**2*d**3*e**4*m*(d
+ e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 20*a**2*d**3*e**4*(d + e*x)**m/(e**3*m**3 + 12*e*
*3*m**2 + 47*e**3*m + 60*e**3) + 3*a**2*d**2*e**5*m**2*x*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m +
60*e**3) + 27*a**2*d**2*e**5*m*x*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 60*a**2*d**2*
e**5*x*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 3*a**2*d*e**6*m**2*x**2*(d + e*x)**m/(e
**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 27*a**2*d*e**6*m*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2
+ 47*e**3*m + 60*e**3) + 60*a**2*d*e**6*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + a
**2*e**7*m**2*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 9*a**2*e**7*m*x**3*(d + e*x
)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 20*a**2*e**7*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*m*
*2 + 47*e**3*m + 60*e**3) - 2*a*c*d**5*e**2*m*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) -
10*a*c*d**5*e**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 2*a*c*d**4*e**3*m**2*x*(d + e
*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 10*a*c*d**4*e**3*m*x*(d + e*x)**m/(e**3*m**3 + 12*e*
*3*m**2 + 47*e**3*m + 60*e**3) + 6*a*c*d**3*e**4*m**2*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m
+ 60*e**3) + 42*a*c*d**3*e**4*m*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 60*a*c*d*
*3*e**4*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 6*a*c*d**2*e**5*m**2*x**3*(d + e*
x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 46*a*c*d**2*e**5*m*x**3*(d + e*x)**m/(e**3*m**3 + 12*
e**3*m**2 + 47*e**3*m + 60*e**3) + 80*a*c*d**2*e**5*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m +
60*e**3) + 2*a*c*d*e**6*m**2*x**4*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 16*a*c*d*e**
6*m*x**4*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 30*a*c*d*e**6*x**4*(d + e*x)**m/(e**3
*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 2*c**2*d**7*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m +
60*e**3) - 2*c**2*d**6*e*m*x*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + c**2*d**5*e**2*m
**2*x**2*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + c**2*d**5*e**2*m*x**2*(d + e*x)**m/(e
**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 3*c**2*d**4*e**3*m**2*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*
m**2 + 47*e**3*m + 60*e**3) + 15*c**2*d**4*e**3*m*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60
*e**3) + 20*c**2*d**4*e**3*x**3*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 3*c**2*d**3*e*
*4*m**2*x**4*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 19*c**2*d**3*e**4*m*x**4*(d + e*x
)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 30*c**2*d**3*e**4*x**4*(d + e*x)**m/(e**3*m**3 + 12*e*
*3*m**2 + 47*e**3*m + 60*e**3) + c**2*d**2*e**5*m**2*x**5*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m +
60*e**3) + 7*c**2*d**2*e**5*m*x**5*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) + 12*c**2*d*
*2*e**5*x**5*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3), True))

________________________________________________________________________________________

Giac [B]  time = 1.19131, size = 1085, normalized size = 12.06 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

((x*e + d)^m*c^2*d^2*m^2*x^5*e^5 + 3*(x*e + d)^m*c^2*d^3*m^2*x^4*e^4 + 3*(x*e + d)^m*c^2*d^4*m^2*x^3*e^3 + (x*
e + d)^m*c^2*d^5*m^2*x^2*e^2 + 7*(x*e + d)^m*c^2*d^2*m*x^5*e^5 + 19*(x*e + d)^m*c^2*d^3*m*x^4*e^4 + 15*(x*e +
d)^m*c^2*d^4*m*x^3*e^3 + (x*e + d)^m*c^2*d^5*m*x^2*e^2 - 2*(x*e + d)^m*c^2*d^6*m*x*e + 2*(x*e + d)^m*a*c*d*m^2
*x^4*e^6 + 6*(x*e + d)^m*a*c*d^2*m^2*x^3*e^5 + 12*(x*e + d)^m*c^2*d^2*x^5*e^5 + 6*(x*e + d)^m*a*c*d^3*m^2*x^2*
e^4 + 30*(x*e + d)^m*c^2*d^3*x^4*e^4 + 2*(x*e + d)^m*a*c*d^4*m^2*x*e^3 + 20*(x*e + d)^m*c^2*d^4*x^3*e^3 + 2*(x
*e + d)^m*c^2*d^7 + 16*(x*e + d)^m*a*c*d*m*x^4*e^6 + 46*(x*e + d)^m*a*c*d^2*m*x^3*e^5 + 42*(x*e + d)^m*a*c*d^3
*m*x^2*e^4 + 10*(x*e + d)^m*a*c*d^4*m*x*e^3 - 2*(x*e + d)^m*a*c*d^5*m*e^2 + (x*e + d)^m*a^2*m^2*x^3*e^7 + 3*(x
*e + d)^m*a^2*d*m^2*x^2*e^6 + 30*(x*e + d)^m*a*c*d*x^4*e^6 + 3*(x*e + d)^m*a^2*d^2*m^2*x*e^5 + 80*(x*e + d)^m*
a*c*d^2*x^3*e^5 + (x*e + d)^m*a^2*d^3*m^2*e^4 + 60*(x*e + d)^m*a*c*d^3*x^2*e^4 - 10*(x*e + d)^m*a*c*d^5*e^2 +
9*(x*e + d)^m*a^2*m*x^3*e^7 + 27*(x*e + d)^m*a^2*d*m*x^2*e^6 + 27*(x*e + d)^m*a^2*d^2*m*x*e^5 + 9*(x*e + d)^m*
a^2*d^3*m*e^4 + 20*(x*e + d)^m*a^2*x^3*e^7 + 60*(x*e + d)^m*a^2*d*x^2*e^6 + 60*(x*e + d)^m*a^2*d^2*x*e^5 + 20*
(x*e + d)^m*a^2*d^3*e^4)/(m^3*e^3 + 12*m^2*e^3 + 47*m*e^3 + 60*e^3)