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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0331921, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.083, Rules used = {27, 43} $\frac{(b d-a e)^2 (d+e x)^{m+1}}{e^3 (m+1)}-\frac{2 b (b d-a e) (d+e x)^{m+2}}{e^3 (m+2)}+\frac{b^2 (d+e x)^{m+3}}{e^3 (m+3)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 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^2+2 a b x+b^2 x^2\right ) \, dx &=\int (a+b x)^2 (d+e x)^m \, dx\\ &=\int \left (\frac{(-b d+a e)^2 (d+e x)^m}{e^2}-\frac{2 b (b d-a e) (d+e x)^{1+m}}{e^2}+\frac{b^2 (d+e x)^{2+m}}{e^2}\right ) \, dx\\ &=\frac{(b d-a e)^2 (d+e x)^{1+m}}{e^3 (1+m)}-\frac{2 b (b d-a e) (d+e x)^{2+m}}{e^3 (2+m)}+\frac{b^2 (d+e x)^{3+m}}{e^3 (3+m)}\\ \end{align*}

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.047, size = 159, normalized size = 2. \begin{align*}{\frac{ \left ( ex+d \right ) ^{1+m} \left ({b}^{2}{e}^{2}{m}^{2}{x}^{2}+2\,ab{e}^{2}{m}^{2}x+3\,{b}^{2}{e}^{2}m{x}^{2}+{a}^{2}{e}^{2}{m}^{2}+8\,ab{e}^{2}mx-2\,{b}^{2}demx+2\,{b}^{2}{x}^{2}{e}^{2}+5\,{a}^{2}{e}^{2}m-2\,abdem+6\,ab{e}^{2}x-2\,x{b}^{2}de+6\,{a}^{2}{e}^{2}-6\,abde+2\,{b}^{2}{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*(b^2*x^2+2*a*b*x+a^2),x)

[Out]

(e*x+d)^(1+m)*(b^2*e^2*m^2*x^2+2*a*b*e^2*m^2*x+3*b^2*e^2*m*x^2+a^2*e^2*m^2+8*a*b*e^2*m*x-2*b^2*d*e*m*x+2*b^2*e
^2*x^2+5*a^2*e^2*m-2*a*b*d*e*m+6*a*b*e^2*x-2*b^2*d*e*x+6*a^2*e^2-6*a*b*d*e+2*b^2*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*(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.75875, size = 478, normalized size = 6.13 \begin{align*} \frac{{\left (a^{2} d e^{2} m^{2} + 2 \, b^{2} d^{3} - 6 \, a b d^{2} e + 6 \, a^{2} d e^{2} +{\left (b^{2} e^{3} m^{2} + 3 \, b^{2} e^{3} m + 2 \, b^{2} e^{3}\right )} x^{3} +{\left (6 \, a b e^{3} +{\left (b^{2} d e^{2} + 2 \, a b e^{3}\right )} m^{2} +{\left (b^{2} d e^{2} + 8 \, a b e^{3}\right )} m\right )} x^{2} -{\left (2 \, a b d^{2} e - 5 \, a^{2} d e^{2}\right )} m +{\left (6 \, a^{2} e^{3} +{\left (2 \, a b d e^{2} + a^{2} e^{3}\right )} m^{2} -{\left (2 \, b^{2} d^{2} e - 6 \, a b d e^{2} - 5 \, a^{2} 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*(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")

[Out]

(a^2*d*e^2*m^2 + 2*b^2*d^3 - 6*a*b*d^2*e + 6*a^2*d*e^2 + (b^2*e^3*m^2 + 3*b^2*e^3*m + 2*b^2*e^3)*x^3 + (6*a*b*
e^3 + (b^2*d*e^2 + 2*a*b*e^3)*m^2 + (b^2*d*e^2 + 8*a*b*e^3)*m)*x^2 - (2*a*b*d^2*e - 5*a^2*d*e^2)*m + (6*a^2*e^
3 + (2*a*b*d*e^2 + a^2*e^3)*m^2 - (2*b^2*d^2*e - 6*a*b*d*e^2 - 5*a^2*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.07865, size = 1506, normalized size = 19.31 \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*(b**2*x**2+2*a*b*x+a**2),x)

[Out]

Piecewise((d**m*(a**2*x + a*b*x**2 + b**2*x**3/3), Eq(e, 0)), (-a**2*e**2/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x
**2) - 2*a*b*d*e/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) - 4*a*b*e**2*x/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x*
*2) + 2*b**2*d**2*log(d/e + x)/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 3*b**2*d**2/(2*d**2*e**3 + 4*d*e**4*
x + 2*e**5*x**2) + 4*b**2*d*e*x*log(d/e + x)/(2*d**2*e**3 + 4*d*e**4*x + 2*e**5*x**2) + 4*b**2*d*e*x/(2*d**2*e
**3 + 4*d*e**4*x + 2*e**5*x**2) + 2*b**2*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**2*e**2/(d*e**3 + e**4*x) + 2*a*b*d*e*log(d/e + x)/(d*e**3 + e**4*x) + 2*a*b*d*e/(d*e**3 + e**4*x)
+ 2*a*b*e**2*x*log(d/e + x)/(d*e**3 + e**4*x) - 2*b**2*d**2*log(d/e + x)/(d*e**3 + e**4*x) - 2*b**2*d**2/(d*e
**3 + e**4*x) - 2*b**2*d*e*x*log(d/e + x)/(d*e**3 + e**4*x) + b**2*e**2*x**2/(d*e**3 + e**4*x), Eq(m, -2)), (a
**2*log(d/e + x)/e - 2*a*b*d*log(d/e + x)/e**2 + 2*a*b*x/e + b**2*d**2*log(d/e + x)/e**3 - b**2*d*x/e**2 + b**
2*x**2/(2*e), Eq(m, -1)), (a**2*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*
*2*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**2*d*e**2*(d + e*x)**m/(e**3*m**
3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + a**2*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**2*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**2*e**3*x*(d + e*x)
**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) - 2*a*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) - 6*a*b*d**2*e*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 11*e**3*m + 6*e**3) + 2*a*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) + 6*a*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) + 2*a*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) + 8*a*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) + 6*a*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*b**2*d**3*(d + e*x)**m/(e**3*m**3 + 6*e**3*m**2 + 1
1*e**3*m + 6*e**3) - 2*b**2*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) + b**2*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) + b**2*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) + b**2*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*b**2*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*b**2*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.20745, size = 524, normalized size = 6.72 \begin{align*} \frac{{\left (x e + d\right )}^{m} b^{2} m^{2} x^{3} e^{3} +{\left (x e + d\right )}^{m} b^{2} d m^{2} x^{2} e^{2} + 2 \,{\left (x e + d\right )}^{m} a b m^{2} x^{2} e^{3} + 3 \,{\left (x e + d\right )}^{m} b^{2} m x^{3} e^{3} + 2 \,{\left (x e + d\right )}^{m} a b d m^{2} x e^{2} +{\left (x e + d\right )}^{m} b^{2} d m x^{2} e^{2} - 2 \,{\left (x e + d\right )}^{m} b^{2} d^{2} m x e +{\left (x e + d\right )}^{m} a^{2} m^{2} x e^{3} + 8 \,{\left (x e + d\right )}^{m} a b m x^{2} e^{3} + 2 \,{\left (x e + d\right )}^{m} b^{2} x^{3} e^{3} +{\left (x e + d\right )}^{m} a^{2} d m^{2} e^{2} + 6 \,{\left (x e + d\right )}^{m} a b d m x e^{2} - 2 \,{\left (x e + d\right )}^{m} a b d^{2} m e + 2 \,{\left (x e + d\right )}^{m} b^{2} d^{3} + 5 \,{\left (x e + d\right )}^{m} a^{2} m x e^{3} + 6 \,{\left (x e + d\right )}^{m} a b x^{2} e^{3} + 5 \,{\left (x e + d\right )}^{m} a^{2} d m e^{2} - 6 \,{\left (x e + d\right )}^{m} a b d^{2} e + 6 \,{\left (x e + d\right )}^{m} a^{2} x e^{3} + 6 \,{\left (x e + d\right )}^{m} a^{2} 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*(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")

[Out]

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