### 3.1787 $$\int \frac{(a c+(b c+a d) x+b d x^2)^3}{a+b x} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0718319, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.069, Rules used = {626, 43} $-\frac{2 b (c+d x)^5 (b c-a d)}{5 d^3}+\frac{(c+d x)^4 (b c-a d)^2}{4 d^3}+\frac{b^2 (c+d x)^6}{6 d^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.0128684, size = 122, normalized size = 1.88 $\frac{1}{4} d x^4 \left (a^2 d^2+6 a b c d+3 b^2 c^2\right )+\frac{1}{3} c x^3 \left (3 a^2 d^2+6 a b c d+b^2 c^2\right )+a^2 c^3 x+\frac{1}{2} a c^2 x^2 (3 a d+2 b c)+\frac{1}{5} b d^2 x^5 (2 a d+3 b c)+\frac{1}{6} b^2 d^3 x^6$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.04, size = 147, normalized size = 2.3 \begin{align*}{\frac{{b}^{2}{d}^{3}{x}^{6}}{6}}+{\frac{ \left ( c{b}^{2}{d}^{2}+2\,{d}^{2} \left ( ad+bc \right ) b \right ){x}^{5}}{5}}+{\frac{ \left ( 2\,c \left ( ad+bc \right ) bd+d \left ( 2\,cabd+ \left ( ad+bc \right ) ^{2} \right ) \right ){x}^{4}}{4}}+{\frac{ \left ( c \left ( 2\,cabd+ \left ( ad+bc \right ) ^{2} \right ) +2\,dac \left ( ad+bc \right ) \right ){x}^{3}}{3}}+{\frac{ \left ( 2\,{c}^{2}a \left ( ad+bc \right ) +d{a}^{2}{c}^{2} \right ){x}^{2}}{2}}+x{a}^{2}{c}^{3} \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/(b*x+a),x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.02757, size = 167, normalized size = 2.57 \begin{align*} \frac{1}{6} \, b^{2} d^{3} x^{6} + a^{2} c^{3} x + \frac{1}{5} \,{\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} x^{5} + \frac{1}{4} \,{\left (3 \, b^{2} c^{2} d + 6 \, a b c d^{2} + a^{2} d^{3}\right )} x^{4} + \frac{1}{3} \,{\left (b^{2} c^{3} + 6 \, a b c^{2} d + 3 \, a^{2} c d^{2}\right )} x^{3} + \frac{1}{2} \,{\left (2 \, a b c^{3} + 3 \, a^{2} c^{2} d\right )} x^{2} \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/(b*x+a),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.55957, size = 266, normalized size = 4.09 \begin{align*} \frac{1}{6} \, b^{2} d^{3} x^{6} + a^{2} c^{3} x + \frac{1}{5} \,{\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} x^{5} + \frac{1}{4} \,{\left (3 \, b^{2} c^{2} d + 6 \, a b c d^{2} + a^{2} d^{3}\right )} x^{4} + \frac{1}{3} \,{\left (b^{2} c^{3} + 6 \, a b c^{2} d + 3 \, a^{2} c d^{2}\right )} x^{3} + \frac{1}{2} \,{\left (2 \, a b c^{3} + 3 \, a^{2} c^{2} d\right )} x^{2} \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/(b*x+a),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.256044, size = 133, normalized size = 2.05 \begin{align*} a^{2} c^{3} x + \frac{b^{2} d^{3} x^{6}}{6} + x^{5} \left (\frac{2 a b d^{3}}{5} + \frac{3 b^{2} c d^{2}}{5}\right ) + x^{4} \left (\frac{a^{2} d^{3}}{4} + \frac{3 a b c d^{2}}{2} + \frac{3 b^{2} c^{2} d}{4}\right ) + x^{3} \left (a^{2} c d^{2} + 2 a b c^{2} d + \frac{b^{2} c^{3}}{3}\right ) + x^{2} \left (\frac{3 a^{2} c^{2} d}{2} + a b c^{3}\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/(b*x+a),x)

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.21458, size = 176, normalized size = 2.71 \begin{align*} \frac{1}{6} \, b^{2} d^{3} x^{6} + \frac{3}{5} \, b^{2} c d^{2} x^{5} + \frac{2}{5} \, a b d^{3} x^{5} + \frac{3}{4} \, b^{2} c^{2} d x^{4} + \frac{3}{2} \, a b c d^{2} x^{4} + \frac{1}{4} \, a^{2} d^{3} x^{4} + \frac{1}{3} \, b^{2} c^{3} x^{3} + 2 \, a b c^{2} d x^{3} + a^{2} c d^{2} x^{3} + a b c^{3} x^{2} + \frac{3}{2} \, a^{2} c^{2} d x^{2} + a^{2} 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/(b*x+a),x, algorithm="giac")

[Out]

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