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

Optimal. Leaf size=107 $-\frac{d^2 (c d-b e)^2}{e^5 (d+e x)}-\frac{c x^2 (c d-b e)}{e^3}+\frac{x (c d-b e) (3 c d-b e)}{e^4}-\frac{2 d (c d-b e) (2 c d-b e) \log (d+e x)}{e^5}+\frac{c^2 x^3}{3 e^2}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.102462, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.053, Rules used = {698} $-\frac{d^2 (c d-b e)^2}{e^5 (d+e x)}-\frac{c x^2 (c d-b e)}{e^3}+\frac{x (c d-b e) (3 c d-b e)}{e^4}-\frac{2 d (c d-b e) (2 c d-b e) \log (d+e x)}{e^5}+\frac{c^2 x^3}{3 e^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 698

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] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

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

Mathematica [A]  time = 0.0968287, size = 114, normalized size = 1.07 $\frac{3 e x \left (b^2 e^2-4 b c d e+3 c^2 d^2\right )-6 d \left (b^2 e^2-3 b c d e+2 c^2 d^2\right ) \log (d+e x)-\frac{3 d^2 (c d-b e)^2}{d+e x}-3 c e^2 x^2 (c d-b e)+c^2 e^3 x^3}{3 e^5}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(3*e*(3*c^2*d^2 - 4*b*c*d*e + b^2*e^2)*x - 3*c*e^2*(c*d - b*e)*x^2 + c^2*e^3*x^3 - (3*d^2*(c*d - b*e)^2)/(d +
e*x) - 6*d*(2*c^2*d^2 - 3*b*c*d*e + b^2*e^2)*Log[d + e*x])/(3*e^5)

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 164, normalized size = 1.5 \begin{align*}{\frac{{c}^{2}{x}^{3}}{3\,{e}^{2}}}+{\frac{bc{x}^{2}}{{e}^{2}}}-{\frac{{c}^{2}d{x}^{2}}{{e}^{3}}}+{\frac{{b}^{2}x}{{e}^{2}}}-4\,{\frac{bcdx}{{e}^{3}}}+3\,{\frac{{c}^{2}{d}^{2}x}{{e}^{4}}}-2\,{\frac{d\ln \left ( ex+d \right ){b}^{2}}{{e}^{3}}}+6\,{\frac{{d}^{2}\ln \left ( ex+d \right ) bc}{{e}^{4}}}-4\,{\frac{{d}^{3}\ln \left ( ex+d \right ){c}^{2}}{{e}^{5}}}-{\frac{{b}^{2}{d}^{2}}{{e}^{3} \left ( ex+d \right ) }}+2\,{\frac{{d}^{3}bc}{{e}^{4} \left ( ex+d \right ) }}-{\frac{{c}^{2}{d}^{4}}{{e}^{5} \left ( ex+d \right ) }} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.10502, size = 186, normalized size = 1.74 \begin{align*} -\frac{c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2}}{e^{6} x + d e^{5}} + \frac{c^{2} e^{2} x^{3} - 3 \,{\left (c^{2} d e - b c e^{2}\right )} x^{2} + 3 \,{\left (3 \, c^{2} d^{2} - 4 \, b c d e + b^{2} e^{2}\right )} x}{3 \, e^{4}} - \frac{2 \,{\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e + b^{2} d e^{2}\right )} \log \left (e x + d\right )}{e^{5}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.65597, size = 416, normalized size = 3.89 \begin{align*} \frac{c^{2} e^{4} x^{4} - 3 \, c^{2} d^{4} + 6 \, b c d^{3} e - 3 \, b^{2} d^{2} e^{2} -{\left (2 \, c^{2} d e^{3} - 3 \, b c e^{4}\right )} x^{3} + 3 \,{\left (2 \, c^{2} d^{2} e^{2} - 3 \, b c d e^{3} + b^{2} e^{4}\right )} x^{2} + 3 \,{\left (3 \, c^{2} d^{3} e - 4 \, b c d^{2} e^{2} + b^{2} d e^{3}\right )} x - 6 \,{\left (2 \, c^{2} d^{4} - 3 \, b c d^{3} e + b^{2} d^{2} e^{2} +{\left (2 \, c^{2} d^{3} e - 3 \, b c d^{2} e^{2} + b^{2} d e^{3}\right )} x\right )} \log \left (e x + d\right )}{3 \,{\left (e^{6} x + d e^{5}\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 1.7384, size = 122, normalized size = 1.14 \begin{align*} \frac{c^{2} x^{3}}{3 e^{2}} - \frac{2 d \left (b e - 2 c d\right ) \left (b e - c d\right ) \log{\left (d + e x \right )}}{e^{5}} - \frac{b^{2} d^{2} e^{2} - 2 b c d^{3} e + c^{2} d^{4}}{d e^{5} + e^{6} x} + \frac{x^{2} \left (b c e - c^{2} d\right )}{e^{3}} + \frac{x \left (b^{2} e^{2} - 4 b c d e + 3 c^{2} d^{2}\right )}{e^{4}} \end{align*}

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

[In]

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

[Out]

c**2*x**3/(3*e**2) - 2*d*(b*e - 2*c*d)*(b*e - c*d)*log(d + e*x)/e**5 - (b**2*d**2*e**2 - 2*b*c*d**3*e + c**2*d
**4)/(d*e**5 + e**6*x) + x**2*(b*c*e - c**2*d)/e**3 + x*(b**2*e**2 - 4*b*c*d*e + 3*c**2*d**2)/e**4

________________________________________________________________________________________

Giac [A]  time = 1.35191, size = 248, normalized size = 2.32 \begin{align*} \frac{1}{3} \,{\left (c^{2} - \frac{3 \,{\left (2 \, c^{2} d e - b c e^{2}\right )} e^{\left (-1\right )}}{x e + d} + \frac{3 \,{\left (6 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + b^{2} e^{4}\right )} e^{\left (-2\right )}}{{\left (x e + d\right )}^{2}}\right )}{\left (x e + d\right )}^{3} e^{\left (-5\right )} + 2 \,{\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e + b^{2} d e^{2}\right )} e^{\left (-5\right )} \log \left (\frac{{\left | x e + d \right |} e^{\left (-1\right )}}{{\left (x e + d\right )}^{2}}\right ) -{\left (\frac{c^{2} d^{4} e^{3}}{x e + d} - \frac{2 \, b c d^{3} e^{4}}{x e + d} + \frac{b^{2} d^{2} e^{5}}{x e + d}\right )} e^{\left (-8\right )} \end{align*}

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

[In]

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

[Out]

1/3*(c^2 - 3*(2*c^2*d*e - b*c*e^2)*e^(-1)/(x*e + d) + 3*(6*c^2*d^2*e^2 - 6*b*c*d*e^3 + b^2*e^4)*e^(-2)/(x*e +
d)^2)*(x*e + d)^3*e^(-5) + 2*(2*c^2*d^3 - 3*b*c*d^2*e + b^2*d*e^2)*e^(-5)*log(abs(x*e + d)*e^(-1)/(x*e + d)^2)
- (c^2*d^4*e^3/(x*e + d) - 2*b*c*d^3*e^4/(x*e + d) + b^2*d^2*e^5/(x*e + d))*e^(-8)