Integrand size = 21, antiderivative size = 132 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=\frac {x \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\left (b^3 e+2 a c (2 c d-3 b e)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2 \left (b^2-4 a c\right )^{3/2}}+\frac {e \log \left (a+b x+c x^2\right )}{2 c^2} \] Output:
x*(a*(-b*e+2*c*d)+(2*a*c*e-b^2*e+b*c*d)*x)/c/(-4*a*c+b^2)/(c*x^2+b*x+a)+(b ^3*e+2*a*c*(-3*b*e+2*c*d))*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))/c^2/(-4*a *c+b^2)^(3/2)+1/2*e*ln(c*x^2+b*x+a)/c^2
Time = 0.19 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.11 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=\frac {-\frac {2 \left (2 a^2 c e+b^2 (c d-b e) x+a \left (-b^2 e-2 c^2 d x+b c (d+3 e x)\right )\right )}{\left (b^2-4 a c\right ) (a+x (b+c x))}+\frac {2 \left (b^3 e+2 a c (2 c d-3 b e)\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{3/2}}+e \log (a+x (b+c x))}{2 c^2} \] Input:
Integrate[(x^2*(d + e*x))/(a + b*x + c*x^2)^2,x]
Output:
((-2*(2*a^2*c*e + b^2*(c*d - b*e)*x + a*(-(b^2*e) - 2*c^2*d*x + b*c*(d + 3 *e*x))))/((b^2 - 4*a*c)*(a + x*(b + c*x))) + (2*(b^3*e + 2*a*c*(2*c*d - 3* b*e))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/(-b^2 + 4*a*c)^(3/2) + e*Log [a + x*(b + c*x)])/(2*c^2)
Time = 0.36 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.19, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {1233, 25, 1142, 1083, 219, 1103}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx\) |
\(\Big \downarrow \) 1233 |
\(\displaystyle \frac {\int -\frac {a (2 c d-b e)-\left (b^2-4 a c\right ) e x}{c x^2+b x+a}dx}{c \left (b^2-4 a c\right )}+\frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {\int \frac {a (2 c d-b e)-\left (b^2-4 a c\right ) e x}{c x^2+b x+a}dx}{c \left (b^2-4 a c\right )}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {\frac {\left (2 a c (2 c d-3 b e)+b^3 e\right ) \int \frac {1}{c x^2+b x+a}dx}{2 c}-\frac {e \left (b^2-4 a c\right ) \int \frac {b+2 c x}{c x^2+b x+a}dx}{2 c}}{c \left (b^2-4 a c\right )}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {-\frac {e \left (b^2-4 a c\right ) \int \frac {b+2 c x}{c x^2+b x+a}dx}{2 c}-\frac {\left (2 a c (2 c d-3 b e)+b^3 e\right ) \int \frac {1}{b^2-(b+2 c x)^2-4 a c}d(b+2 c x)}{c}}{c \left (b^2-4 a c\right )}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {-\frac {e \left (b^2-4 a c\right ) \int \frac {b+2 c x}{c x^2+b x+a}dx}{2 c}-\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 a c (2 c d-3 b e)+b^3 e\right )}{c \sqrt {b^2-4 a c}}}{c \left (b^2-4 a c\right )}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {x \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {-\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 a c (2 c d-3 b e)+b^3 e\right )}{c \sqrt {b^2-4 a c}}-\frac {e \left (b^2-4 a c\right ) \log \left (a+b x+c x^2\right )}{2 c}}{c \left (b^2-4 a c\right )}\) |
Input:
Int[(x^2*(d + e*x))/(a + b*x + c*x^2)^2,x]
Output:
(x*(a*(2*c*d - b*e) + (b*c*d - b^2*e + 2*a*c*e)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) - (-(((b^3*e + 2*a*c*(2*c*d - 3*b*e))*ArcTanh[(b + 2*c*x)/Sq rt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*a*c])) - ((b^2 - 4*a*c)*e*Log[a + b*x + c*x^2])/(2*c))/(c*(b^2 - 4*a*c))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(-(d + e*x)^(m - 1))*(a + b*x + c*x^2) ^(p + 1)*((2*a*c*(e*f + d*g) - b*(c*d*f + a*e*g) - (2*c^2*d*f + b^2*e*g - c *(b*e*f + b*d*g + 2*a*e*g))*x)/(c*(p + 1)*(b^2 - 4*a*c))), x] - Simp[1/(c*( p + 1)*(b^2 - 4*a*c)) Int[(d + e*x)^(m - 2)*(a + b*x + c*x^2)^(p + 1)*Sim p[2*c^2*d^2*f*(2*p + 3) + b*e*g*(a*e*(m - 1) + b*d*(p + 2)) - c*(2*a*e*(e*f *(m - 1) + d*g*m) + b*d*(d*g*(2*p + 3) - e*f*(m - 2*p - 4))) + e*(b^2*e*g*( m + p + 1) + 2*c^2*d*f*(m + 2*p + 2) - c*(2*a*e*g*m + b*(e*f + d*g)*(m + 2* p + 2)))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && LtQ[p, -1] && GtQ[m, 1] && ((EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, b, c, d, e, f, g]) | | !ILtQ[m + 2*p + 3, 0])
Time = 1.30 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.52
method | result | size |
default | \(\frac {\frac {\left (3 a b c e -2 a \,c^{2} d -e \,b^{3}+c d \,b^{2}\right ) x}{c^{2} \left (4 a c -b^{2}\right )}+\frac {a \left (2 a c e -e \,b^{2}+d b c \right )}{c^{2} \left (4 a c -b^{2}\right )}}{c \,x^{2}+b x +a}+\frac {\frac {\left (4 a c e -e \,b^{2}\right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (-a b e +2 a c d -\frac {\left (4 a c e -e \,b^{2}\right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{\left (4 a c -b^{2}\right ) c}\) | \(200\) |
risch | \(\text {Expression too large to display}\) | \(1308\) |
Input:
int(x^2*(e*x+d)/(c*x^2+b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
(1/c^2*(3*a*b*c*e-2*a*c^2*d-b^3*e+b^2*c*d)/(4*a*c-b^2)*x+a*(2*a*c*e-b^2*e+ b*c*d)/c^2/(4*a*c-b^2))/(c*x^2+b*x+a)+1/(4*a*c-b^2)/c*(1/2*(4*a*c*e-b^2*e) /c*ln(c*x^2+b*x+a)+2*(-a*b*e+2*a*c*d-1/2*(4*a*c*e-b^2*e)*b/c)/(4*a*c-b^2)^ (1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 397 vs. \(2 (126) = 252\).
Time = 0.09 (sec) , antiderivative size = 813, normalized size of antiderivative = 6.16 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx =\text {Too large to display} \] Input:
integrate(x^2*(e*x+d)/(c*x^2+b*x+a)^2,x, algorithm="fricas")
Output:
[1/2*((4*a^2*c^2*d + (4*a*c^3*d + (b^3*c - 6*a*b*c^2)*e)*x^2 + (a*b^3 - 6* a^2*b*c)*e + (4*a*b*c^2*d + (b^4 - 6*a*b^2*c)*e)*x)*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)) - 2*(a*b^3*c - 4*a^2*b*c^2)*d + 2*(a*b^4 - 6*a^2*b^2*c + 8*a^ 3*c^2)*e - 2*((b^4*c - 6*a*b^2*c^2 + 8*a^2*c^3)*d - (b^5 - 7*a*b^3*c + 12* a^2*b*c^2)*e)*x + ((b^4*c - 8*a*b^2*c^2 + 16*a^2*c^3)*e*x^2 + (b^5 - 8*a*b ^3*c + 16*a^2*b*c^2)*e*x + (a*b^4 - 8*a^2*b^2*c + 16*a^3*c^2)*e)*log(c*x^2 + b*x + a))/(a*b^4*c^2 - 8*a^2*b^2*c^3 + 16*a^3*c^4 + (b^4*c^3 - 8*a*b^2* c^4 + 16*a^2*c^5)*x^2 + (b^5*c^2 - 8*a*b^3*c^3 + 16*a^2*b*c^4)*x), 1/2*(2* (4*a^2*c^2*d + (4*a*c^3*d + (b^3*c - 6*a*b*c^2)*e)*x^2 + (a*b^3 - 6*a^2*b* c)*e + (4*a*b*c^2*d + (b^4 - 6*a*b^2*c)*e)*x)*sqrt(-b^2 + 4*a*c)*arctan(-s qrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) - 2*(a*b^3*c - 4*a^2*b*c^2)*d + 2*(a*b^4 - 6*a^2*b^2*c + 8*a^3*c^2)*e - 2*((b^4*c - 6*a*b^2*c^2 + 8*a^2 *c^3)*d - (b^5 - 7*a*b^3*c + 12*a^2*b*c^2)*e)*x + ((b^4*c - 8*a*b^2*c^2 + 16*a^2*c^3)*e*x^2 + (b^5 - 8*a*b^3*c + 16*a^2*b*c^2)*e*x + (a*b^4 - 8*a^2* b^2*c + 16*a^3*c^2)*e)*log(c*x^2 + b*x + a))/(a*b^4*c^2 - 8*a^2*b^2*c^3 + 16*a^3*c^4 + (b^4*c^3 - 8*a*b^2*c^4 + 16*a^2*c^5)*x^2 + (b^5*c^2 - 8*a*b^3 *c^3 + 16*a^2*b*c^4)*x)]
Leaf count of result is larger than twice the leaf count of optimal. 901 vs. \(2 (124) = 248\).
Time = 1.49 (sec) , antiderivative size = 901, normalized size of antiderivative = 6.83 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx =\text {Too large to display} \] Input:
integrate(x**2*(e*x+d)/(c*x**2+b*x+a)**2,x)
Output:
(e/(2*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2*d - b**3*e)/( 2*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6)))*log(x + ( -16*a**2*c**3*(e/(2*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2 *d - b**3*e)/(2*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b** 6))) + 8*a**2*c*e + 8*a*b**2*c**2*(e/(2*c**2) - sqrt(-(4*a*c - b**2)**3)*( 6*a*b*c*e - 4*a*c**2*d - b**3*e)/(2*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) - a*b**2*e - 2*a*b*c*d - b**4*c*(e/(2*c**2) - sqr t(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2*d - b**3*e)/(2*c**2*(64*a**3*c **3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))))/(6*a*b*c*e - 4*a*c**2*d - b**3*e)) + (e/(2*c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2*d - b**3*e)/(2*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6) ))*log(x + (-16*a**2*c**3*(e/(2*c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c* e - 4*a*c**2*d - b**3*e)/(2*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a* b**4*c - b**6))) + 8*a**2*c*e + 8*a*b**2*c**2*(e/(2*c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2*d - b**3*e)/(2*c**2*(64*a**3*c**3 - 48*a* *2*b**2*c**2 + 12*a*b**4*c - b**6))) - a*b**2*e - 2*a*b*c*d - b**4*c*(e/(2 *c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*e - 4*a*c**2*d - b**3*e)/(2*c** 2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))))/(6*a*b*c*e - 4*a*c**2*d - b**3*e)) + (2*a**2*c*e - a*b**2*e + a*b*c*d + x*(3*a*b*c*e - 2*a*c**2*d - b**3*e + b**2*c*d))/(4*a**2*c**3 - a*b**2*c**2 + x**2*(4*a...
Exception generated. \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(x^2*(e*x+d)/(c*x^2+b*x+a)^2,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.22 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.23 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=-\frac {{\left (4 \, a c^{2} d + b^{3} e - 6 \, a b c e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {e \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} - \frac {a b c d - a b^{2} e + 2 \, a^{2} c e + {\left (b^{2} c d - 2 \, a c^{2} d - b^{3} e + 3 \, a b c e\right )} x}{{\left (c x^{2} + b x + a\right )} {\left (b^{2} - 4 \, a c\right )} c^{2}} \] Input:
integrate(x^2*(e*x+d)/(c*x^2+b*x+a)^2,x, algorithm="giac")
Output:
-(4*a*c^2*d + b^3*e - 6*a*b*c*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(( b^2*c^2 - 4*a*c^3)*sqrt(-b^2 + 4*a*c)) + 1/2*e*log(c*x^2 + b*x + a)/c^2 - (a*b*c*d - a*b^2*e + 2*a^2*c*e + (b^2*c*d - 2*a*c^2*d - b^3*e + 3*a*b*c*e) *x)/((c*x^2 + b*x + a)*(b^2 - 4*a*c)*c^2)
Time = 11.12 (sec) , antiderivative size = 895, normalized size of antiderivative = 6.78 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=\frac {2\,a^2\,c\,e}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}-\frac {a\,b^2\,e}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}-\frac {b^3\,e\,x}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}+\frac {4\,a\,d\,\mathrm {atan}\left (\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}-\frac {b^3}{{\left (4\,a\,c-b^2\right )}^{3/2}}+\frac {4\,a\,b\,c}{{\left (4\,a\,c-b^2\right )}^{3/2}}\right )}{{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {b^6\,e\,\ln \left (c\,x^2+b\,x+a\right )}{2\,\left (64\,a^3\,c^5-48\,a^2\,b^2\,c^4+12\,a\,b^4\,c^3-b^6\,c^2\right )}-\frac {2\,a\,c^2\,d\,x}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}+\frac {b^2\,c\,d\,x}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}+\frac {a\,b\,c\,d}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}+\frac {32\,a^3\,c^3\,e\,\ln \left (c\,x^2+b\,x+a\right )}{64\,a^3\,c^5-48\,a^2\,b^2\,c^4+12\,a\,b^4\,c^3-b^6\,c^2}+\frac {b^3\,e\,\mathrm {atan}\left (\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}-\frac {b^3}{{\left (4\,a\,c-b^2\right )}^{3/2}}+\frac {4\,a\,b\,c}{{\left (4\,a\,c-b^2\right )}^{3/2}}\right )}{c^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}+\frac {3\,a\,b\,c\,e\,x}{4\,a^2\,c^3-a\,b^2\,c^2+4\,a\,b\,c^3\,x+4\,a\,c^4\,x^2-b^3\,c^2\,x-b^2\,c^3\,x^2}-\frac {24\,a^2\,b^2\,c^2\,e\,\ln \left (c\,x^2+b\,x+a\right )}{64\,a^3\,c^5-48\,a^2\,b^2\,c^4+12\,a\,b^4\,c^3-b^6\,c^2}+\frac {6\,a\,b^4\,c\,e\,\ln \left (c\,x^2+b\,x+a\right )}{64\,a^3\,c^5-48\,a^2\,b^2\,c^4+12\,a\,b^4\,c^3-b^6\,c^2}-\frac {6\,a\,b\,e\,\mathrm {atan}\left (\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}-\frac {b^3}{{\left (4\,a\,c-b^2\right )}^{3/2}}+\frac {4\,a\,b\,c}{{\left (4\,a\,c-b^2\right )}^{3/2}}\right )}{c\,{\left (4\,a\,c-b^2\right )}^{3/2}} \] Input:
int((x^2*(d + e*x))/(a + b*x + c*x^2)^2,x)
Output:
(2*a^2*c*e)/(4*a^2*c^3 - a*b^2*c^2 + 4*a*c^4*x^2 - b^3*c^2*x - b^2*c^3*x^2 + 4*a*b*c^3*x) - (a*b^2*e)/(4*a^2*c^3 - a*b^2*c^2 + 4*a*c^4*x^2 - b^3*c^2 *x - b^2*c^3*x^2 + 4*a*b*c^3*x) - (b^3*e*x)/(4*a^2*c^3 - a*b^2*c^2 + 4*a*c ^4*x^2 - b^3*c^2*x - b^2*c^3*x^2 + 4*a*b*c^3*x) + (4*a*d*atan((2*c*x)/(4*a *c - b^2)^(1/2) - b^3/(4*a*c - b^2)^(3/2) + (4*a*b*c)/(4*a*c - b^2)^(3/2)) )/(4*a*c - b^2)^(3/2) - (b^6*e*log(a + b*x + c*x^2))/(2*(64*a^3*c^5 - b^6* c^2 + 12*a*b^4*c^3 - 48*a^2*b^2*c^4)) - (2*a*c^2*d*x)/(4*a^2*c^3 - a*b^2*c ^2 + 4*a*c^4*x^2 - b^3*c^2*x - b^2*c^3*x^2 + 4*a*b*c^3*x) + (b^2*c*d*x)/(4 *a^2*c^3 - a*b^2*c^2 + 4*a*c^4*x^2 - b^3*c^2*x - b^2*c^3*x^2 + 4*a*b*c^3*x ) + (a*b*c*d)/(4*a^2*c^3 - a*b^2*c^2 + 4*a*c^4*x^2 - b^3*c^2*x - b^2*c^3*x ^2 + 4*a*b*c^3*x) + (32*a^3*c^3*e*log(a + b*x + c*x^2))/(64*a^3*c^5 - b^6* c^2 + 12*a*b^4*c^3 - 48*a^2*b^2*c^4) + (b^3*e*atan((2*c*x)/(4*a*c - b^2)^( 1/2) - b^3/(4*a*c - b^2)^(3/2) + (4*a*b*c)/(4*a*c - b^2)^(3/2)))/(c^2*(4*a *c - b^2)^(3/2)) + (3*a*b*c*e*x)/(4*a^2*c^3 - a*b^2*c^2 + 4*a*c^4*x^2 - b^ 3*c^2*x - b^2*c^3*x^2 + 4*a*b*c^3*x) - (24*a^2*b^2*c^2*e*log(a + b*x + c*x ^2))/(64*a^3*c^5 - b^6*c^2 + 12*a*b^4*c^3 - 48*a^2*b^2*c^4) + (6*a*b^4*c*e *log(a + b*x + c*x^2))/(64*a^3*c^5 - b^6*c^2 + 12*a*b^4*c^3 - 48*a^2*b^2*c ^4) - (6*a*b*e*atan((2*c*x)/(4*a*c - b^2)^(1/2) - b^3/(4*a*c - b^2)^(3/2) + (4*a*b*c)/(4*a*c - b^2)^(3/2)))/(c*(4*a*c - b^2)^(3/2))
Time = 0.29 (sec) , antiderivative size = 766, normalized size of antiderivative = 5.80 \[ \int \frac {x^2 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx=\frac {16 a^{3} c^{3} d +2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a \,b^{4} e +2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) b^{5} e x +16 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a^{3} b \,c^{2} e -8 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a^{2} b^{3} c e -24 a^{2} b \,c^{3} e \,x^{2}+14 a \,b^{3} c^{2} e \,x^{2}-12 a \,b^{2} c^{3} d \,x^{2}+\mathrm {log}\left (c \,x^{2}+b x +a \right ) a \,b^{5} e +\mathrm {log}\left (c \,x^{2}+b x +a \right ) b^{6} e x -8 a^{3} b \,c^{2} e +2 a^{2} b^{3} c e -4 a^{2} b^{2} c^{2} d +16 a^{2} c^{4} d \,x^{2}-2 b^{5} c e \,x^{2}+2 b^{4} c^{2} d \,x^{2}+8 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a^{2} b \,c^{2} d +2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) b^{4} c e \,x^{2}+16 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a^{2} b^{2} c^{2} e x +16 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a^{2} b \,c^{3} e \,x^{2}-8 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a \,b^{4} c e x -8 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a \,b^{3} c^{2} e \,x^{2}-12 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a \,b^{3} c e x +8 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a \,b^{2} c^{2} d x -12 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a \,b^{2} c^{2} e \,x^{2}+8 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a b \,c^{3} d \,x^{2}+\mathrm {log}\left (c \,x^{2}+b x +a \right ) b^{5} c e \,x^{2}-12 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a^{2} b^{2} c e}{2 b \,c^{2} \left (16 a^{2} c^{3} x^{2}-8 a \,b^{2} c^{2} x^{2}+b^{4} c \,x^{2}+16 a^{2} b \,c^{2} x -8 a \,b^{3} c x +b^{5} x +16 a^{3} c^{2}-8 a^{2} b^{2} c +a \,b^{4}\right )} \] Input:
int(x^2*(e*x+d)/(c*x^2+b*x+a)^2,x)
Output:
( - 12*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**2*b**2*c *e + 8*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**2*b*c**2 *d + 2*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*b**4*e - 12*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*b**3*c*e*x + 8*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*b**2*c**2*d*x - 12*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*b**2*c**2*e *x**2 + 8*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*b*c**3 *d*x**2 + 2*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*b**5*e *x + 2*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*b**4*c*e*x* *2 + 16*log(a + b*x + c*x**2)*a**3*b*c**2*e - 8*log(a + b*x + c*x**2)*a**2 *b**3*c*e + 16*log(a + b*x + c*x**2)*a**2*b**2*c**2*e*x + 16*log(a + b*x + c*x**2)*a**2*b*c**3*e*x**2 + log(a + b*x + c*x**2)*a*b**5*e - 8*log(a + b *x + c*x**2)*a*b**4*c*e*x - 8*log(a + b*x + c*x**2)*a*b**3*c**2*e*x**2 + l og(a + b*x + c*x**2)*b**6*e*x + log(a + b*x + c*x**2)*b**5*c*e*x**2 - 8*a* *3*b*c**2*e + 16*a**3*c**3*d + 2*a**2*b**3*c*e - 4*a**2*b**2*c**2*d - 24*a **2*b*c**3*e*x**2 + 16*a**2*c**4*d*x**2 + 14*a*b**3*c**2*e*x**2 - 12*a*b** 2*c**3*d*x**2 - 2*b**5*c*e*x**2 + 2*b**4*c**2*d*x**2)/(2*b*c**2*(16*a**3*c **2 - 8*a**2*b**2*c + 16*a**2*b*c**2*x + 16*a**2*c**3*x**2 + a*b**4 - 8*a* b**3*c*x - 8*a*b**2*c**2*x**2 + b**5*x + b**4*c*x**2))