### 3.1786 $$\int (a c+(b c+a d) x+b d x^2)^3 \, dx$$

Optimal. Leaf size=92 $-\frac{b^2 (c+d x)^6 (b c-a d)}{2 d^4}+\frac{3 b (c+d x)^5 (b c-a d)^2}{5 d^4}-\frac{(c+d x)^4 (b c-a d)^3}{4 d^4}+\frac{b^3 (c+d x)^7}{7 d^4}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.117105, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.095, Rules used = {610, 43} $-\frac{b^2 (c+d x)^6 (b c-a d)}{2 d^4}+\frac{3 b (c+d x)^5 (b c-a d)^2}{5 d^4}-\frac{(c+d x)^4 (b c-a d)^3}{4 d^4}+\frac{b^3 (c+d x)^7}{7 d^4}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.0179502, size = 161, normalized size = 1.75 $\frac{3}{5} b d x^5 \left (a^2 d^2+3 a b c d+b^2 c^2\right )+\frac{1}{4} x^4 \left (9 a^2 b c d^2+a^3 d^3+9 a b^2 c^2 d+b^3 c^3\right )+a c x^3 \left (a^2 d^2+3 a b c d+b^2 c^2\right )+\frac{3}{2} a^2 c^2 x^2 (a d+b c)+a^3 c^3 x+\frac{1}{2} b^2 d^2 x^6 (a d+b c)+\frac{1}{7} b^3 d^3 x^7$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

a^3*c^3*x + (3*a^2*c^2*(b*c + a*d)*x^2)/2 + a*c*(b^2*c^2 + 3*a*b*c*d + a^2*d^2)*x^3 + ((b^3*c^3 + 9*a*b^2*c^2*
d + 9*a^2*b*c*d^2 + a^3*d^3)*x^4)/4 + (3*b*d*(b^2*c^2 + 3*a*b*c*d + a^2*d^2)*x^5)/5 + (b^2*d^2*(b*c + a*d)*x^6
)/2 + (b^3*d^3*x^7)/7

________________________________________________________________________________________

Maple [B]  time = 0.041, size = 194, normalized size = 2.1 \begin{align*}{\frac{{b}^{3}{d}^{3}{x}^{7}}{7}}+{\frac{ \left ( ad+bc \right ){b}^{2}{d}^{2}{x}^{6}}{2}}+{\frac{ \left ( a{b}^{2}c{d}^{2}+2\, \left ( ad+bc \right ) ^{2}bd+bd \left ( 2\,cabd+ \left ( ad+bc \right ) ^{2} \right ) \right ){x}^{5}}{5}}+{\frac{ \left ( 4\,ac \left ( ad+bc \right ) bd+ \left ( ad+bc \right ) \left ( 2\,cabd+ \left ( ad+bc \right ) ^{2} \right ) \right ){x}^{4}}{4}}+{\frac{ \left ( ac \left ( 2\,cabd+ \left ( ad+bc \right ) ^{2} \right ) +2\, \left ( ad+bc \right ) ^{2}ac+bd{a}^{2}{c}^{2} \right ){x}^{3}}{3}}+{\frac{3\,{a}^{2}{c}^{2} \left ( ad+bc \right ){x}^{2}}{2}}+{a}^{3}{c}^{3}x \end{align*}

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

[In]

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

[Out]

1/7*b^3*d^3*x^7+1/2*(a*d+b*c)*b^2*d^2*x^6+1/5*(a*b^2*c*d^2+2*(a*d+b*c)^2*b*d+b*d*(2*c*a*b*d+(a*d+b*c)^2))*x^5+
1/4*(4*a*c*(a*d+b*c)*b*d+(a*d+b*c)*(2*c*a*b*d+(a*d+b*c)^2))*x^4+1/3*(a*c*(2*c*a*b*d+(a*d+b*c)^2)+2*(a*d+b*c)^2
*a*c+b*d*a^2*c^2)*x^3+3/2*a^2*c^2*(a*d+b*c)*x^2+a^3*c^3*x

________________________________________________________________________________________

Maxima [A]  time = 1.0822, size = 189, normalized size = 2.05 \begin{align*} \frac{1}{7} \, b^{3} d^{3} x^{7} + \frac{1}{2} \,{\left (b c + a d\right )} b^{2} d^{2} x^{6} + \frac{3}{5} \,{\left (b c + a d\right )}^{2} b d x^{5} + a^{3} c^{3} x + \frac{1}{4} \,{\left (b c + a d\right )}^{3} x^{4} + \frac{1}{2} \,{\left (2 \, b d x^{3} + 3 \,{\left (b c + a d\right )} x^{2}\right )} a^{2} c^{2} + \frac{1}{10} \,{\left (6 \, b^{2} d^{2} x^{5} + 15 \,{\left (b c + a d\right )} b d x^{4} + 10 \,{\left (b c + a d\right )}^{2} x^{3}\right )} a c \end{align*}

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

[In]

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

[Out]

1/7*b^3*d^3*x^7 + 1/2*(b*c + a*d)*b^2*d^2*x^6 + 3/5*(b*c + a*d)^2*b*d*x^5 + a^3*c^3*x + 1/4*(b*c + a*d)^3*x^4
+ 1/2*(2*b*d*x^3 + 3*(b*c + a*d)*x^2)*a^2*c^2 + 1/10*(6*b^2*d^2*x^5 + 15*(b*c + a*d)*b*d*x^4 + 10*(b*c + a*d)^
2*x^3)*a*c

________________________________________________________________________________________

