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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0435253, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.143, Rules used = {626, 12, 43} $\frac{c^2 d^2 (d+e x)^{m+3}}{e^3 (m+3)}-\frac{2 c^2 d (d+e x)^{m+4}}{e^3 (m+4)}+\frac{c^2 (d+e x)^{m+5}}{e^3 (m+5)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

Mathematica [A]  time = 0.030712, size = 60, normalized size = 0.87 $\frac{c^2 (d+e x)^{m+3} \left (2 d^2-2 d e (m+3) x+e^2 \left (m^2+7 m+12\right ) x^2\right )}{e^3 (m+3) (m+4) (m+5)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 76, normalized size = 1.1 \begin{align*}{\frac{ \left ( ex+d \right ) ^{3+m} \left ({e}^{2}{m}^{2}{x}^{2}+7\,{e}^{2}m{x}^{2}-2\,demx+12\,{x}^{2}{e}^{2}-6\,dxe+2\,{d}^{2} \right ){c}^{2}}{{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*(c*e*x^2+c*d*x)^2,x)

[Out]

(e*x+d)^(3+m)*(e^2*m^2*x^2+7*e^2*m*x^2-2*d*e*m*x+12*e^2*x^2-6*d*e*x+2*d^2)*c^2/e^3/(m^3+12*m^2+47*m+60)

________________________________________________________________________________________

Maxima [B]  time = 1.30397, size = 436, normalized size = 6.32 \begin{align*} \frac{{\left ({\left (m^{2} + 3 \, m + 2\right )} e^{3} x^{3} +{\left (m^{2} + m\right )} d e^{2} x^{2} - 2 \, d^{2} e m x + 2 \, d^{3}\right )}{\left (e x + d\right )}^{m} c^{2} d^{2}}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} e^{3}} + \frac{2 \,{\left ({\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} e^{4} x^{4} +{\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} d e^{3} x^{3} - 3 \,{\left (m^{2} + m\right )} d^{2} e^{2} x^{2} + 6 \, d^{3} e m x - 6 \, d^{4}\right )}{\left (e x + d\right )}^{m} c^{2} d}{{\left (m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24\right )} e^{3}} + \frac{{\left ({\left (m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24\right )} e^{5} x^{5} +{\left (m^{4} + 6 \, m^{3} + 11 \, m^{2} + 6 \, m\right )} d e^{4} x^{4} - 4 \,{\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} d^{2} e^{3} x^{3} + 12 \,{\left (m^{2} + m\right )} d^{3} e^{2} x^{2} - 24 \, d^{4} e m x + 24 \, d^{5}\right )}{\left (e x + d\right )}^{m} c^{2}}{{\left (m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120\right )} e^{3}} \end{align*}

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

[In]

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

[Out]

((m^2 + 3*m + 2)*e^3*x^3 + (m^2 + m)*d*e^2*x^2 - 2*d^2*e*m*x + 2*d^3)*(e*x + d)^m*c^2*d^2/((m^3 + 6*m^2 + 11*m
+ 6)*e^3) + 2*((m^3 + 6*m^2 + 11*m + 6)*e^4*x^4 + (m^3 + 3*m^2 + 2*m)*d*e^3*x^3 - 3*(m^2 + m)*d^2*e^2*x^2 + 6
*d^3*e*m*x - 6*d^4)*(e*x + d)^m*c^2*d/((m^4 + 10*m^3 + 35*m^2 + 50*m + 24)*e^3) + ((m^4 + 10*m^3 + 35*m^2 + 50
*m + 24)*e^5*x^5 + (m^4 + 6*m^3 + 11*m^2 + 6*m)*d*e^4*x^4 - 4*(m^3 + 3*m^2 + 2*m)*d^2*e^3*x^3 + 12*(m^2 + m)*d
^3*e^2*x^2 - 24*d^4*e*m*x + 24*d^5)*(e*x + d)^m*c^2/((m^5 + 15*m^4 + 85*m^3 + 225*m^2 + 274*m + 120)*e^3)

________________________________________________________________________________________

Fricas [B]  time = 2.09147, size = 394, normalized size = 5.71 \begin{align*} -\frac{{\left (2 \, c^{2} d^{4} e m x - 2 \, c^{2} d^{5} -{\left (c^{2} e^{5} m^{2} + 7 \, c^{2} e^{5} m + 12 \, c^{2} e^{5}\right )} x^{5} -{\left (3 \, c^{2} d e^{4} m^{2} + 19 \, c^{2} d e^{4} m + 30 \, c^{2} d e^{4}\right )} x^{4} -{\left (3 \, c^{2} d^{2} e^{3} m^{2} + 15 \, c^{2} d^{2} e^{3} m + 20 \, c^{2} d^{2} e^{3}\right )} x^{3} -{\left (c^{2} d^{3} e^{2} m^{2} + c^{2} d^{3} e^{2} m\right )} x^{2}\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*(c*e*x^2+c*d*x)^2,x, algorithm="fricas")

[Out]

-(2*c^2*d^4*e*m*x - 2*c^2*d^5 - (c^2*e^5*m^2 + 7*c^2*e^5*m + 12*c^2*e^5)*x^5 - (3*c^2*d*e^4*m^2 + 19*c^2*d*e^4
*m + 30*c^2*d*e^4)*x^4 - (3*c^2*d^2*e^3*m^2 + 15*c^2*d^2*e^3*m + 20*c^2*d^2*e^3)*x^3 - (c^2*d^3*e^2*m^2 + c^2*
d^3*e^2*m)*x^2)*(e*x + d)^m/(e^3*m^3 + 12*e^3*m^2 + 47*e^3*m + 60*e^3)

________________________________________________________________________________________

Sympy [A]  time = 3.87346, size = 1047, normalized size = 15.17 \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*(c*e*x**2+c*d*x)**2,x)

[Out]

Piecewise((c**2*d**2*d**m*x**3/3, Eq(e, 0)), (12*c**2*d**2*log(d/e + x)/(12*d**2*e**3 + 24*d*e**4*x + 12*e**5*
x**2) + 7*c**2*d**2/(12*d**2*e**3 + 24*d*e**4*x + 12*e**5*x**2) + 24*c**2*d*e*x*log(d/e + x)/(12*d**2*e**3 + 2
4*d*e**4*x + 12*e**5*x**2) + 2*c**2*d*e*x/(12*d**2*e**3 + 24*d*e**4*x + 12*e**5*x**2) + 12*c**2*e**2*x**2*log(
d/e + x)/(12*d**2*e**3 + 24*d*e**4*x + 12*e**5*x**2) - 11*c**2*e**2*x**2/(12*d**2*e**3 + 24*d*e**4*x + 12*e**5
*x**2), Eq(m, -5)), (-6*c**2*d**2*log(d/e + x)/(3*d*e**3 + 3*e**4*x) - 5*c**2*d**2/(3*d*e**3 + 3*e**4*x) - 6*c
**2*d*e*x*log(d/e + x)/(3*d*e**3 + 3*e**4*x) + c**2*d*e*x/(3*d*e**3 + 3*e**4*x) + 3*c**2*e**2*x**2/(3*d*e**3 +
3*e**4*x), Eq(m, -4)), (c**2*d**2*log(d/e + x)/e**3 - c**2*d*x/e**2 + c**2*x**2/(2*e), Eq(m, -3)), (2*c**2*d*
*5*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3) - 2*c**2*d**4*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**3*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**3*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**2*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**2*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**2*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*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*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*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*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*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*e**5*x**5*(d + e*x)**m/(e**3*m**3 + 12*e**3*m**2 + 47*e**3*m + 60*e**3), Tru
e))

________________________________________________________________________________________

Giac [B]  time = 1.22437, size = 394, normalized size = 5.71 \begin{align*} \frac{{\left (x e + d\right )}^{m} c^{2} m^{2} x^{5} e^{5} + 3 \,{\left (x e + d\right )}^{m} c^{2} d m^{2} x^{4} e^{4} + 3 \,{\left (x e + d\right )}^{m} c^{2} d^{2} m^{2} x^{3} e^{3} +{\left (x e + d\right )}^{m} c^{2} d^{3} m^{2} x^{2} e^{2} + 7 \,{\left (x e + d\right )}^{m} c^{2} m x^{5} e^{5} + 19 \,{\left (x e + d\right )}^{m} c^{2} d m x^{4} e^{4} + 15 \,{\left (x e + d\right )}^{m} c^{2} d^{2} m x^{3} e^{3} +{\left (x e + d\right )}^{m} c^{2} d^{3} m x^{2} e^{2} - 2 \,{\left (x e + d\right )}^{m} c^{2} d^{4} m x e + 12 \,{\left (x e + d\right )}^{m} c^{2} x^{5} e^{5} + 30 \,{\left (x e + d\right )}^{m} c^{2} d x^{4} e^{4} + 20 \,{\left (x e + d\right )}^{m} c^{2} d^{2} x^{3} e^{3} + 2 \,{\left (x e + d\right )}^{m} c^{2} d^{5}}{m^{3} e^{3} + 12 \, m^{2} e^{3} + 47 \, m e^{3} + 60 \, e^{3}} \end{align*}

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

[In]

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

[Out]

((x*e + d)^m*c^2*m^2*x^5*e^5 + 3*(x*e + d)^m*c^2*d*m^2*x^4*e^4 + 3*(x*e + d)^m*c^2*d^2*m^2*x^3*e^3 + (x*e + d)
^m*c^2*d^3*m^2*x^2*e^2 + 7*(x*e + d)^m*c^2*m*x^5*e^5 + 19*(x*e + d)^m*c^2*d*m*x^4*e^4 + 15*(x*e + d)^m*c^2*d^2
*m*x^3*e^3 + (x*e + d)^m*c^2*d^3*m*x^2*e^2 - 2*(x*e + d)^m*c^2*d^4*m*x*e + 12*(x*e + d)^m*c^2*x^5*e^5 + 30*(x*
e + d)^m*c^2*d*x^4*e^4 + 20*(x*e + d)^m*c^2*d^2*x^3*e^3 + 2*(x*e + d)^m*c^2*d^5)/(m^3*e^3 + 12*m^2*e^3 + 47*m*
e^3 + 60*e^3)