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

Optimal. Leaf size=72 $-\frac{\left (b^2-4 a c\right ) (b+2 c x)^2}{32 c^3 d}+\frac{\left (b^2-4 a c\right )^2 \log (b+2 c x)}{32 c^3 d}+\frac{(b+2 c x)^4}{128 c^3 d}$

[Out]

-((b^2 - 4*a*c)*(b + 2*c*x)^2)/(32*c^3*d) + (b + 2*c*x)^4/(128*c^3*d) + ((b^2 - 4*a*c)^2*Log[b + 2*c*x])/(32*c
^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0722829, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 24, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.042, Rules used = {683} $-\frac{\left (b^2-4 a c\right ) (b+2 c x)^2}{32 c^3 d}+\frac{\left (b^2-4 a c\right )^2 \log (b+2 c x)}{32 c^3 d}+\frac{(b+2 c x)^4}{128 c^3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((b^2 - 4*a*c)*(b + 2*c*x)^2)/(32*c^3*d) + (b + 2*c*x)^4/(128*c^3*d) + ((b^2 - 4*a*c)^2*Log[b + 2*c*x])/(32*c
^3*d)

Rule 683

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] && EqQ[2*c*d - b*e,
0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rubi steps

\begin{align*} \int \frac{\left (a+b x+c x^2\right )^2}{b d+2 c d x} \, dx &=\int \left (\frac{\left (-b^2+4 a c\right )^2}{16 c^2 (b d+2 c d x)}+\frac{\left (-b^2+4 a c\right ) (b d+2 c d x)}{8 c^2 d^2}+\frac{(b d+2 c d x)^3}{16 c^2 d^4}\right ) \, dx\\ &=-\frac{\left (b^2-4 a c\right ) (b+2 c x)^2}{32 c^3 d}+\frac{(b+2 c x)^4}{128 c^3 d}+\frac{\left (b^2-4 a c\right )^2 \log (b+2 c x)}{32 c^3 d}\\ \end{align*}

Mathematica [A]  time = 0.0270897, size = 61, normalized size = 0.85 $\frac{2 c x (b+c x) \left (2 c \left (4 a+c x^2\right )-b^2+2 b c x\right )+\left (b^2-4 a c\right )^2 \log (b+2 c x)}{32 c^3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(2*c*x*(b + c*x)*(-b^2 + 2*b*c*x + 2*c*(4*a + c*x^2)) + (b^2 - 4*a*c)^2*Log[b + 2*c*x])/(32*c^3*d)

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 121, normalized size = 1.7 \begin{align*}{\frac{c{x}^{4}}{8\,d}}+{\frac{b{x}^{3}}{4\,d}}+{\frac{a{x}^{2}}{2\,d}}+{\frac{{b}^{2}{x}^{2}}{16\,cd}}+{\frac{abx}{2\,cd}}-{\frac{{b}^{3}x}{16\,{c}^{2}d}}+{\frac{\ln \left ( 2\,cx+b \right ){a}^{2}}{2\,cd}}-{\frac{\ln \left ( 2\,cx+b \right ) a{b}^{2}}{4\,{c}^{2}d}}+{\frac{\ln \left ( 2\,cx+b \right ){b}^{4}}{32\,d{c}^{3}}} \end{align*}

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

[In]

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

[Out]

1/8*c/d*x^4+1/4/d*b*x^3+1/2/d*a*x^2+1/16/d/c*x^2*b^2+1/2/d/c*a*b*x-1/16/d/c^2*b^3*x+1/2/d/c*ln(2*c*x+b)*a^2-1/
4/d/c^2*ln(2*c*x+b)*a*b^2+1/32/d/c^3*ln(2*c*x+b)*b^4

________________________________________________________________________________________

Maxima [A]  time = 1.22093, size = 120, normalized size = 1.67 \begin{align*} \frac{2 \, c^{3} x^{4} + 4 \, b c^{2} x^{3} +{\left (b^{2} c + 8 \, a c^{2}\right )} x^{2} -{\left (b^{3} - 8 \, a b c\right )} x}{16 \, c^{2} d} + \frac{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \log \left (2 \, c x + b\right )}{32 \, c^{3} d} \end{align*}

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

[In]

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

[Out]

1/16*(2*c^3*x^4 + 4*b*c^2*x^3 + (b^2*c + 8*a*c^2)*x^2 - (b^3 - 8*a*b*c)*x)/(c^2*d) + 1/32*(b^4 - 8*a*b^2*c + 1
6*a^2*c^2)*log(2*c*x + b)/(c^3*d)

________________________________________________________________________________________

Fricas [A]  time = 1.93636, size = 192, normalized size = 2.67 \begin{align*} \frac{4 \, c^{4} x^{4} + 8 \, b c^{3} x^{3} + 2 \,{\left (b^{2} c^{2} + 8 \, a c^{3}\right )} x^{2} - 2 \,{\left (b^{3} c - 8 \, a b c^{2}\right )} x +{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \log \left (2 \, c x + b\right )}{32 \, c^{3} d} \end{align*}

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

[In]

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

[Out]

1/32*(4*c^4*x^4 + 8*b*c^3*x^3 + 2*(b^2*c^2 + 8*a*c^3)*x^2 - 2*(b^3*c - 8*a*b*c^2)*x + (b^4 - 8*a*b^2*c + 16*a^
2*c^2)*log(2*c*x + b))/(c^3*d)

________________________________________________________________________________________

Sympy [A]  time = 0.538411, size = 76, normalized size = 1.06 \begin{align*} \frac{b x^{3}}{4 d} + \frac{c x^{4}}{8 d} + \frac{x^{2} \left (8 a c + b^{2}\right )}{16 c d} + \frac{x \left (8 a b c - b^{3}\right )}{16 c^{2} d} + \frac{\left (4 a c - b^{2}\right )^{2} \log{\left (b + 2 c x \right )}}{32 c^{3} d} \end{align*}

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

[In]

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

[Out]

b*x**3/(4*d) + c*x**4/(8*d) + x**2*(8*a*c + b**2)/(16*c*d) + x*(8*a*b*c - b**3)/(16*c**2*d) + (4*a*c - b**2)**
2*log(b + 2*c*x)/(32*c**3*d)

________________________________________________________________________________________

Giac [A]  time = 1.22185, size = 157, normalized size = 2.18 \begin{align*} \frac{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \log \left ({\left | 2 \, c x + b \right |}\right )}{32 \, c^{3} d} + \frac{2 \, c^{5} d^{3} x^{4} + 4 \, b c^{4} d^{3} x^{3} + b^{2} c^{3} d^{3} x^{2} + 8 \, a c^{4} d^{3} x^{2} - b^{3} c^{2} d^{3} x + 8 \, a b c^{3} d^{3} x}{16 \, c^{4} d^{4}} \end{align*}

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

[In]

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

[Out]

1/32*(b^4 - 8*a*b^2*c + 16*a^2*c^2)*log(abs(2*c*x + b))/(c^3*d) + 1/16*(2*c^5*d^3*x^4 + 4*b*c^4*d^3*x^3 + b^2*
c^3*d^3*x^2 + 8*a*c^4*d^3*x^2 - b^3*c^2*d^3*x + 8*a*b*c^3*d^3*x)/(c^4*d^4)