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

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

[Out]

((c*d^2 - b*d*e + a*e^2)*(d + e*x)^(1 + m))/(e^3*(1 + m)) - ((2*c*d - b*e)*(d + e*x)^(2 + m))/(e^3*(2 + m)) +
(c*(d + e*x)^(3 + m))/(e^3*(3 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0447129, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 18, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.056, Rules used = {698} $\frac{(d+e x)^{m+1} \left (a e^2-b d e+c d^2\right )}{e^3 (m+1)}-\frac{(2 c d-b e) (d+e x)^{m+2}}{e^3 (m+2)}+\frac{c (d+e x)^{m+3}}{e^3 (m+3)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((c*d^2 - b*d*e + a*e^2)*(d + e*x)^(1 + m))/(e^3*(1 + m)) - ((2*c*d - b*e)*(d + e*x)^(2 + m))/(e^3*(2 + m)) +
(c*(d + e*x)^(3 + m))/(e^3*(3 + m))

Rule 698

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] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

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

Mathematica [A]  time = 0.0820852, size = 83, normalized size = 1.01 $\frac{(d+e x)^{m+1} \left (c d^2-e (b d-a e)\right )}{e^3 (m+1)}-\frac{(2 c d-b e) (d+e x)^{m+2}}{e^3 (m+2)}+\frac{c (d+e x)^{m+3}}{e^3 (m+3)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((c*d^2 - e*(b*d - a*e))*(d + e*x)^(1 + m))/(e^3*(1 + m)) - ((2*c*d - b*e)*(d + e*x)^(2 + m))/(e^3*(2 + m)) +
(c*(d + e*x)^(3 + m))/(e^3*(3 + m))

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 135, normalized size = 1.7 \begin{align*}{\frac{ \left ( ex+d \right ) ^{1+m} \left ( c{e}^{2}{m}^{2}{x}^{2}+b{e}^{2}{m}^{2}x+3\,c{e}^{2}m{x}^{2}+a{e}^{2}{m}^{2}+4\,b{e}^{2}mx-2\,cdemx+2\,c{e}^{2}{x}^{2}+5\,a{e}^{2}m-bdem+3\,xb{e}^{2}-2\,cdex+6\,a{e}^{2}-3\,bde+2\,c{d}^{2} \right ) }{{e}^{3} \left ({m}^{3}+6\,{m}^{2}+11\,m+6 \right ) }} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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*(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.59161, size = 416, normalized size = 5.07 \begin{align*} \frac{{\left (a d e^{2} m^{2} + 2 \, c d^{3} - 3 \, b d^{2} e + 6 \, a d e^{2} +{\left (c e^{3} m^{2} + 3 \, c e^{3} m + 2 \, c e^{3}\right )} x^{3} +{\left (3 \, b e^{3} +{\left (c d e^{2} + b e^{3}\right )} m^{2} +{\left (c d e^{2} + 4 \, b e^{3}\right )} m\right )} x^{2} -{\left (b d^{2} e - 5 \, a d e^{2}\right )} m +{\left (6 \, a e^{3} +{\left (b d e^{2} + a e^{3}\right )} m^{2} -{\left (2 \, c d^{2} e - 3 \, b d e^{2} - 5 \, a e^{3}\right )} m\right )} x\right )}{\left (e x + d\right )}^{m}}{e^{3} m^{3} + 6 \, e^{3} m^{2} + 11 \, e^{3} m + 6 \, e^{3}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 2.03763, size = 1416, normalized size = 17.27 \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*x**2+b*x+a),x)

[Out]

Piecewise((d**m*(a*x + b*x**2/2 + c*x**3/3), Eq(e, 0)), (-a*e**2/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) - b*
d*e/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) - 2*b*e**2*x/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 2*c*d**2*
log(d/e + x)/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 3*c*d**2/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 4*
c*d*e*x*log(d/e + x)/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 4*c*d*e*x/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x
**2) + 2*c*e**2*x**2*log(d/e + x)/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2), Eq(m, -3)), (-a*e**2/(d*e**3 + e**
4*x) + b*d*e*log(d/e + x)/(d*e**3 + e**4*x) + b*d*e/(d*e**3 + e**4*x) + b*e**2*x*log(d/e + x)/(d*e**3 + e**4*x
) - 2*c*d**2*log(d/e + x)/(d*e**3 + e**4*x) - 2*c*d**2/(d*e**3 + e**4*x) - 2*c*d*e*x*log(d/e + x)/(d*e**3 + e*
*4*x) + c*e**2*x**2/(d*e**3 + e**4*x), Eq(m, -2)), (a*log(d/e + x)/e - b*d*log(d/e + x)/e**2 + b*x/e + c*d**2*
log(d/e + x)/e**3 - c*d*x/e**2 + c*x**2/(2*e), Eq(m, -1)), (a*d*e**2*m**2*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**
2 + 11*e**3*m + 6*e**3) + 5*a*d*e**2*m*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 6*a*d*e**
2*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + a*e**3*m**2*x*(d + e*x)**m/(e**3*m**3 + 6*e**3
*m**2 + 11*e**3*m + 6*e**3) + 5*a*e**3*m*x*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 6*a*e
**3*x*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) - b*d**2*e*m*(d + e*x)**m/(e**3*m**3 + 6*e**
3*m**2 + 11*e**3*m + 6*e**3) - 3*b*d**2*e*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + b*d*e*
*2*m**2*x*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 3*b*d*e**2*m*x*(d + e*x)**m/(e**3*m**3
+ 6*e**3*m**2 + 11*e**3*m + 6*e**3) + b*e**3*m**2*x**2*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*
e**3) + 4*b*e**3*m*x**2*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 3*b*e**3*x**2*(d + e*x)*
*m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 2*c*d**3*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m
+ 6*e**3) - 2*c*d**2*e*m*x*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + c*d*e**2*m**2*x**2*(
d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + c*d*e**2*m*x**2*(d + e*x)**m/(e**3*m**3 + 6*e**3*
m**2 + 11*e**3*m + 6*e**3) + c*e**3*m**2*x**3*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 3*
c*e**3*m*x**3*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 2*c*e**3*x**3*(d + e*x)**m/(e**3*m
**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3), True))

