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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.034688, antiderivative size = 38, 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{b (c+d x)^4}{4 d^2}-\frac{(c+d x)^3 (b c-a d)}{3 d^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.009309, size = 47, normalized size = 1.24 $\frac{1}{12} x \left (4 d x^2 (a d+2 b c)+6 c x (2 a d+b c)+12 a c^2+3 b d^2 x^3\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.038, size = 55, normalized size = 1.5 \begin{align*}{\frac{b{d}^{2}{x}^{4}}{4}}+{\frac{ \left ( bcd+d \left ( ad+bc \right ) \right ){x}^{3}}{3}}+{\frac{ \left ( c \left ( ad+bc \right ) +acd \right ){x}^{2}}{2}}+xa{c}^{2} \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)^2/(b*x+a),x)

[Out]

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

________________________________________________________________________________________

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

[Out]

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

________________________________________________________________________________________

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.128249, size = 49, normalized size = 1.29 \begin{align*} a c^{2} x + \frac{b d^{2} x^{4}}{4} + x^{3} \left (\frac{a d^{2}}{3} + \frac{2 b c d}{3}\right ) + x^{2} \left (a c d + \frac{b c^{2}}{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)**2/(b*x+a),x)

[Out]

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

________________________________________________________________________________________

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

[Out]

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