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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

1/(2*(b*c - a*d)*(c + d*x)^2) + b/((b*c - a*d)^2*(c + d*x)) + (b^2*Log[a + b*x])/(b*c - a*d)^3 - (b^2*Log[c +
d*x])/(b*c - a*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 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 81, normalized size = 1. \begin{align*} -{\frac{1}{ \left ( 2\,ad-2\,bc \right ) \left ( dx+c \right ) ^{2}}}+{\frac{{b}^{2}\ln \left ( dx+c \right ) }{ \left ( ad-bc \right ) ^{3}}}+{\frac{b}{ \left ( ad-bc \right ) ^{2} \left ( dx+c \right ) }}-{\frac{{b}^{2}\ln \left ( bx+a \right ) }{ \left ( ad-bc \right ) ^{3}}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.17323, size = 273, normalized size = 3.33 \begin{align*} \frac{b^{2} \log \left (b x + a\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac{b^{2} \log \left (d x + c\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} + \frac{2 \, b d x + 3 \, b c - a d}{2 \,{\left (b^{2} c^{4} - 2 \, a b c^{3} d + a^{2} c^{2} d^{2} +{\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} x^{2} + 2 \,{\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} x\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.62624, size = 490, normalized size = 5.98 \begin{align*} \frac{3 \, b^{2} c^{2} - 4 \, a b c d + a^{2} d^{2} + 2 \,{\left (b^{2} c d - a b d^{2}\right )} x + 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \log \left (b x + a\right ) - 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \log \left (d x + c\right )}{2 \,{\left (b^{3} c^{5} - 3 \, a b^{2} c^{4} d + 3 \, a^{2} b c^{3} d^{2} - a^{3} c^{2} d^{3} +{\left (b^{3} c^{3} d^{2} - 3 \, a b^{2} c^{2} d^{3} + 3 \, a^{2} b c d^{4} - a^{3} d^{5}\right )} x^{2} + 2 \,{\left (b^{3} c^{4} d - 3 \, a b^{2} c^{3} d^{2} + 3 \, a^{2} b c^{2} d^{3} - a^{3} c d^{4}\right )} x\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 2.38015, size = 381, normalized size = 4.65 \begin{align*} \frac{b^{2} \log{\left (x + \frac{- \frac{a^{4} b^{2} d^{4}}{\left (a d - b c\right )^{3}} + \frac{4 a^{3} b^{3} c d^{3}}{\left (a d - b c\right )^{3}} - \frac{6 a^{2} b^{4} c^{2} d^{2}}{\left (a d - b c\right )^{3}} + \frac{4 a b^{5} c^{3} d}{\left (a d - b c\right )^{3}} + a b^{2} d - \frac{b^{6} c^{4}}{\left (a d - b c\right )^{3}} + b^{3} c}{2 b^{3} d} \right )}}{\left (a d - b c\right )^{3}} - \frac{b^{2} \log{\left (x + \frac{\frac{a^{4} b^{2} d^{4}}{\left (a d - b c\right )^{3}} - \frac{4 a^{3} b^{3} c d^{3}}{\left (a d - b c\right )^{3}} + \frac{6 a^{2} b^{4} c^{2} d^{2}}{\left (a d - b c\right )^{3}} - \frac{4 a b^{5} c^{3} d}{\left (a d - b c\right )^{3}} + a b^{2} d + \frac{b^{6} c^{4}}{\left (a d - b c\right )^{3}} + b^{3} c}{2 b^{3} d} \right )}}{\left (a d - b c\right )^{3}} + \frac{- a d + 3 b c + 2 b d x}{2 a^{2} c^{2} d^{2} - 4 a b c^{3} d + 2 b^{2} c^{4} + x^{2} \left (2 a^{2} d^{4} - 4 a b c d^{3} + 2 b^{2} c^{2} d^{2}\right ) + x \left (4 a^{2} c d^{3} - 8 a b c^{2} d^{2} + 4 b^{2} c^{3} d\right )} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.17193, size = 223, normalized size = 2.72 \begin{align*} \frac{b^{3} \log \left ({\left | b x + a \right |}\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} - \frac{b^{2} d \log \left ({\left | d x + c \right |}\right )}{b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}} + \frac{3 \, b^{2} c^{2} - 4 \, a b c d + a^{2} d^{2} + 2 \,{\left (b^{2} c d - a b d^{2}\right )} x}{2 \,{\left (b c - a d\right )}^{3}{\left (d x + c\right )}^{2}} \end{align*}

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

[In]

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

[Out]

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