Integrand size = 27, antiderivative size = 302 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=-\frac {f \left (10 c f g^3-6 b f g^2 h+6 c d g h^2+3 a f g h^2-2 b d h^3\right ) x}{h^6}-\frac {f \left (f h (3 b g-a h)-2 c \left (3 f g^2+d h^2\right )\right ) x^2}{2 h^5}-\frac {f^2 (3 c g-b h) x^3}{3 h^4}+\frac {c f^2 x^4}{4 h^3}-\frac {\left (c g^2-b g h+a h^2\right ) \left (f g^2+d h^2\right )^2}{2 h^7 (g+h x)^2}+\frac {\left (f g^2+d h^2\right ) \left (6 c f g^3-5 b f g^2 h+2 c d g h^2+4 a f g h^2-b d h^3\right )}{h^7 (g+h x)}-\frac {\left (2 f h \left (5 b f g^3-3 a f g^2 h+3 b d g h^2-a d h^3\right )-c \left (15 f^2 g^4+12 d f g^2 h^2+d^2 h^4\right )\right ) \log (g+h x)}{h^7} \] Output:
-f*(3*a*f*g*h^2-2*b*d*h^3-6*b*f*g^2*h+6*c*d*g*h^2+10*c*f*g^3)*x/h^6-1/2*f* (f*h*(-a*h+3*b*g)-2*c*(d*h^2+3*f*g^2))*x^2/h^5-1/3*f^2*(-b*h+3*c*g)*x^3/h^ 4+1/4*c*f^2*x^4/h^3-1/2*(a*h^2-b*g*h+c*g^2)*(d*h^2+f*g^2)^2/h^7/(h*x+g)^2+ (d*h^2+f*g^2)*(4*a*f*g*h^2-b*d*h^3-5*b*f*g^2*h+2*c*d*g*h^2+6*c*f*g^3)/h^7/ (h*x+g)-(2*f*h*(-a*d*h^3-3*a*f*g^2*h+3*b*d*g*h^2+5*b*f*g^3)-c*(d^2*h^4+12* d*f*g^2*h^2+15*f^2*g^4))*ln(h*x+g)/h^7
Time = 0.13 (sec) , antiderivative size = 287, normalized size of antiderivative = 0.95 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=\frac {-12 f h \left (10 c f g^3-6 b f g^2 h+6 c d g h^2+3 a f g h^2-2 b d h^3\right ) x+6 f h^2 \left (f h (-3 b g+a h)+2 c \left (3 f g^2+d h^2\right )\right ) x^2+4 f^2 h^3 (-3 c g+b h) x^3+3 c f^2 h^4 x^4-\frac {6 \left (f g^2+d h^2\right )^2 \left (c g^2+h (-b g+a h)\right )}{(g+h x)^2}+\frac {12 \left (f g^2+d h^2\right ) \left (6 c f g^3-5 b f g^2 h+2 c d g h^2+4 a f g h^2-b d h^3\right )}{g+h x}+12 \left (2 f h \left (-5 b f g^3+3 a f g^2 h-3 b d g h^2+a d h^3\right )+c \left (15 f^2 g^4+12 d f g^2 h^2+d^2 h^4\right )\right ) \log (g+h x)}{12 h^7} \] Input:
Integrate[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x)^3,x]
Output:
(-12*f*h*(10*c*f*g^3 - 6*b*f*g^2*h + 6*c*d*g*h^2 + 3*a*f*g*h^2 - 2*b*d*h^3 )*x + 6*f*h^2*(f*h*(-3*b*g + a*h) + 2*c*(3*f*g^2 + d*h^2))*x^2 + 4*f^2*h^3 *(-3*c*g + b*h)*x^3 + 3*c*f^2*h^4*x^4 - (6*(f*g^2 + d*h^2)^2*(c*g^2 + h*(- (b*g) + a*h)))/(g + h*x)^2 + (12*(f*g^2 + d*h^2)*(6*c*f*g^3 - 5*b*f*g^2*h + 2*c*d*g*h^2 + 4*a*f*g*h^2 - b*d*h^3))/(g + h*x) + 12*(2*f*h*(-5*b*f*g^3 + 3*a*f*g^2*h - 3*b*d*g*h^2 + a*d*h^3) + c*(15*f^2*g^4 + 12*d*f*g^2*h^2 + d^2*h^4))*Log[g + h*x])/(12*h^7)
Time = 0.72 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2159, 2009}
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 {\left (d+f x^2\right )^2 \left (a+b x+c x^2\right )}{(g+h x)^3} \, dx\) |
\(\Big \downarrow \) 2159 |
\(\displaystyle \int \left (\frac {c \left (d^2 h^4+12 d f g^2 h^2+15 f^2 g^4\right )-2 f h \left (-a d h^3-3 a f g^2 h+3 b d g h^2+5 b f g^3\right )}{h^6 (g+h x)}+\frac {\left (d h^2+f g^2\right )^2 \left (a h^2-b g h+c g^2\right )}{h^6 (g+h x)^3}+\frac {f x \left (2 c \left (d h^2+3 f g^2\right )-f h (3 b g-a h)\right )}{h^5}+\frac {\left (d h^2+f g^2\right ) \left (-4 a f g h^2+b d h^3+5 b f g^2 h-2 c d g h^2-6 c f g^3\right )}{h^6 (g+h x)^2}-\frac {f \left (3 a f g h^2-2 b d h^3-6 b f g^2 h+6 c d g h^2+10 c f g^3\right )}{h^6}+\frac {f^2 x^2 (b h-3 c g)}{h^4}+\frac {c f^2 x^3}{h^3}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\log (g+h x) \left (2 f h \left (-a d h^3-3 a f g^2 h+3 b d g h^2+5 b f g^3\right )-c \left (d^2 h^4+12 d f g^2 h^2+15 f^2 g^4\right )\right )}{h^7}-\frac {\left (d h^2+f g^2\right )^2 \left (a h^2-b g h+c g^2\right )}{2 h^7 (g+h x)^2}-\frac {f x^2 \left (f h (3 b g-a h)-2 c \left (d h^2+3 f g^2\right )\right )}{2 h^5}+\frac {\left (d h^2+f g^2\right ) \left (4 a f g h^2-b d h^3-5 b f g^2 h+2 c d g h^2+6 c f g^3\right )}{h^7 (g+h x)}-\frac {f x \left (3 a f g h^2-2 b d h^3-6 b f g^2 h+6 c d g h^2+10 c f g^3\right )}{h^6}-\frac {f^2 x^3 (3 c g-b h)}{3 h^4}+\frac {c f^2 x^4}{4 h^3}\) |
Input:
Int[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x)^3,x]
Output:
-((f*(10*c*f*g^3 - 6*b*f*g^2*h + 6*c*d*g*h^2 + 3*a*f*g*h^2 - 2*b*d*h^3)*x) /h^6) - (f*(f*h*(3*b*g - a*h) - 2*c*(3*f*g^2 + d*h^2))*x^2)/(2*h^5) - (f^2 *(3*c*g - b*h)*x^3)/(3*h^4) + (c*f^2*x^4)/(4*h^3) - ((c*g^2 - b*g*h + a*h^ 2)*(f*g^2 + d*h^2)^2)/(2*h^7*(g + h*x)^2) + ((f*g^2 + d*h^2)*(6*c*f*g^3 - 5*b*f*g^2*h + 2*c*d*g*h^2 + 4*a*f*g*h^2 - b*d*h^3))/(h^7*(g + h*x)) - ((2* f*h*(5*b*f*g^3 - 3*a*f*g^2*h + 3*b*d*g*h^2 - a*d*h^3) - c*(15*f^2*g^4 + 12 *d*f*g^2*h^2 + d^2*h^4))*Log[g + h*x])/h^7
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p _.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x ], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Time = 1.03 (sec) , antiderivative size = 392, normalized size of antiderivative = 1.30
method | result | size |
norman | \(\frac {\frac {\left (4 a d f g \,h^{4}+12 a \,f^{2} g^{3} h^{2}-b \,d^{2} h^{5}-12 b d f \,g^{2} h^{3}-20 b \,f^{2} g^{4} h +2 c \,d^{2} g \,h^{4}+24 c d f \,g^{3} h^{2}+30 c \,f^{2} g^{5}\right ) x}{h^{6}}-\frac {a \,d^{2} h^{6}-6 a d f \,g^{2} h^{4}-18 a \,f^{2} g^{4} h^{2}+b \,d^{2} g \,h^{5}+18 b d f \,g^{3} h^{3}+30 b \,f^{2} g^{5} h -3 c \,d^{2} g^{2} h^{4}-36 c d f \,g^{4} h^{2}-45 c \,f^{2} g^{6}}{2 h^{7}}+\frac {c \,f^{2} x^{6}}{4 h}+\frac {f \left (6 a f \,h^{2}-10 b f g h +12 c d \,h^{2}+15 c f \,g^{2}\right ) x^{4}}{12 h^{3}}-\frac {f \left (6 a f g \,h^{2}-6 b d \,h^{3}-10 b f \,g^{2} h +12 c d g \,h^{2}+15 c f \,g^{3}\right ) x^{3}}{3 h^{4}}+\frac {f^{2} \left (2 b h -3 c g \right ) x^{5}}{6 h^{2}}}{\left (h x +g \right )^{2}}+\frac {\left (2 a d f \,h^{4}+6 a \,f^{2} g^{2} h^{2}-6 b d f g \,h^{3}-10 b \,f^{2} g^{3} h +c \,d^{2} h^{4}+12 c d f \,g^{2} h^{2}+15 c \,f^{2} g^{4}\right ) \ln \left (h x +g \right )}{h^{7}}\) | \(392\) |
default | \(-\frac {f \left (-\frac {1}{4} c f \,x^{4} h^{3}-\frac {1}{3} b f \,h^{3} x^{3}+c f g \,h^{2} x^{3}-\frac {1}{2} a f \,h^{3} x^{2}+\frac {3}{2} b f g \,h^{2} x^{2}-c d \,h^{3} x^{2}-3 c f \,g^{2} h \,x^{2}+3 a f g \,h^{2} x -2 b d \,h^{3} x -6 b f \,g^{2} h x +6 c d g \,h^{2} x +10 c f \,g^{3} x \right )}{h^{6}}+\frac {\left (2 a d f \,h^{4}+6 a \,f^{2} g^{2} h^{2}-6 b d f g \,h^{3}-10 b \,f^{2} g^{3} h +c \,d^{2} h^{4}+12 c d f \,g^{2} h^{2}+15 c \,f^{2} g^{4}\right ) \ln \left (h x +g \right )}{h^{7}}-\frac {a \,d^{2} h^{6}+2 a d f \,g^{2} h^{4}+a \,f^{2} g^{4} h^{2}-b \,d^{2} g \,h^{5}-2 b d f \,g^{3} h^{3}-b \,f^{2} g^{5} h +c \,d^{2} g^{2} h^{4}+2 c d f \,g^{4} h^{2}+c \,f^{2} g^{6}}{2 h^{7} \left (h x +g \right )^{2}}-\frac {-4 a d f g \,h^{4}-4 a \,f^{2} g^{3} h^{2}+b \,d^{2} h^{5}+6 b d f \,g^{2} h^{3}+5 b \,f^{2} g^{4} h -2 c \,d^{2} g \,h^{4}-8 c d f \,g^{3} h^{2}-6 c \,f^{2} g^{5}}{h^{7} \left (h x +g \right )}\) | \(399\) |
risch | \(\frac {c \,f^{2} x^{4}}{4 h^{3}}+\frac {f^{2} b \,x^{3}}{3 h^{3}}-\frac {f^{2} c g \,x^{3}}{h^{4}}+\frac {f^{2} a \,x^{2}}{2 h^{3}}-\frac {3 f^{2} b g \,x^{2}}{2 h^{4}}+\frac {f c d \,x^{2}}{h^{3}}+\frac {3 f^{2} c \,g^{2} x^{2}}{h^{5}}-\frac {3 f^{2} a g x}{h^{4}}+\frac {2 f b d x}{h^{3}}+\frac {6 f^{2} b \,g^{2} x}{h^{5}}-\frac {6 f c d g x}{h^{4}}-\frac {10 f^{2} c \,g^{3} x}{h^{6}}+\frac {\left (4 a d f g \,h^{4}+4 a \,f^{2} g^{3} h^{2}-b \,d^{2} h^{5}-6 b d f \,g^{2} h^{3}-5 b \,f^{2} g^{4} h +2 c \,d^{2} g \,h^{4}+8 c d f \,g^{3} h^{2}+6 c \,f^{2} g^{5}\right ) x -\frac {a \,d^{2} h^{6}-6 a d f \,g^{2} h^{4}-7 a \,f^{2} g^{4} h^{2}+b \,d^{2} g \,h^{5}+10 b d f \,g^{3} h^{3}+9 b \,f^{2} g^{5} h -3 c \,d^{2} g^{2} h^{4}-14 c d f \,g^{4} h^{2}-11 c \,f^{2} g^{6}}{2 h}}{h^{6} \left (h x +g \right )^{2}}+\frac {2 \ln \left (h x +g \right ) a d f}{h^{3}}+\frac {6 \ln \left (h x +g \right ) a \,f^{2} g^{2}}{h^{5}}-\frac {6 \ln \left (h x +g \right ) b d f g}{h^{4}}-\frac {10 \ln \left (h x +g \right ) b \,f^{2} g^{3}}{h^{6}}+\frac {\ln \left (h x +g \right ) c \,d^{2}}{h^{3}}+\frac {12 \ln \left (h x +g \right ) c d f \,g^{2}}{h^{5}}+\frac {15 \ln \left (h x +g \right ) c \,f^{2} g^{4}}{h^{7}}\) | \(454\) |
parallelrisch | \(\frac {24 x c \,d^{2} g \,h^{5}-240 x b \,f^{2} g^{4} h^{2}+40 x^{3} b \,f^{2} g^{2} h^{4}-60 x^{3} c \,f^{2} g^{3} h^{3}-108 b d f \,g^{3} h^{3}+216 c d f \,g^{4} h^{2}+36 a d f \,g^{2} h^{4}-144 \ln \left (h x +g \right ) x b d f \,g^{2} h^{4}+48 \ln \left (h x +g \right ) x a d f g \,h^{5}+288 \ln \left (h x +g \right ) x c d f \,g^{3} h^{3}-72 \ln \left (h x +g \right ) x^{2} b d f g \,h^{5}+144 \ln \left (h x +g \right ) x^{2} c d f \,g^{2} h^{4}+108 a \,f^{2} g^{4} h^{2}+15 x^{4} c \,f^{2} g^{2} h^{4}+360 x c \,f^{2} g^{5} h +12 x^{4} c d f \,h^{6}+24 x^{3} b d f \,h^{6}+144 x a \,f^{2} g^{3} h^{3}-120 \ln \left (h x +g \right ) b \,f^{2} g^{5} h +12 \ln \left (h x +g \right ) c \,d^{2} g^{2} h^{4}+18 c \,d^{2} g^{2} h^{4}+270 c \,f^{2} g^{6}-180 b \,f^{2} g^{5} h -6 x^{5} c \,f^{2} g \,h^{5}-10 x^{4} b \,f^{2} g \,h^{5}-6 b \,d^{2} g \,h^{5}-48 x^{3} c d f g \,h^{5}+24 \ln \left (h x +g \right ) a d f \,g^{2} h^{4}+12 \ln \left (h x +g \right ) x^{2} c \,d^{2} h^{6}-24 x^{3} a \,f^{2} g \,h^{5}+72 \ln \left (h x +g \right ) a \,f^{2} g^{4} h^{2}+4 x^{5} b \,f^{2} h^{6}+6 x^{4} a \,f^{2} h^{6}-6 a \,d^{2} h^{6}+288 x c d f \,g^{3} h^{3}+144 \ln \left (h x +g \right ) c d f \,g^{4} h^{2}-12 x b \,d^{2} h^{6}+3 x^{6} c \,f^{2} h^{6}+180 \ln \left (h x +g \right ) c \,f^{2} g^{6}+24 \ln \left (h x +g \right ) x^{2} a d f \,h^{6}+72 \ln \left (h x +g \right ) x^{2} a \,f^{2} g^{2} h^{4}+144 \ln \left (h x +g \right ) x a \,f^{2} g^{3} h^{3}-240 \ln \left (h x +g \right ) x b \,f^{2} g^{4} h^{2}+24 \ln \left (h x +g \right ) x c \,d^{2} g \,h^{5}+360 \ln \left (h x +g \right ) x c \,f^{2} g^{5} h -120 \ln \left (h x +g \right ) x^{2} b \,f^{2} g^{3} h^{3}+180 \ln \left (h x +g \right ) x^{2} c \,f^{2} g^{4} h^{2}-72 \ln \left (h x +g \right ) b d f \,g^{3} h^{3}+48 x a d f g \,h^{5}-144 x b d f \,g^{2} h^{4}}{12 h^{7} \left (h x +g \right )^{2}}\) | \(733\) |
Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^3,x,method=_RETURNVERBOSE)
Output:
((4*a*d*f*g*h^4+12*a*f^2*g^3*h^2-b*d^2*h^5-12*b*d*f*g^2*h^3-20*b*f^2*g^4*h +2*c*d^2*g*h^4+24*c*d*f*g^3*h^2+30*c*f^2*g^5)/h^6*x-1/2*(a*d^2*h^6-6*a*d*f *g^2*h^4-18*a*f^2*g^4*h^2+b*d^2*g*h^5+18*b*d*f*g^3*h^3+30*b*f^2*g^5*h-3*c* d^2*g^2*h^4-36*c*d*f*g^4*h^2-45*c*f^2*g^6)/h^7+1/4*c*f^2*x^6/h+1/12*f*(6*a *f*h^2-10*b*f*g*h+12*c*d*h^2+15*c*f*g^2)/h^3*x^4-1/3*f*(6*a*f*g*h^2-6*b*d* h^3-10*b*f*g^2*h+12*c*d*g*h^2+15*c*f*g^3)/h^4*x^3+1/6*f^2*(2*b*h-3*c*g)/h^ 2*x^5)/(h*x+g)^2+1/h^7*(2*a*d*f*h^4+6*a*f^2*g^2*h^2-6*b*d*f*g*h^3-10*b*f^2 *g^3*h+c*d^2*h^4+12*c*d*f*g^2*h^2+15*c*f^2*g^4)*ln(h*x+g)
Leaf count of result is larger than twice the leaf count of optimal. 608 vs. \(2 (294) = 588\).
Time = 0.10 (sec) , antiderivative size = 608, normalized size of antiderivative = 2.01 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=\frac {3 \, c f^{2} h^{6} x^{6} + 66 \, c f^{2} g^{6} - 54 \, b f^{2} g^{5} h - 60 \, b d f g^{3} h^{3} - 6 \, b d^{2} g h^{5} - 6 \, a d^{2} h^{6} + 42 \, {\left (2 \, c d f + a f^{2}\right )} g^{4} h^{2} + 18 \, {\left (c d^{2} + 2 \, a d f\right )} g^{2} h^{4} - 2 \, {\left (3 \, c f^{2} g h^{5} - 2 \, b f^{2} h^{6}\right )} x^{5} + {\left (15 \, c f^{2} g^{2} h^{4} - 10 \, b f^{2} g h^{5} + 6 \, {\left (2 \, c d f + a f^{2}\right )} h^{6}\right )} x^{4} - 4 \, {\left (15 \, c f^{2} g^{3} h^{3} - 10 \, b f^{2} g^{2} h^{4} - 6 \, b d f h^{6} + 6 \, {\left (2 \, c d f + a f^{2}\right )} g h^{5}\right )} x^{3} - 6 \, {\left (34 \, c f^{2} g^{4} h^{2} - 21 \, b f^{2} g^{3} h^{3} - 8 \, b d f g h^{5} + 11 \, {\left (2 \, c d f + a f^{2}\right )} g^{2} h^{4}\right )} x^{2} - 12 \, {\left (4 \, c f^{2} g^{5} h - b f^{2} g^{4} h^{2} + 4 \, b d f g^{2} h^{4} + b d^{2} h^{6} - {\left (2 \, c d f + a f^{2}\right )} g^{3} h^{3} - 2 \, {\left (c d^{2} + 2 \, a d f\right )} g h^{5}\right )} x + 12 \, {\left (15 \, c f^{2} g^{6} - 10 \, b f^{2} g^{5} h - 6 \, b d f g^{3} h^{3} + 6 \, {\left (2 \, c d f + a f^{2}\right )} g^{4} h^{2} + {\left (c d^{2} + 2 \, a d f\right )} g^{2} h^{4} + {\left (15 \, c f^{2} g^{4} h^{2} - 10 \, b f^{2} g^{3} h^{3} - 6 \, b d f g h^{5} + 6 \, {\left (2 \, c d f + a f^{2}\right )} g^{2} h^{4} + {\left (c d^{2} + 2 \, a d f\right )} h^{6}\right )} x^{2} + 2 \, {\left (15 \, c f^{2} g^{5} h - 10 \, b f^{2} g^{4} h^{2} - 6 \, b d f g^{2} h^{4} + 6 \, {\left (2 \, c d f + a f^{2}\right )} g^{3} h^{3} + {\left (c d^{2} + 2 \, a d f\right )} g h^{5}\right )} x\right )} \log \left (h x + g\right )}{12 \, {\left (h^{9} x^{2} + 2 \, g h^{8} x + g^{2} h^{7}\right )}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^3,x, algorithm="fricas")
Output:
1/12*(3*c*f^2*h^6*x^6 + 66*c*f^2*g^6 - 54*b*f^2*g^5*h - 60*b*d*f*g^3*h^3 - 6*b*d^2*g*h^5 - 6*a*d^2*h^6 + 42*(2*c*d*f + a*f^2)*g^4*h^2 + 18*(c*d^2 + 2*a*d*f)*g^2*h^4 - 2*(3*c*f^2*g*h^5 - 2*b*f^2*h^6)*x^5 + (15*c*f^2*g^2*h^4 - 10*b*f^2*g*h^5 + 6*(2*c*d*f + a*f^2)*h^6)*x^4 - 4*(15*c*f^2*g^3*h^3 - 1 0*b*f^2*g^2*h^4 - 6*b*d*f*h^6 + 6*(2*c*d*f + a*f^2)*g*h^5)*x^3 - 6*(34*c*f ^2*g^4*h^2 - 21*b*f^2*g^3*h^3 - 8*b*d*f*g*h^5 + 11*(2*c*d*f + a*f^2)*g^2*h ^4)*x^2 - 12*(4*c*f^2*g^5*h - b*f^2*g^4*h^2 + 4*b*d*f*g^2*h^4 + b*d^2*h^6 - (2*c*d*f + a*f^2)*g^3*h^3 - 2*(c*d^2 + 2*a*d*f)*g*h^5)*x + 12*(15*c*f^2* g^6 - 10*b*f^2*g^5*h - 6*b*d*f*g^3*h^3 + 6*(2*c*d*f + a*f^2)*g^4*h^2 + (c* d^2 + 2*a*d*f)*g^2*h^4 + (15*c*f^2*g^4*h^2 - 10*b*f^2*g^3*h^3 - 6*b*d*f*g* h^5 + 6*(2*c*d*f + a*f^2)*g^2*h^4 + (c*d^2 + 2*a*d*f)*h^6)*x^2 + 2*(15*c*f ^2*g^5*h - 10*b*f^2*g^4*h^2 - 6*b*d*f*g^2*h^4 + 6*(2*c*d*f + a*f^2)*g^3*h^ 3 + (c*d^2 + 2*a*d*f)*g*h^5)*x)*log(h*x + g))/(h^9*x^2 + 2*g*h^8*x + g^2*h ^7)
Time = 4.77 (sec) , antiderivative size = 474, normalized size of antiderivative = 1.57 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=\frac {c f^{2} x^{4}}{4 h^{3}} + x^{3} \left (\frac {b f^{2}}{3 h^{3}} - \frac {c f^{2} g}{h^{4}}\right ) + x^{2} \left (\frac {a f^{2}}{2 h^{3}} - \frac {3 b f^{2} g}{2 h^{4}} + \frac {c d f}{h^{3}} + \frac {3 c f^{2} g^{2}}{h^{5}}\right ) + x \left (- \frac {3 a f^{2} g}{h^{4}} + \frac {2 b d f}{h^{3}} + \frac {6 b f^{2} g^{2}}{h^{5}} - \frac {6 c d f g}{h^{4}} - \frac {10 c f^{2} g^{3}}{h^{6}}\right ) + \frac {- a d^{2} h^{6} + 6 a d f g^{2} h^{4} + 7 a f^{2} g^{4} h^{2} - b d^{2} g h^{5} - 10 b d f g^{3} h^{3} - 9 b f^{2} g^{5} h + 3 c d^{2} g^{2} h^{4} + 14 c d f g^{4} h^{2} + 11 c f^{2} g^{6} + x \left (8 a d f g h^{5} + 8 a f^{2} g^{3} h^{3} - 2 b d^{2} h^{6} - 12 b d f g^{2} h^{4} - 10 b f^{2} g^{4} h^{2} + 4 c d^{2} g h^{5} + 16 c d f g^{3} h^{3} + 12 c f^{2} g^{5} h\right )}{2 g^{2} h^{7} + 4 g h^{8} x + 2 h^{9} x^{2}} + \frac {\left (2 a d f h^{4} + 6 a f^{2} g^{2} h^{2} - 6 b d f g h^{3} - 10 b f^{2} g^{3} h + c d^{2} h^{4} + 12 c d f g^{2} h^{2} + 15 c f^{2} g^{4}\right ) \log {\left (g + h x \right )}}{h^{7}} \] Input:
integrate((c*x**2+b*x+a)*(f*x**2+d)**2/(h*x+g)**3,x)
Output:
c*f**2*x**4/(4*h**3) + x**3*(b*f**2/(3*h**3) - c*f**2*g/h**4) + x**2*(a*f* *2/(2*h**3) - 3*b*f**2*g/(2*h**4) + c*d*f/h**3 + 3*c*f**2*g**2/h**5) + x*( -3*a*f**2*g/h**4 + 2*b*d*f/h**3 + 6*b*f**2*g**2/h**5 - 6*c*d*f*g/h**4 - 10 *c*f**2*g**3/h**6) + (-a*d**2*h**6 + 6*a*d*f*g**2*h**4 + 7*a*f**2*g**4*h** 2 - b*d**2*g*h**5 - 10*b*d*f*g**3*h**3 - 9*b*f**2*g**5*h + 3*c*d**2*g**2*h **4 + 14*c*d*f*g**4*h**2 + 11*c*f**2*g**6 + x*(8*a*d*f*g*h**5 + 8*a*f**2*g **3*h**3 - 2*b*d**2*h**6 - 12*b*d*f*g**2*h**4 - 10*b*f**2*g**4*h**2 + 4*c* d**2*g*h**5 + 16*c*d*f*g**3*h**3 + 12*c*f**2*g**5*h))/(2*g**2*h**7 + 4*g*h **8*x + 2*h**9*x**2) + (2*a*d*f*h**4 + 6*a*f**2*g**2*h**2 - 6*b*d*f*g*h**3 - 10*b*f**2*g**3*h + c*d**2*h**4 + 12*c*d*f*g**2*h**2 + 15*c*f**2*g**4)*l og(g + h*x)/h**7
Time = 0.04 (sec) , antiderivative size = 402, normalized size of antiderivative = 1.33 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=\frac {11 \, c f^{2} g^{6} - 9 \, b f^{2} g^{5} h - 10 \, b d f g^{3} h^{3} - b d^{2} g h^{5} - a d^{2} h^{6} + 7 \, {\left (2 \, c d f + a f^{2}\right )} g^{4} h^{2} + 3 \, {\left (c d^{2} + 2 \, a d f\right )} g^{2} h^{4} + 2 \, {\left (6 \, c f^{2} g^{5} h - 5 \, b f^{2} g^{4} h^{2} - 6 \, b d f g^{2} h^{4} - b d^{2} h^{6} + 4 \, {\left (2 \, c d f + a f^{2}\right )} g^{3} h^{3} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} g h^{5}\right )} x}{2 \, {\left (h^{9} x^{2} + 2 \, g h^{8} x + g^{2} h^{7}\right )}} + \frac {3 \, c f^{2} h^{3} x^{4} - 4 \, {\left (3 \, c f^{2} g h^{2} - b f^{2} h^{3}\right )} x^{3} + 6 \, {\left (6 \, c f^{2} g^{2} h - 3 \, b f^{2} g h^{2} + {\left (2 \, c d f + a f^{2}\right )} h^{3}\right )} x^{2} - 12 \, {\left (10 \, c f^{2} g^{3} - 6 \, b f^{2} g^{2} h - 2 \, b d f h^{3} + 3 \, {\left (2 \, c d f + a f^{2}\right )} g h^{2}\right )} x}{12 \, h^{6}} + \frac {{\left (15 \, c f^{2} g^{4} - 10 \, b f^{2} g^{3} h - 6 \, b d f g h^{3} + 6 \, {\left (2 \, c d f + a f^{2}\right )} g^{2} h^{2} + {\left (c d^{2} + 2 \, a d f\right )} h^{4}\right )} \log \left (h x + g\right )}{h^{7}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^3,x, algorithm="maxima")
Output:
1/2*(11*c*f^2*g^6 - 9*b*f^2*g^5*h - 10*b*d*f*g^3*h^3 - b*d^2*g*h^5 - a*d^2 *h^6 + 7*(2*c*d*f + a*f^2)*g^4*h^2 + 3*(c*d^2 + 2*a*d*f)*g^2*h^4 + 2*(6*c* f^2*g^5*h - 5*b*f^2*g^4*h^2 - 6*b*d*f*g^2*h^4 - b*d^2*h^6 + 4*(2*c*d*f + a *f^2)*g^3*h^3 + 2*(c*d^2 + 2*a*d*f)*g*h^5)*x)/(h^9*x^2 + 2*g*h^8*x + g^2*h ^7) + 1/12*(3*c*f^2*h^3*x^4 - 4*(3*c*f^2*g*h^2 - b*f^2*h^3)*x^3 + 6*(6*c*f ^2*g^2*h - 3*b*f^2*g*h^2 + (2*c*d*f + a*f^2)*h^3)*x^2 - 12*(10*c*f^2*g^3 - 6*b*f^2*g^2*h - 2*b*d*f*h^3 + 3*(2*c*d*f + a*f^2)*g*h^2)*x)/h^6 + (15*c*f ^2*g^4 - 10*b*f^2*g^3*h - 6*b*d*f*g*h^3 + 6*(2*c*d*f + a*f^2)*g^2*h^2 + (c *d^2 + 2*a*d*f)*h^4)*log(h*x + g)/h^7
Time = 0.11 (sec) , antiderivative size = 426, normalized size of antiderivative = 1.41 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=\frac {{\left (15 \, c f^{2} g^{4} - 10 \, b f^{2} g^{3} h + 12 \, c d f g^{2} h^{2} + 6 \, a f^{2} g^{2} h^{2} - 6 \, b d f g h^{3} + c d^{2} h^{4} + 2 \, a d f h^{4}\right )} \log \left ({\left | h x + g \right |}\right )}{h^{7}} + \frac {11 \, c f^{2} g^{6} - 9 \, b f^{2} g^{5} h + 14 \, c d f g^{4} h^{2} + 7 \, a f^{2} g^{4} h^{2} - 10 \, b d f g^{3} h^{3} + 3 \, c d^{2} g^{2} h^{4} + 6 \, a d f g^{2} h^{4} - b d^{2} g h^{5} - a d^{2} h^{6} + 2 \, {\left (6 \, c f^{2} g^{5} h - 5 \, b f^{2} g^{4} h^{2} + 8 \, c d f g^{3} h^{3} + 4 \, a f^{2} g^{3} h^{3} - 6 \, b d f g^{2} h^{4} + 2 \, c d^{2} g h^{5} + 4 \, a d f g h^{5} - b d^{2} h^{6}\right )} x}{2 \, {\left (h x + g\right )}^{2} h^{7}} + \frac {3 \, c f^{2} h^{9} x^{4} - 12 \, c f^{2} g h^{8} x^{3} + 4 \, b f^{2} h^{9} x^{3} + 36 \, c f^{2} g^{2} h^{7} x^{2} - 18 \, b f^{2} g h^{8} x^{2} + 12 \, c d f h^{9} x^{2} + 6 \, a f^{2} h^{9} x^{2} - 120 \, c f^{2} g^{3} h^{6} x + 72 \, b f^{2} g^{2} h^{7} x - 72 \, c d f g h^{8} x - 36 \, a f^{2} g h^{8} x + 24 \, b d f h^{9} x}{12 \, h^{12}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^3,x, algorithm="giac")
Output:
(15*c*f^2*g^4 - 10*b*f^2*g^3*h + 12*c*d*f*g^2*h^2 + 6*a*f^2*g^2*h^2 - 6*b* d*f*g*h^3 + c*d^2*h^4 + 2*a*d*f*h^4)*log(abs(h*x + g))/h^7 + 1/2*(11*c*f^2 *g^6 - 9*b*f^2*g^5*h + 14*c*d*f*g^4*h^2 + 7*a*f^2*g^4*h^2 - 10*b*d*f*g^3*h ^3 + 3*c*d^2*g^2*h^4 + 6*a*d*f*g^2*h^4 - b*d^2*g*h^5 - a*d^2*h^6 + 2*(6*c* f^2*g^5*h - 5*b*f^2*g^4*h^2 + 8*c*d*f*g^3*h^3 + 4*a*f^2*g^3*h^3 - 6*b*d*f* g^2*h^4 + 2*c*d^2*g*h^5 + 4*a*d*f*g*h^5 - b*d^2*h^6)*x)/((h*x + g)^2*h^7) + 1/12*(3*c*f^2*h^9*x^4 - 12*c*f^2*g*h^8*x^3 + 4*b*f^2*h^9*x^3 + 36*c*f^2* g^2*h^7*x^2 - 18*b*f^2*g*h^8*x^2 + 12*c*d*f*h^9*x^2 + 6*a*f^2*h^9*x^2 - 12 0*c*f^2*g^3*h^6*x + 72*b*f^2*g^2*h^7*x - 72*c*d*f*g*h^8*x - 36*a*f^2*g*h^8 *x + 24*b*d*f*h^9*x)/h^12
Time = 17.17 (sec) , antiderivative size = 495, normalized size of antiderivative = 1.64 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx=x^3\,\left (\frac {b\,f^2}{3\,h^3}-\frac {c\,f^2\,g}{h^4}\right )-x\,\left (\frac {3\,g^2\,\left (\frac {b\,f^2}{h^3}-\frac {3\,c\,f^2\,g}{h^4}\right )}{h^2}-\frac {3\,g\,\left (\frac {3\,g\,\left (\frac {b\,f^2}{h^3}-\frac {3\,c\,f^2\,g}{h^4}\right )}{h}-\frac {a\,f^2+2\,c\,d\,f}{h^3}+\frac {3\,c\,f^2\,g^2}{h^5}\right )}{h}+\frac {c\,f^2\,g^3}{h^6}-\frac {2\,b\,d\,f}{h^3}\right )-x^2\,\left (\frac {3\,g\,\left (\frac {b\,f^2}{h^3}-\frac {3\,c\,f^2\,g}{h^4}\right )}{2\,h}-\frac {a\,f^2+2\,c\,d\,f}{2\,h^3}+\frac {3\,c\,f^2\,g^2}{2\,h^5}\right )+\frac {x\,\left (2\,c\,d^2\,g\,h^4-b\,d^2\,h^5+8\,c\,d\,f\,g^3\,h^2-6\,b\,d\,f\,g^2\,h^3+4\,a\,d\,f\,g\,h^4+6\,c\,f^2\,g^5-5\,b\,f^2\,g^4\,h+4\,a\,f^2\,g^3\,h^2\right )+\frac {3\,c\,d^2\,g^2\,h^4-b\,d^2\,g\,h^5-a\,d^2\,h^6+14\,c\,d\,f\,g^4\,h^2-10\,b\,d\,f\,g^3\,h^3+6\,a\,d\,f\,g^2\,h^4+11\,c\,f^2\,g^6-9\,b\,f^2\,g^5\,h+7\,a\,f^2\,g^4\,h^2}{2\,h}}{g^2\,h^6+2\,g\,h^7\,x+h^8\,x^2}+\frac {\ln \left (g+h\,x\right )\,\left (c\,d^2\,h^4+12\,c\,d\,f\,g^2\,h^2-6\,b\,d\,f\,g\,h^3+2\,a\,d\,f\,h^4+15\,c\,f^2\,g^4-10\,b\,f^2\,g^3\,h+6\,a\,f^2\,g^2\,h^2\right )}{h^7}+\frac {c\,f^2\,x^4}{4\,h^3} \] Input:
int(((d + f*x^2)^2*(a + b*x + c*x^2))/(g + h*x)^3,x)
Output:
x^3*((b*f^2)/(3*h^3) - (c*f^2*g)/h^4) - x*((3*g^2*((b*f^2)/h^3 - (3*c*f^2* g)/h^4))/h^2 - (3*g*((3*g*((b*f^2)/h^3 - (3*c*f^2*g)/h^4))/h - (a*f^2 + 2* c*d*f)/h^3 + (3*c*f^2*g^2)/h^5))/h + (c*f^2*g^3)/h^6 - (2*b*d*f)/h^3) - x^ 2*((3*g*((b*f^2)/h^3 - (3*c*f^2*g)/h^4))/(2*h) - (a*f^2 + 2*c*d*f)/(2*h^3) + (3*c*f^2*g^2)/(2*h^5)) + (x*(6*c*f^2*g^5 - b*d^2*h^5 + 4*a*f^2*g^3*h^2 + 2*c*d^2*g*h^4 - 5*b*f^2*g^4*h - 6*b*d*f*g^2*h^3 + 8*c*d*f*g^3*h^2 + 4*a* d*f*g*h^4) + (11*c*f^2*g^6 - a*d^2*h^6 + 7*a*f^2*g^4*h^2 + 3*c*d^2*g^2*h^4 - b*d^2*g*h^5 - 9*b*f^2*g^5*h + 6*a*d*f*g^2*h^4 - 10*b*d*f*g^3*h^3 + 14*c *d*f*g^4*h^2)/(2*h))/(g^2*h^6 + h^8*x^2 + 2*g*h^7*x) + (log(g + h*x)*(c*d^ 2*h^4 + 15*c*f^2*g^4 + 6*a*f^2*g^2*h^2 + 2*a*d*f*h^4 - 10*b*f^2*g^3*h + 12 *c*d*f*g^2*h^2 - 6*b*d*f*g*h^3))/h^7 + (c*f^2*x^4)/(4*h^3)
Time = 0.17 (sec) , antiderivative size = 776, normalized size of antiderivative = 2.57 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^3} \, dx =\text {Too large to display} \] Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^3,x)
Output:
(24*log(g + h*x)*a*d*f*g**3*h**4 + 48*log(g + h*x)*a*d*f*g**2*h**5*x + 24* log(g + h*x)*a*d*f*g*h**6*x**2 + 72*log(g + h*x)*a*f**2*g**5*h**2 + 144*lo g(g + h*x)*a*f**2*g**4*h**3*x + 72*log(g + h*x)*a*f**2*g**3*h**4*x**2 - 72 *log(g + h*x)*b*d*f*g**4*h**3 - 144*log(g + h*x)*b*d*f*g**3*h**4*x - 72*lo g(g + h*x)*b*d*f*g**2*h**5*x**2 - 120*log(g + h*x)*b*f**2*g**6*h - 240*log (g + h*x)*b*f**2*g**5*h**2*x - 120*log(g + h*x)*b*f**2*g**4*h**3*x**2 + 12 *log(g + h*x)*c*d**2*g**3*h**4 + 24*log(g + h*x)*c*d**2*g**2*h**5*x + 12*l og(g + h*x)*c*d**2*g*h**6*x**2 + 144*log(g + h*x)*c*d*f*g**5*h**2 + 288*lo g(g + h*x)*c*d*f*g**4*h**3*x + 144*log(g + h*x)*c*d*f*g**3*h**4*x**2 + 180 *log(g + h*x)*c*f**2*g**7 + 360*log(g + h*x)*c*f**2*g**6*h*x + 180*log(g + h*x)*c*f**2*g**5*h**2*x**2 - 6*a*d**2*g*h**6 + 12*a*d*f*g**3*h**4 - 24*a* d*f*g*h**6*x**2 + 36*a*f**2*g**5*h**2 - 72*a*f**2*g**3*h**4*x**2 - 24*a*f* *2*g**2*h**5*x**3 + 6*a*f**2*g*h**6*x**4 + 6*b*d**2*h**7*x**2 - 36*b*d*f*g **4*h**3 + 72*b*d*f*g**2*h**5*x**2 + 24*b*d*f*g*h**6*x**3 - 60*b*f**2*g**6 *h + 120*b*f**2*g**4*h**3*x**2 + 40*b*f**2*g**3*h**4*x**3 - 10*b*f**2*g**2 *h**5*x**4 + 4*b*f**2*g*h**6*x**5 + 6*c*d**2*g**3*h**4 - 12*c*d**2*g*h**6* x**2 + 72*c*d*f*g**5*h**2 - 144*c*d*f*g**3*h**4*x**2 - 48*c*d*f*g**2*h**5* x**3 + 12*c*d*f*g*h**6*x**4 + 90*c*f**2*g**7 - 180*c*f**2*g**5*h**2*x**2 - 60*c*f**2*g**4*h**3*x**3 + 15*c*f**2*g**3*h**4*x**4 - 6*c*f**2*g**2*h**5* x**5 + 3*c*f**2*g*h**6*x**6)/(12*g*h**7*(g**2 + 2*g*h*x + h**2*x**2))