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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.100024, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 26, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.077, Rules used = {27, 43} $-\frac{2 b^3 (d+e x)^2 (b d-a e)}{e^5}+\frac{6 b^2 x (b d-a e)^2}{e^4}-\frac{(b d-a e)^4}{e^5 (d+e x)}-\frac{4 b (b d-a e)^3 \log (d+e x)}{e^5}+\frac{b^4 (d+e x)^3}{3 e^5}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 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^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^2} \, dx &=\int \frac{(a+b x)^4}{(d+e x)^2} \, dx\\ &=\int \left (\frac{6 b^2 (b d-a e)^2}{e^4}+\frac{(-b d+a e)^4}{e^4 (d+e x)^2}-\frac{4 b (b d-a e)^3}{e^4 (d+e x)}-\frac{4 b^3 (b d-a e) (d+e x)}{e^4}+\frac{b^4 (d+e x)^2}{e^4}\right ) \, dx\\ &=\frac{6 b^2 (b d-a e)^2 x}{e^4}-\frac{(b d-a e)^4}{e^5 (d+e x)}-\frac{2 b^3 (b d-a e) (d+e x)^2}{e^5}+\frac{b^4 (d+e x)^3}{3 e^5}-\frac{4 b (b d-a e)^3 \log (d+e x)}{e^5}\\ \end{align*}