Fricas [B]  time = 1.39292, size = 409, normalized size = 4.45 \begin{align*} \frac{1}{7} x^{7} d^{3} b^{3} + \frac{1}{2} x^{6} d^{2} c b^{3} + \frac{1}{2} x^{6} d^{3} b^{2} a + \frac{3}{5} x^{5} d c^{2} b^{3} + \frac{9}{5} x^{5} d^{2} c b^{2} a + \frac{3}{5} x^{5} d^{3} b a^{2} + \frac{1}{4} x^{4} c^{3} b^{3} + \frac{9}{4} x^{4} d c^{2} b^{2} a + \frac{9}{4} x^{4} d^{2} c b a^{2} + \frac{1}{4} x^{4} d^{3} a^{3} + x^{3} c^{3} b^{2} a + 3 x^{3} d c^{2} b a^{2} + x^{3} d^{2} c a^{3} + \frac{3}{2} x^{2} c^{3} b a^{2} + \frac{3}{2} x^{2} d c^{2} a^{3} + x c^{3} a^{3} \end{align*}

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

[In]

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

[Out]

1/7*x^7*d^3*b^3 + 1/2*x^6*d^2*c*b^3 + 1/2*x^6*d^3*b^2*a + 3/5*x^5*d*c^2*b^3 + 9/5*x^5*d^2*c*b^2*a + 3/5*x^5*d^
3*b*a^2 + 1/4*x^4*c^3*b^3 + 9/4*x^4*d*c^2*b^2*a + 9/4*x^4*d^2*c*b*a^2 + 1/4*x^4*d^3*a^3 + x^3*c^3*b^2*a + 3*x^
3*d*c^2*b*a^2 + x^3*d^2*c*a^3 + 3/2*x^2*c^3*b*a^2 + 3/2*x^2*d*c^2*a^3 + x*c^3*a^3

________________________________________________________________________________________

Sympy [B]  time = 0.219996, size = 190, normalized size = 2.07 \begin{align*} a^{3} c^{3} x + \frac{b^{3} d^{3} x^{7}}{7} + x^{6} \left (\frac{a b^{2} d^{3}}{2} + \frac{b^{3} c d^{2}}{2}\right ) + x^{5} \left (\frac{3 a^{2} b d^{3}}{5} + \frac{9 a b^{2} c d^{2}}{5} + \frac{3 b^{3} c^{2} d}{5}\right ) + x^{4} \left (\frac{a^{3} d^{3}}{4} + \frac{9 a^{2} b c d^{2}}{4} + \frac{9 a b^{2} c^{2} d}{4} + \frac{b^{3} c^{3}}{4}\right ) + x^{3} \left (a^{3} c d^{2} + 3 a^{2} b c^{2} d + a b^{2} c^{3}\right ) + x^{2} \left (\frac{3 a^{3} c^{2} d}{2} + \frac{3 a^{2} b c^{3}}{2}\right ) \end{align*}

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

[In]

integrate((a*c+(a*d+b*c)*x+b*d*x**2)**3,x)

[Out]

a**3*c**3*x + b**3*d**3*x**7/7 + x**6*(a*b**2*d**3/2 + b**3*c*d**2/2) + x**5*(3*a**2*b*d**3/5 + 9*a*b**2*c*d**
2/5 + 3*b**3*c**2*d/5) + x**4*(a**3*d**3/4 + 9*a**2*b*c*d**2/4 + 9*a*b**2*c**2*d/4 + b**3*c**3/4) + x**3*(a**3
*c*d**2 + 3*a**2*b*c**2*d + a*b**2*c**3) + x**2*(3*a**3*c**2*d/2 + 3*a**2*b*c**3/2)

________________________________________________________________________________________

Giac [B]  time = 1.19604, size = 254, normalized size = 2.76 \begin{align*} \frac{1}{7} \, b^{3} d^{3} x^{7} + \frac{1}{2} \, b^{3} c d^{2} x^{6} + \frac{1}{2} \, a b^{2} d^{3} x^{6} + \frac{3}{5} \, b^{3} c^{2} d x^{5} + \frac{9}{5} \, a b^{2} c d^{2} x^{5} + \frac{3}{5} \, a^{2} b d^{3} x^{5} + \frac{1}{4} \, b^{3} c^{3} x^{4} + \frac{9}{4} \, a b^{2} c^{2} d x^{4} + \frac{9}{4} \, a^{2} b c d^{2} x^{4} + \frac{1}{4} \, a^{3} d^{3} x^{4} + a b^{2} c^{3} x^{3} + 3 \, a^{2} b c^{2} d x^{3} + a^{3} c d^{2} x^{3} + \frac{3}{2} \, a^{2} b c^{3} x^{2} + \frac{3}{2} \, a^{3} c^{2} d x^{2} + a^{3} c^{3} x \end{align*}

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

[In]

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

[Out]

1/7*b^3*d^3*x^7 + 1/2*b^3*c*d^2*x^6 + 1/2*a*b^2*d^3*x^6 + 3/5*b^3*c^2*d*x^5 + 9/5*a*b^2*c*d^2*x^5 + 3/5*a^2*b*
d^3*x^5 + 1/4*b^3*c^3*x^4 + 9/4*a*b^2*c^2*d*x^4 + 9/4*a^2*b*c*d^2*x^4 + 1/4*a^3*d^3*x^4 + a*b^2*c^3*x^3 + 3*a^
2*b*c^2*d*x^3 + a^3*c*d^2*x^3 + 3/2*a^2*b*c^3*x^2 + 3/2*a^3*c^2*d*x^2 + a^3*c^3*x