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

Optimal. Leaf size=76 $-12 c d^4 \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}+12 c d^4 (b+2 c x)$

[Out]

12*c*d^4*(b + 2*c*x) - (d^4*(b + 2*c*x)^3)/(a + b*x + c*x^2) - 12*c*Sqrt[b^2 - 4*a*c]*d^4*ArcTanh[(b + 2*c*x)/
Sqrt[b^2 - 4*a*c]]

________________________________________________________________________________________

Rubi [A]  time = 0.0507377, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.167, Rules used = {686, 692, 618, 206} $-12 c d^4 \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}+12 c d^4 (b+2 c x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

12*c*d^4*(b + 2*c*x) - (d^4*(b + 2*c*x)^3)/(a + b*x + c*x^2) - 12*c*Sqrt[b^2 - 4*a*c]*d^4*ArcTanh[(b + 2*c*x)/
Sqrt[b^2 - 4*a*c]]

Rule 686

Int[((d_) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d*(d + e*x)^(m - 1)*
(a + b*x + c*x^2)^(p + 1))/(b*(p + 1)), x] - Dist[(d*e*(m - 1))/(b*(p + 1)), Int[(d + e*x)^(m - 2)*(a + b*x +
c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e, 0] && NeQ[m + 2
*p + 3, 0] && LtQ[p, -1] && GtQ[m, 1] && IntegerQ[2*p]

Rule 692

Int[((d_) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(2*d*(d + e*x)^(m -
1)*(a + b*x + c*x^2)^(p + 1))/(b*(m + 2*p + 1)), x] + Dist[(d^2*(m - 1)*(b^2 - 4*a*c))/(b^2*(m + 2*p + 1)), In
t[(d + e*x)^(m - 2)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[
2*c*d - b*e, 0] && NeQ[m + 2*p + 3, 0] && GtQ[m, 1] && NeQ[m + 2*p + 1, 0] && (IntegerQ[2*p] || (IntegerQ[m] &
& RationalQ[p]) || OddQ[m])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(b d+2 c d x)^4}{\left (a+b x+c x^2\right )^2} \, dx &=-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}+\left (6 c d^2\right ) \int \frac{(b d+2 c d x)^2}{a+b x+c x^2} \, dx\\ &=12 c d^4 (b+2 c x)-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}+\left (6 c \left (b^2-4 a c\right ) d^4\right ) \int \frac{1}{a+b x+c x^2} \, dx\\ &=12 c d^4 (b+2 c x)-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}-\left (12 c \left (b^2-4 a c\right ) d^4\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )\\ &=12 c d^4 (b+2 c x)-\frac{d^4 (b+2 c x)^3}{a+b x+c x^2}-12 c \sqrt{b^2-4 a c} d^4 \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0517713, size = 77, normalized size = 1.01 $d^4 \left (-\frac{\left (b^2-4 a c\right ) (b+2 c x)}{a+x (b+c x)}-12 c \sqrt{4 a c-b^2} \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )+16 c^2 x\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

d^4*(16*c^2*x - ((b^2 - 4*a*c)*(b + 2*c*x))/(a + x*(b + c*x)) - 12*c*Sqrt[-b^2 + 4*a*c]*ArcTan[(b + 2*c*x)/Sqr
t[-b^2 + 4*a*c]])

________________________________________________________________________________________

Maple [A]  time = 0.157, size = 133, normalized size = 1.8 \begin{align*} 16\,{d}^{4}{c}^{2}x+8\,{\frac{{d}^{4}a{c}^{2}x}{c{x}^{2}+bx+a}}-2\,{\frac{{d}^{4}{b}^{2}cx}{c{x}^{2}+bx+a}}+4\,{\frac{{d}^{4}abc}{c{x}^{2}+bx+a}}-{\frac{{d}^{4}{b}^{3}}{c{x}^{2}+bx+a}}-12\,{d}^{4}c\sqrt{4\,ac-{b}^{2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.08437, size = 647, normalized size = 8.51 \begin{align*} \left [\frac{16 \, c^{3} d^{4} x^{3} + 16 \, b c^{2} d^{4} x^{2} - 2 \,{\left (b^{2} c - 12 \, a c^{2}\right )} d^{4} x -{\left (b^{3} - 4 \, a b c\right )} d^{4} + 6 \,{\left (c^{2} d^{4} x^{2} + b c d^{4} x + a c d^{4}\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right )}{c x^{2} + b x + a}, \frac{16 \, c^{3} d^{4} x^{3} + 16 \, b c^{2} d^{4} x^{2} - 2 \,{\left (b^{2} c - 12 \, a c^{2}\right )} d^{4} x -{\left (b^{3} - 4 \, a b c\right )} d^{4} - 12 \,{\left (c^{2} d^{4} x^{2} + b c d^{4} x + a c d^{4}\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right )}{c x^{2} + b x + a}\right ] \end{align*}

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

[In]

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

[Out]

[(16*c^3*d^4*x^3 + 16*b*c^2*d^4*x^2 - 2*(b^2*c - 12*a*c^2)*d^4*x - (b^3 - 4*a*b*c)*d^4 + 6*(c^2*d^4*x^2 + b*c*
d^4*x + a*c*d^4)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c*
x^2 + b*x + a)))/(c*x^2 + b*x + a), (16*c^3*d^4*x^3 + 16*b*c^2*d^4*x^2 - 2*(b^2*c - 12*a*c^2)*d^4*x - (b^3 - 4
*a*b*c)*d^4 - 12*(c^2*d^4*x^2 + b*c*d^4*x + a*c*d^4)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)
/(b^2 - 4*a*c)))/(c*x^2 + b*x + a)]

________________________________________________________________________________________

Sympy [B]  time = 1.65756, size = 173, normalized size = 2.28 \begin{align*} 16 c^{2} d^{4} x + c d^{4} \sqrt{- 144 a c + 36 b^{2}} \log{\left (x + \frac{6 b c d^{4} - c d^{4} \sqrt{- 144 a c + 36 b^{2}}}{12 c^{2} d^{4}} \right )} - c d^{4} \sqrt{- 144 a c + 36 b^{2}} \log{\left (x + \frac{6 b c d^{4} + c d^{4} \sqrt{- 144 a c + 36 b^{2}}}{12 c^{2} d^{4}} \right )} + \frac{4 a b c d^{4} - b^{3} d^{4} + x \left (8 a c^{2} d^{4} - 2 b^{2} c d^{4}\right )}{a + b x + c x^{2}} \end{align*}

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

[In]

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

[Out]

16*c**2*d**4*x + c*d**4*sqrt(-144*a*c + 36*b**2)*log(x + (6*b*c*d**4 - c*d**4*sqrt(-144*a*c + 36*b**2))/(12*c*
*2*d**4)) - c*d**4*sqrt(-144*a*c + 36*b**2)*log(x + (6*b*c*d**4 + c*d**4*sqrt(-144*a*c + 36*b**2))/(12*c**2*d*
*4)) + (4*a*b*c*d**4 - b**3*d**4 + x*(8*a*c**2*d**4 - 2*b**2*c*d**4))/(a + b*x + c*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.16134, size = 151, normalized size = 1.99 \begin{align*} 16 \, c^{2} d^{4} x + \frac{12 \,{\left (b^{2} c d^{4} - 4 \, a c^{2} d^{4}\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c}} - \frac{2 \, b^{2} c d^{4} x - 8 \, a c^{2} d^{4} x + b^{3} d^{4} - 4 \, a b c d^{4}}{c x^{2} + b x + a} \end{align*}

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

[In]

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

[Out]

16*c^2*d^4*x + 12*(b^2*c*d^4 - 4*a*c^2*d^4)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/sqrt(-b^2 + 4*a*c) - (2*b^2
*c*d^4*x - 8*a*c^2*d^4*x + b^3*d^4 - 4*a*b*c*d^4)/(c*x^2 + b*x + a)