Mathematica [A]  time = 0.0605836, size = 165, normalized size = 1.59 $\frac{18 a^2 b^2 e^2 \left (-d^2+d e x+e^2 x^2\right )+12 a^3 b d e^3-3 a^4 e^4+6 a b^3 e \left (-4 d^2 e x+2 d^3-3 d e^2 x^2+e^3 x^3\right )-12 b (d+e x) (b d-a e)^3 \log (d+e x)+b^4 \left (6 d^2 e^2 x^2+9 d^3 e x-3 d^4-2 d e^3 x^3+e^4 x^4\right )}{3 e^5 (d+e x)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(12*a^3*b*d*e^3 - 3*a^4*e^4 + 18*a^2*b^2*e^2*(-d^2 + d*e*x + e^2*x^2) + 6*a*b^3*e*(2*d^3 - 4*d^2*e*x - 3*d*e^2
*x^2 + e^3*x^3) + b^4*(-3*d^4 + 9*d^3*e*x + 6*d^2*e^2*x^2 - 2*d*e^3*x^3 + e^4*x^4) - 12*b*(b*d - a*e)^3*(d + e
*x)*Log[d + e*x])/(3*e^5*(d + e*x))

________________________________________________________________________________________

Maple [B]  time = 0.049, size = 230, normalized size = 2.2 \begin{align*}{\frac{{b}^{4}{x}^{3}}{3\,{e}^{2}}}+2\,{\frac{{b}^{3}{x}^{2}a}{{e}^{2}}}-{\frac{{b}^{4}{x}^{2}d}{{e}^{3}}}+6\,{\frac{{a}^{2}{b}^{2}x}{{e}^{2}}}-8\,{\frac{ad{b}^{3}x}{{e}^{3}}}+3\,{\frac{{b}^{4}{d}^{2}x}{{e}^{4}}}+4\,{\frac{b\ln \left ( ex+d \right ){a}^{3}}{{e}^{2}}}-12\,{\frac{{b}^{2}\ln \left ( ex+d \right ){a}^{2}d}{{e}^{3}}}+12\,{\frac{{b}^{3}\ln \left ( ex+d \right ) a{d}^{2}}{{e}^{4}}}-4\,{\frac{{b}^{4}\ln \left ( ex+d \right ){d}^{3}}{{e}^{5}}}-{\frac{{a}^{4}}{e \left ( ex+d \right ) }}+4\,{\frac{d{a}^{3}b}{{e}^{2} \left ( ex+d \right ) }}-6\,{\frac{{b}^{2}{d}^{2}{a}^{2}}{{e}^{3} \left ( ex+d \right ) }}+4\,{\frac{{d}^{3}a{b}^{3}}{{e}^{4} \left ( ex+d \right ) }}-{\frac{{b}^{4}{d}^{4}}{{e}^{5} \left ( ex+d \right ) }} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.16265, size = 247, normalized size = 2.38 \begin{align*} -\frac{b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}}{e^{6} x + d e^{5}} + \frac{b^{4} e^{2} x^{3} - 3 \,{\left (b^{4} d e - 2 \, a b^{3} e^{2}\right )} x^{2} + 3 \,{\left (3 \, b^{4} d^{2} - 8 \, a b^{3} d e + 6 \, a^{2} b^{2} e^{2}\right )} x}{3 \, e^{4}} - \frac{4 \,{\left (b^{4} d^{3} - 3 \, a b^{3} d^{2} e + 3 \, a^{2} b^{2} d e^{2} - a^{3} b e^{3}\right )} \log \left (e x + d\right )}{e^{5}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.94949, size = 540, normalized size = 5.19 \begin{align*} \frac{b^{4} e^{4} x^{4} - 3 \, b^{4} d^{4} + 12 \, a b^{3} d^{3} e - 18 \, a^{2} b^{2} d^{2} e^{2} + 12 \, a^{3} b d e^{3} - 3 \, a^{4} e^{4} - 2 \,{\left (b^{4} d e^{3} - 3 \, a b^{3} e^{4}\right )} x^{3} + 6 \,{\left (b^{4} d^{2} e^{2} - 3 \, a b^{3} d e^{3} + 3 \, a^{2} b^{2} e^{4}\right )} x^{2} + 3 \,{\left (3 \, b^{4} d^{3} e - 8 \, a b^{3} d^{2} e^{2} + 6 \, a^{2} b^{2} d e^{3}\right )} x - 12 \,{\left (b^{4} d^{4} - 3 \, a b^{3} d^{3} e + 3 \, a^{2} b^{2} d^{2} e^{2} - a^{3} b d e^{3} +{\left (b^{4} d^{3} e - 3 \, a b^{3} d^{2} e^{2} + 3 \, a^{2} b^{2} d e^{3} - a^{3} b e^{4}\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((b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^2,x, algorithm="fricas")

[Out]

1/3*(b^4*e^4*x^4 - 3*b^4*d^4 + 12*a*b^3*d^3*e - 18*a^2*b^2*d^2*e^2 + 12*a^3*b*d*e^3 - 3*a^4*e^4 - 2*(b^4*d*e^3
- 3*a*b^3*e^4)*x^3 + 6*(b^4*d^2*e^2 - 3*a*b^3*d*e^3 + 3*a^2*b^2*e^4)*x^2 + 3*(3*b^4*d^3*e - 8*a*b^3*d^2*e^2 +
6*a^2*b^2*d*e^3)*x - 12*(b^4*d^4 - 3*a*b^3*d^3*e + 3*a^2*b^2*d^2*e^2 - a^3*b*d*e^3 + (b^4*d^3*e - 3*a*b^3*d^2
*e^2 + 3*a^2*b^2*d*e^3 - a^3*b*e^4)*x)*log(e*x + d))/(e^6*x + d*e^5)

________________________________________________________________________________________

Sympy [A]  time = 1.10256, size = 151, normalized size = 1.45 \begin{align*} \frac{b^{4} x^{3}}{3 e^{2}} + \frac{4 b \left (a e - b d\right )^{3} \log{\left (d + e x \right )}}{e^{5}} - \frac{a^{4} e^{4} - 4 a^{3} b d e^{3} + 6 a^{2} b^{2} d^{2} e^{2} - 4 a b^{3} d^{3} e + b^{4} d^{4}}{d e^{5} + e^{6} x} + \frac{x^{2} \left (2 a b^{3} e - b^{4} d\right )}{e^{3}} + \frac{x \left (6 a^{2} b^{2} e^{2} - 8 a b^{3} d e + 3 b^{4} d^{2}\right )}{e^{4}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.18258, size = 323, normalized size = 3.11 \begin{align*} \frac{1}{3} \,{\left (b^{4} - \frac{6 \,{\left (b^{4} d e - a b^{3} e^{2}\right )} e^{\left (-1\right )}}{x e + d} + \frac{18 \,{\left (b^{4} d^{2} e^{2} - 2 \, a b^{3} d e^{3} + a^{2} 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 )} + 4 \,{\left (b^{4} d^{3} - 3 \, a b^{3} d^{2} e + 3 \, a^{2} b^{2} d e^{2} - a^{3} b e^{3}\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{b^{4} d^{4} e^{3}}{x e + d} - \frac{4 \, a b^{3} d^{3} e^{4}}{x e + d} + \frac{6 \, a^{2} b^{2} d^{2} e^{5}}{x e + d} - \frac{4 \, a^{3} b d e^{6}}{x e + d} + \frac{a^{4} e^{7}}{x e + d}\right )} e^{\left (-8\right )} \end{align*}

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

[In]

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

[Out]

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