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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.0769541, size = 67, normalized size = 0.92 $\frac{-\frac{b (c d-b e)^2}{c (b+c x)}+2 d \log (x) (b e-c d)+2 d (c d-b e) \log (b+c x)-\frac{b d^2}{x}}{b^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.057, size = 106, normalized size = 1.5 \begin{align*} -{\frac{{d}^{2}}{{b}^{2}x}}+2\,{\frac{d\ln \left ( x \right ) e}{{b}^{2}}}-2\,{\frac{{d}^{2}\ln \left ( x \right ) c}{{b}^{3}}}-{\frac{{e}^{2}}{c \left ( cx+b \right ) }}+2\,{\frac{de}{b \left ( cx+b \right ) }}-{\frac{c{d}^{2}}{{b}^{2} \left ( cx+b \right ) }}-2\,{\frac{d\ln \left ( cx+b \right ) e}{{b}^{2}}}+2\,{\frac{{d}^{2}\ln \left ( cx+b \right ) c}{{b}^{3}}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.14467, size = 126, normalized size = 1.73 \begin{align*} -\frac{b c d^{2} +{\left (2 \, c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2}\right )} x}{b^{2} c^{2} x^{2} + b^{3} c x} + \frac{2 \,{\left (c d^{2} - b d e\right )} \log \left (c x + b\right )}{b^{3}} - \frac{2 \,{\left (c d^{2} - b d e\right )} \log \left (x\right )}{b^{3}} \end{align*}

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

[In]

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

[Out]

-(b*c*d^2 + (2*c^2*d^2 - 2*b*c*d*e + b^2*e^2)*x)/(b^2*c^2*x^2 + b^3*c*x) + 2*(c*d^2 - b*d*e)*log(c*x + b)/b^3
- 2*(c*d^2 - b*d*e)*log(x)/b^3

________________________________________________________________________________________

Fricas [B]  time = 1.74305, size = 297, normalized size = 4.07 \begin{align*} -\frac{b^{2} c d^{2} +{\left (2 \, b c^{2} d^{2} - 2 \, b^{2} c d e + b^{3} e^{2}\right )} x - 2 \,{\left ({\left (c^{3} d^{2} - b c^{2} d e\right )} x^{2} +{\left (b c^{2} d^{2} - b^{2} c d e\right )} x\right )} \log \left (c x + b\right ) + 2 \,{\left ({\left (c^{3} d^{2} - b c^{2} d e\right )} x^{2} +{\left (b c^{2} d^{2} - b^{2} c d e\right )} x\right )} \log \left (x\right )}{b^{3} c^{2} x^{2} + b^{4} c x} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 1.60136, size = 173, normalized size = 2.37 \begin{align*} - \frac{b c d^{2} + x \left (b^{2} e^{2} - 2 b c d e + 2 c^{2} d^{2}\right )}{b^{3} c x + b^{2} c^{2} x^{2}} + \frac{2 d \left (b e - c d\right ) \log{\left (x + \frac{2 b^{2} d e - 2 b c d^{2} - 2 b d \left (b e - c d\right )}{4 b c d e - 4 c^{2} d^{2}} \right )}}{b^{3}} - \frac{2 d \left (b e - c d\right ) \log{\left (x + \frac{2 b^{2} d e - 2 b c d^{2} + 2 b d \left (b e - c d\right )}{4 b c d e - 4 c^{2} d^{2}} \right )}}{b^{3}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.23792, size = 136, normalized size = 1.86 \begin{align*} -\frac{2 \,{\left (c d^{2} - b d e\right )} \log \left ({\left | x \right |}\right )}{b^{3}} + \frac{2 \,{\left (c^{2} d^{2} - b c d e\right )} \log \left ({\left | c x + b \right |}\right )}{b^{3} c} - \frac{2 \, c^{2} d^{2} x - 2 \, b c d x e + b c d^{2} + b^{2} x e^{2}}{{\left (c x^{2} + b x\right )} b^{2} c} \end{align*}

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

[In]

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

[Out]

-2*(c*d^2 - b*d*e)*log(abs(x))/b^3 + 2*(c^2*d^2 - b*c*d*e)*log(abs(c*x + b))/(b^3*c) - (2*c^2*d^2*x - 2*b*c*d*
x*e + b*c*d^2 + b^2*x*e^2)/((c*x^2 + b*x)*b^2*c)