________________________________________________________________________________________

Giac [B]  time = 1.16598, size = 477, normalized size = 5.82 \begin{align*} \frac{{\left (x e + d\right )}^{m} c m^{2} x^{3} e^{3} +{\left (x e + d\right )}^{m} c d m^{2} x^{2} e^{2} +{\left (x e + d\right )}^{m} b m^{2} x^{2} e^{3} + 3 \,{\left (x e + d\right )}^{m} c m x^{3} e^{3} +{\left (x e + d\right )}^{m} b d m^{2} x e^{2} +{\left (x e + d\right )}^{m} c d m x^{2} e^{2} - 2 \,{\left (x e + d\right )}^{m} c d^{2} m x e +{\left (x e + d\right )}^{m} a m^{2} x e^{3} + 4 \,{\left (x e + d\right )}^{m} b m x^{2} e^{3} + 2 \,{\left (x e + d\right )}^{m} c x^{3} e^{3} +{\left (x e + d\right )}^{m} a d m^{2} e^{2} + 3 \,{\left (x e + d\right )}^{m} b d m x e^{2} -{\left (x e + d\right )}^{m} b d^{2} m e + 2 \,{\left (x e + d\right )}^{m} c d^{3} + 5 \,{\left (x e + d\right )}^{m} a m x e^{3} + 3 \,{\left (x e + d\right )}^{m} b x^{2} e^{3} + 5 \,{\left (x e + d\right )}^{m} a d m e^{2} - 3 \,{\left (x e + d\right )}^{m} b d^{2} e + 6 \,{\left (x e + d\right )}^{m} a x e^{3} + 6 \,{\left (x e + d\right )}^{m} a d e^{2}}{m^{3} e^{3} + 6 \, m^{2} e^{3} + 11 \, m e^{3} + 6 \, e^{3}} \end{align*}

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

[In]

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

[Out]

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