Integrand size = 27, antiderivative size = 271 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=-\frac {\left (c g \left (f g^2+d h^2\right )^2-h \left (b \left (f g^2+d h^2\right )^2-a f g h \left (f g^2+2 d h^2\right )\right )\right ) x}{h^6}+\frac {\left (c \left (f g^2+d h^2\right )^2-f h (b g-a h) \left (f g^2+2 d h^2\right )\right ) x^2}{2 h^5}-\frac {f \left (c f g^3-b f g^2 h+2 c d g h^2+a f g h^2-2 b d h^3\right ) x^3}{3 h^4}-\frac {f \left (f h (b g-a h)-c \left (f g^2+2 d h^2\right )\right ) x^4}{4 h^3}-\frac {f^2 (c g-b h) x^5}{5 h^2}+\frac {c f^2 x^6}{6 h}+\frac {\left (c g^2-b g h+a h^2\right ) \left (f g^2+d h^2\right )^2 \log (g+h x)}{h^7} \] Output:
-(c*g*(d*h^2+f*g^2)^2-h*(b*(d*h^2+f*g^2)^2-a*f*g*h*(2*d*h^2+f*g^2)))*x/h^6 +1/2*(c*(d*h^2+f*g^2)^2-f*h*(-a*h+b*g)*(2*d*h^2+f*g^2))*x^2/h^5-1/3*f*(a*f *g*h^2-2*b*d*h^3-b*f*g^2*h+2*c*d*g*h^2+c*f*g^3)*x^3/h^4-1/4*f*(f*h*(-a*h+b *g)-c*(2*d*h^2+f*g^2))*x^4/h^3-1/5*f^2*(-b*h+c*g)*x^5/h^2+1/6*c*f^2*x^6/h+ (a*h^2-b*g*h+c*g^2)*(d*h^2+f*g^2)^2*ln(h*x+g)/h^7
Time = 0.26 (sec) , antiderivative size = 296, normalized size of antiderivative = 1.09 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=\frac {h x \left (c \left (30 d^2 h^4 (-2 g+h x)+10 d f h^2 \left (-12 g^3+6 g^2 h x-4 g h^2 x^2+3 h^3 x^3\right )+f^2 \left (-60 g^5+30 g^4 h x-20 g^3 h^2 x^2+15 g^2 h^3 x^3-12 g h^4 x^4+10 h^5 x^5\right )\right )+h \left (5 a f h \left (12 d h^2 (-2 g+h x)+f \left (-12 g^3+6 g^2 h x-4 g h^2 x^2+3 h^3 x^3\right )\right )+b \left (60 d^2 h^4+20 d f h^2 \left (6 g^2-3 g h x+2 h^2 x^2\right )+f^2 \left (60 g^4-30 g^3 h x+20 g^2 h^2 x^2-15 g h^3 x^3+12 h^4 x^4\right )\right )\right )\right )+60 \left (f g^2+d h^2\right )^2 \left (c g^2+h (-b g+a h)\right ) \log (g+h x)}{60 h^7} \] Input:
Integrate[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x),x]
Output:
(h*x*(c*(30*d^2*h^4*(-2*g + h*x) + 10*d*f*h^2*(-12*g^3 + 6*g^2*h*x - 4*g*h ^2*x^2 + 3*h^3*x^3) + f^2*(-60*g^5 + 30*g^4*h*x - 20*g^3*h^2*x^2 + 15*g^2* h^3*x^3 - 12*g*h^4*x^4 + 10*h^5*x^5)) + h*(5*a*f*h*(12*d*h^2*(-2*g + h*x) + f*(-12*g^3 + 6*g^2*h*x - 4*g*h^2*x^2 + 3*h^3*x^3)) + b*(60*d^2*h^4 + 20* d*f*h^2*(6*g^2 - 3*g*h*x + 2*h^2*x^2) + f^2*(60*g^4 - 30*g^3*h*x + 20*g^2* h^2*x^2 - 15*g*h^3*x^3 + 12*h^4*x^4)))) + 60*(f*g^2 + d*h^2)^2*(c*g^2 + h* (-(b*g) + a*h))*Log[g + h*x])/(60*h^7)
Time = 0.70 (sec) , antiderivative size = 271, 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} \, dx\) |
\(\Big \downarrow \) 2159 |
\(\displaystyle \int \left (\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)}+\frac {h \left (b \left (d h^2+f g^2\right )^2-a f g h \left (2 d h^2+f g^2\right )\right )-c g \left (d h^2+f g^2\right )^2}{h^6}+\frac {x \left (c \left (d h^2+f g^2\right )^2-f h (b g-a h) \left (2 d h^2+f g^2\right )\right )}{h^5}+\frac {f x^3 \left (c \left (2 d h^2+f g^2\right )-f h (b g-a h)\right )}{h^3}-\frac {f x^2 \left (a f g h^2-2 b d h^3-b f g^2 h+2 c d g h^2+c f g^3\right )}{h^4}+\frac {f^2 x^4 (b h-c g)}{h^2}+\frac {c f^2 x^5}{h}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\left (d h^2+f g^2\right )^2 \log (g+h x) \left (a h^2-b g h+c g^2\right )}{h^7}-\frac {x \left (c g \left (d h^2+f g^2\right )^2-h \left (b \left (d h^2+f g^2\right )^2-a f g h \left (2 d h^2+f g^2\right )\right )\right )}{h^6}+\frac {x^2 \left (c \left (d h^2+f g^2\right )^2-f h (b g-a h) \left (2 d h^2+f g^2\right )\right )}{2 h^5}-\frac {f x^4 \left (f h (b g-a h)-c \left (2 d h^2+f g^2\right )\right )}{4 h^3}-\frac {f x^3 \left (a f g h^2-2 b d h^3-b f g^2 h+2 c d g h^2+c f g^3\right )}{3 h^4}-\frac {f^2 x^5 (c g-b h)}{5 h^2}+\frac {c f^2 x^6}{6 h}\) |
Input:
Int[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x),x]
Output:
-(((c*g*(f*g^2 + d*h^2)^2 - h*(b*(f*g^2 + d*h^2)^2 - a*f*g*h*(f*g^2 + 2*d* h^2)))*x)/h^6) + ((c*(f*g^2 + d*h^2)^2 - f*h*(b*g - a*h)*(f*g^2 + 2*d*h^2) )*x^2)/(2*h^5) - (f*(c*f*g^3 - b*f*g^2*h + 2*c*d*g*h^2 + a*f*g*h^2 - 2*b*d *h^3)*x^3)/(3*h^4) - (f*(f*h*(b*g - a*h) - c*(f*g^2 + 2*d*h^2))*x^4)/(4*h^ 3) - (f^2*(c*g - b*h)*x^5)/(5*h^2) + (c*f^2*x^6)/(6*h) + ((c*g^2 - b*g*h + a*h^2)*(f*g^2 + d*h^2)^2*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.08 (sec) , antiderivative size = 375, normalized size of antiderivative = 1.38
method | result | size |
norman | \(\frac {\left (2 a d f \,h^{4}+a \,f^{2} g^{2} h^{2}-2 b d f g \,h^{3}-b \,f^{2} g^{3} h +c \,d^{2} h^{4}+2 c d f \,g^{2} h^{2}+c \,f^{2} g^{4}\right ) x^{2}}{2 h^{5}}-\frac {\left (2 a d f g \,h^{4}+a \,f^{2} g^{3} h^{2}-b \,d^{2} h^{5}-2 b d f \,g^{2} h^{3}-b \,f^{2} g^{4} h +c \,d^{2} g \,h^{4}+2 c d f \,g^{3} h^{2}+c \,f^{2} g^{5}\right ) x}{h^{6}}+\frac {c \,f^{2} x^{6}}{6 h}+\frac {f \left (a f \,h^{2}-b f g h +2 c d \,h^{2}+c f \,g^{2}\right ) x^{4}}{4 h^{3}}-\frac {f \left (a f g \,h^{2}-2 b d \,h^{3}-b f \,g^{2} h +2 c d g \,h^{2}+c f \,g^{3}\right ) x^{3}}{3 h^{4}}+\frac {f^{2} \left (b h -c g \right ) x^{5}}{5 h^{2}}+\frac {\left (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}\right ) \ln \left (h x +g \right )}{h^{7}}\) | \(375\) |
default | \(-\frac {\frac {1}{5} c \,f^{2} g \,h^{4} x^{5}+\frac {1}{4} b \,f^{2} g \,h^{4} x^{4}-\frac {1}{2} c d f \,h^{5} x^{4}-\frac {1}{4} c \,f^{2} g^{2} h^{3} x^{4}+\frac {1}{3} a \,f^{2} g \,h^{4} x^{3}-\frac {2}{3} b d f \,h^{5} x^{3}-\frac {1}{3} b \,f^{2} g^{2} h^{3} x^{3}+\frac {1}{3} c \,f^{2} g^{3} h^{2} x^{3}-a d f \,h^{5} x^{2}-\frac {1}{6} c \,f^{2} x^{6} h^{5}+c \,d^{2} g \,h^{4} x -2 b d f \,g^{2} h^{3} x +2 c d f \,g^{3} h^{2} x +\frac {2}{3} c d f g \,h^{4} x^{3}-b \,f^{2} g^{4} h x +\frac {1}{2} b \,f^{2} g^{3} h^{2} x^{2}-\frac {1}{2} c \,f^{2} g^{4} h \,x^{2}+b d f g \,h^{4} x^{2}+a \,f^{2} g^{3} h^{2} x +2 a d f g \,h^{4} x -\frac {1}{2} c \,d^{2} h^{5} x^{2}-\frac {1}{2} a \,f^{2} g^{2} h^{3} x^{2}-c d f \,g^{2} h^{3} x^{2}-\frac {1}{5} b \,f^{2} h^{5} x^{5}-\frac {1}{4} a \,f^{2} h^{5} x^{4}+c \,f^{2} g^{5} x -b \,d^{2} h^{5} x}{h^{6}}+\frac {\left (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}\right ) \ln \left (h x +g \right )}{h^{7}}\) | \(441\) |
risch | \(\frac {c \,d^{2} x^{2}}{2 h}+\frac {b \,f^{2} x^{5}}{5 h}+\frac {a \,f^{2} x^{4}}{4 h}+\frac {b \,d^{2} x}{h}-\frac {2 c d f \,g^{3} x}{h^{4}}-\frac {2 c d f g \,x^{3}}{3 h^{2}}+\frac {\ln \left (h x +g \right ) a \,f^{2} g^{4}}{h^{5}}+\frac {b \,f^{2} g^{4} x}{h^{5}}-\frac {b \,f^{2} g^{3} x^{2}}{2 h^{4}}+\frac {c \,f^{2} g^{4} x^{2}}{2 h^{5}}+\frac {c \,f^{2} x^{6}}{6 h}+\frac {\ln \left (h x +g \right ) c \,f^{2} g^{6}}{h^{7}}-\frac {c \,f^{2} g \,x^{5}}{5 h^{2}}-\frac {b \,f^{2} g \,x^{4}}{4 h^{2}}-\frac {c \,f^{2} g^{3} x^{3}}{3 h^{4}}+\frac {a d f \,x^{2}}{h}-\frac {c \,d^{2} g x}{h^{2}}-\frac {2 a d f g x}{h^{2}}+\frac {c \,f^{2} g^{2} x^{4}}{4 h^{3}}-\frac {a \,f^{2} g \,x^{3}}{3 h^{2}}+\frac {2 b d f \,x^{3}}{3 h}+\frac {b \,f^{2} g^{2} x^{3}}{3 h^{3}}+\frac {c d f \,x^{4}}{2 h}-\frac {\ln \left (h x +g \right ) b \,d^{2} g}{h^{2}}-\frac {\ln \left (h x +g \right ) b \,f^{2} g^{5}}{h^{6}}+\frac {\ln \left (h x +g \right ) c \,d^{2} g^{2}}{h^{3}}-\frac {a \,f^{2} g^{3} x}{h^{4}}+\frac {a \,f^{2} g^{2} x^{2}}{2 h^{3}}-\frac {c \,f^{2} g^{5} x}{h^{6}}+\frac {\ln \left (h x +g \right ) a \,d^{2}}{h}+\frac {2 b d f \,g^{2} x}{h^{3}}+\frac {c d f \,g^{2} x^{2}}{h^{3}}+\frac {2 \ln \left (h x +g \right ) a d f \,g^{2}}{h^{3}}-\frac {2 \ln \left (h x +g \right ) b d f \,g^{3}}{h^{4}}-\frac {b d f g \,x^{2}}{h^{2}}+\frac {2 \ln \left (h x +g \right ) c d f \,g^{4}}{h^{5}}\) | \(490\) |
parallelrisch | \(\frac {-30 x^{2} b \,f^{2} g^{3} h^{3}+30 x^{2} c \,f^{2} g^{4} h^{2}-60 x c \,d^{2} g \,h^{5}+60 x b \,f^{2} g^{4} h^{2}+20 x^{3} b \,f^{2} g^{2} h^{4}-20 x^{3} c \,f^{2} g^{3} h^{3}+60 x^{2} a d f \,h^{6}+30 x^{2} a \,f^{2} g^{2} h^{4}+15 x^{4} c \,f^{2} g^{2} h^{4}-60 \ln \left (h x +g \right ) b \,d^{2} g \,h^{5}-60 x c \,f^{2} g^{5} h +30 x^{4} c d f \,h^{6}+40 x^{3} b d f \,h^{6}-60 x a \,f^{2} g^{3} h^{3}-60 \ln \left (h x +g \right ) b \,f^{2} g^{5} h +60 \ln \left (h x +g \right ) c \,d^{2} g^{2} h^{4}-12 x^{5} c \,f^{2} g \,h^{5}-15 x^{4} b \,f^{2} g \,h^{5}-40 x^{3} c d f g \,h^{5}+120 \ln \left (h x +g \right ) a d f \,g^{2} h^{4}-20 x^{3} a \,f^{2} g \,h^{5}+60 \ln \left (h x +g \right ) a \,f^{2} g^{4} h^{2}+12 x^{5} b \,f^{2} h^{6}+15 x^{4} a \,f^{2} h^{6}-120 x c d f \,g^{3} h^{3}-60 x^{2} b d f g \,h^{5}+60 x^{2} c d f \,g^{2} h^{4}+120 \ln \left (h x +g \right ) c d f \,g^{4} h^{2}+30 x^{2} c \,d^{2} h^{6}+60 x b \,d^{2} h^{6}+10 x^{6} c \,f^{2} h^{6}+60 \ln \left (h x +g \right ) a \,d^{2} h^{6}+60 \ln \left (h x +g \right ) c \,f^{2} g^{6}-120 \ln \left (h x +g \right ) b d f \,g^{3} h^{3}-120 x a d f g \,h^{5}+120 x b d f \,g^{2} h^{4}}{60 h^{7}}\) | \(496\) |
Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g),x,method=_RETURNVERBOSE)
Output:
1/2/h^5*(2*a*d*f*h^4+a*f^2*g^2*h^2-2*b*d*f*g*h^3-b*f^2*g^3*h+c*d^2*h^4+2*c *d*f*g^2*h^2+c*f^2*g^4)*x^2-(2*a*d*f*g*h^4+a*f^2*g^3*h^2-b*d^2*h^5-2*b*d*f *g^2*h^3-b*f^2*g^4*h+c*d^2*g*h^4+2*c*d*f*g^3*h^2+c*f^2*g^5)/h^6*x+1/6*c*f^ 2*x^6/h+1/4*f/h^3*(a*f*h^2-b*f*g*h+2*c*d*h^2+c*f*g^2)*x^4-1/3*f*(a*f*g*h^2 -2*b*d*h^3-b*f*g^2*h+2*c*d*g*h^2+c*f*g^3)*x^3/h^4+1/5*f^2/h^2*(b*h-c*g)*x^ 5+(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)/h^7*ln(h*x+g)
Time = 0.07 (sec) , antiderivative size = 379, normalized size of antiderivative = 1.40 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=\frac {10 \, c f^{2} h^{6} x^{6} - 12 \, {\left (c f^{2} g h^{5} - b f^{2} h^{6}\right )} x^{5} + 15 \, {\left (c f^{2} g^{2} h^{4} - b f^{2} g h^{5} + {\left (2 \, c d f + a f^{2}\right )} h^{6}\right )} x^{4} - 20 \, {\left (c f^{2} g^{3} h^{3} - b f^{2} g^{2} h^{4} - 2 \, b d f h^{6} + {\left (2 \, c d f + a f^{2}\right )} g h^{5}\right )} x^{3} + 30 \, {\left (c f^{2} g^{4} h^{2} - b f^{2} g^{3} h^{3} - 2 \, b d f g h^{5} + {\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} - 60 \, {\left (c f^{2} g^{5} h - b f^{2} g^{4} h^{2} - 2 \, 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} + {\left (c d^{2} + 2 \, a d f\right )} g h^{5}\right )} x + 60 \, {\left (c f^{2} g^{6} - b f^{2} g^{5} h - 2 \, b d f g^{3} h^{3} - b d^{2} g h^{5} + a d^{2} h^{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}\right )} \log \left (h x + g\right )}{60 \, h^{7}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g),x, algorithm="fricas")
Output:
1/60*(10*c*f^2*h^6*x^6 - 12*(c*f^2*g*h^5 - b*f^2*h^6)*x^5 + 15*(c*f^2*g^2* h^4 - b*f^2*g*h^5 + (2*c*d*f + a*f^2)*h^6)*x^4 - 20*(c*f^2*g^3*h^3 - b*f^2 *g^2*h^4 - 2*b*d*f*h^6 + (2*c*d*f + a*f^2)*g*h^5)*x^3 + 30*(c*f^2*g^4*h^2 - b*f^2*g^3*h^3 - 2*b*d*f*g*h^5 + (2*c*d*f + a*f^2)*g^2*h^4 + (c*d^2 + 2*a *d*f)*h^6)*x^2 - 60*(c*f^2*g^5*h - b*f^2*g^4*h^2 - 2*b*d*f*g^2*h^4 - b*d^2 *h^6 + (2*c*d*f + a*f^2)*g^3*h^3 + (c*d^2 + 2*a*d*f)*g*h^5)*x + 60*(c*f^2* g^6 - b*f^2*g^5*h - 2*b*d*f*g^3*h^3 - b*d^2*g*h^5 + a*d^2*h^6 + (2*c*d*f + a*f^2)*g^4*h^2 + (c*d^2 + 2*a*d*f)*g^2*h^4)*log(h*x + g))/h^7
Time = 0.42 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.32 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=\frac {c f^{2} x^{6}}{6 h} + x^{5} \left (\frac {b f^{2}}{5 h} - \frac {c f^{2} g}{5 h^{2}}\right ) + x^{4} \left (\frac {a f^{2}}{4 h} - \frac {b f^{2} g}{4 h^{2}} + \frac {c d f}{2 h} + \frac {c f^{2} g^{2}}{4 h^{3}}\right ) + x^{3} \left (- \frac {a f^{2} g}{3 h^{2}} + \frac {2 b d f}{3 h} + \frac {b f^{2} g^{2}}{3 h^{3}} - \frac {2 c d f g}{3 h^{2}} - \frac {c f^{2} g^{3}}{3 h^{4}}\right ) + x^{2} \left (\frac {a d f}{h} + \frac {a f^{2} g^{2}}{2 h^{3}} - \frac {b d f g}{h^{2}} - \frac {b f^{2} g^{3}}{2 h^{4}} + \frac {c d^{2}}{2 h} + \frac {c d f g^{2}}{h^{3}} + \frac {c f^{2} g^{4}}{2 h^{5}}\right ) + x \left (- \frac {2 a d f g}{h^{2}} - \frac {a f^{2} g^{3}}{h^{4}} + \frac {b d^{2}}{h} + \frac {2 b d f g^{2}}{h^{3}} + \frac {b f^{2} g^{4}}{h^{5}} - \frac {c d^{2} g}{h^{2}} - \frac {2 c d f g^{3}}{h^{4}} - \frac {c f^{2} g^{5}}{h^{6}}\right ) + \frac {\left (d h^{2} + f g^{2}\right )^{2} \left (a h^{2} - b g h + c g^{2}\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),x)
Output:
c*f**2*x**6/(6*h) + x**5*(b*f**2/(5*h) - c*f**2*g/(5*h**2)) + x**4*(a*f**2 /(4*h) - b*f**2*g/(4*h**2) + c*d*f/(2*h) + c*f**2*g**2/(4*h**3)) + x**3*(- a*f**2*g/(3*h**2) + 2*b*d*f/(3*h) + b*f**2*g**2/(3*h**3) - 2*c*d*f*g/(3*h* *2) - c*f**2*g**3/(3*h**4)) + x**2*(a*d*f/h + a*f**2*g**2/(2*h**3) - b*d*f *g/h**2 - b*f**2*g**3/(2*h**4) + c*d**2/(2*h) + c*d*f*g**2/h**3 + c*f**2*g **4/(2*h**5)) + x*(-2*a*d*f*g/h**2 - a*f**2*g**3/h**4 + b*d**2/h + 2*b*d*f *g**2/h**3 + b*f**2*g**4/h**5 - c*d**2*g/h**2 - 2*c*d*f*g**3/h**4 - c*f**2 *g**5/h**6) + (d*h**2 + f*g**2)**2*(a*h**2 - b*g*h + c*g**2)*log(g + h*x)/ h**7
Time = 0.03 (sec) , antiderivative size = 377, normalized size of antiderivative = 1.39 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=\frac {10 \, c f^{2} h^{5} x^{6} - 12 \, {\left (c f^{2} g h^{4} - b f^{2} h^{5}\right )} x^{5} + 15 \, {\left (c f^{2} g^{2} h^{3} - b f^{2} g h^{4} + {\left (2 \, c d f + a f^{2}\right )} h^{5}\right )} x^{4} - 20 \, {\left (c f^{2} g^{3} h^{2} - b f^{2} g^{2} h^{3} - 2 \, b d f h^{5} + {\left (2 \, c d f + a f^{2}\right )} g h^{4}\right )} x^{3} + 30 \, {\left (c f^{2} g^{4} h - b f^{2} g^{3} h^{2} - 2 \, b d f g h^{4} + {\left (2 \, c d f + a f^{2}\right )} g^{2} h^{3} + {\left (c d^{2} + 2 \, a d f\right )} h^{5}\right )} x^{2} - 60 \, {\left (c f^{2} g^{5} - b f^{2} g^{4} h - 2 \, b d f g^{2} h^{3} - b d^{2} h^{5} + {\left (2 \, c d f + a f^{2}\right )} g^{3} h^{2} + {\left (c d^{2} + 2 \, a d f\right )} g h^{4}\right )} x}{60 \, h^{6}} + \frac {{\left (c f^{2} g^{6} - b f^{2} g^{5} h - 2 \, b d f g^{3} h^{3} - b d^{2} g h^{5} + a d^{2} h^{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}\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),x, algorithm="maxima")
Output:
1/60*(10*c*f^2*h^5*x^6 - 12*(c*f^2*g*h^4 - b*f^2*h^5)*x^5 + 15*(c*f^2*g^2* h^3 - b*f^2*g*h^4 + (2*c*d*f + a*f^2)*h^5)*x^4 - 20*(c*f^2*g^3*h^2 - b*f^2 *g^2*h^3 - 2*b*d*f*h^5 + (2*c*d*f + a*f^2)*g*h^4)*x^3 + 30*(c*f^2*g^4*h - b*f^2*g^3*h^2 - 2*b*d*f*g*h^4 + (2*c*d*f + a*f^2)*g^2*h^3 + (c*d^2 + 2*a*d *f)*h^5)*x^2 - 60*(c*f^2*g^5 - b*f^2*g^4*h - 2*b*d*f*g^2*h^3 - b*d^2*h^5 + (2*c*d*f + a*f^2)*g^3*h^2 + (c*d^2 + 2*a*d*f)*g*h^4)*x)/h^6 + (c*f^2*g^6 - b*f^2*g^5*h - 2*b*d*f*g^3*h^3 - b*d^2*g*h^5 + a*d^2*h^6 + (2*c*d*f + a*f ^2)*g^4*h^2 + (c*d^2 + 2*a*d*f)*g^2*h^4)*log(h*x + g)/h^7
Time = 0.11 (sec) , antiderivative size = 445, 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} \, dx=\frac {10 \, c f^{2} h^{5} x^{6} - 12 \, c f^{2} g h^{4} x^{5} + 12 \, b f^{2} h^{5} x^{5} + 15 \, c f^{2} g^{2} h^{3} x^{4} - 15 \, b f^{2} g h^{4} x^{4} + 30 \, c d f h^{5} x^{4} + 15 \, a f^{2} h^{5} x^{4} - 20 \, c f^{2} g^{3} h^{2} x^{3} + 20 \, b f^{2} g^{2} h^{3} x^{3} - 40 \, c d f g h^{4} x^{3} - 20 \, a f^{2} g h^{4} x^{3} + 40 \, b d f h^{5} x^{3} + 30 \, c f^{2} g^{4} h x^{2} - 30 \, b f^{2} g^{3} h^{2} x^{2} + 60 \, c d f g^{2} h^{3} x^{2} + 30 \, a f^{2} g^{2} h^{3} x^{2} - 60 \, b d f g h^{4} x^{2} + 30 \, c d^{2} h^{5} x^{2} + 60 \, a d f h^{5} x^{2} - 60 \, c f^{2} g^{5} x + 60 \, b f^{2} g^{4} h x - 120 \, c d f g^{3} h^{2} x - 60 \, a f^{2} g^{3} h^{2} x + 120 \, b d f g^{2} h^{3} x - 60 \, c d^{2} g h^{4} x - 120 \, a d f g h^{4} x + 60 \, b d^{2} h^{5} x}{60 \, h^{6}} + \frac {{\left (c f^{2} g^{6} - b f^{2} g^{5} h + 2 \, c d f g^{4} h^{2} + a f^{2} g^{4} h^{2} - 2 \, b d f g^{3} h^{3} + c d^{2} g^{2} h^{4} + 2 \, a d f g^{2} h^{4} - b d^{2} g h^{5} + a d^{2} h^{6}\right )} \log \left ({\left | h x + g \right |}\right )}{h^{7}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g),x, algorithm="giac")
Output:
1/60*(10*c*f^2*h^5*x^6 - 12*c*f^2*g*h^4*x^5 + 12*b*f^2*h^5*x^5 + 15*c*f^2* g^2*h^3*x^4 - 15*b*f^2*g*h^4*x^4 + 30*c*d*f*h^5*x^4 + 15*a*f^2*h^5*x^4 - 2 0*c*f^2*g^3*h^2*x^3 + 20*b*f^2*g^2*h^3*x^3 - 40*c*d*f*g*h^4*x^3 - 20*a*f^2 *g*h^4*x^3 + 40*b*d*f*h^5*x^3 + 30*c*f^2*g^4*h*x^2 - 30*b*f^2*g^3*h^2*x^2 + 60*c*d*f*g^2*h^3*x^2 + 30*a*f^2*g^2*h^3*x^2 - 60*b*d*f*g*h^4*x^2 + 30*c* d^2*h^5*x^2 + 60*a*d*f*h^5*x^2 - 60*c*f^2*g^5*x + 60*b*f^2*g^4*h*x - 120*c *d*f*g^3*h^2*x - 60*a*f^2*g^3*h^2*x + 120*b*d*f*g^2*h^3*x - 60*c*d^2*g*h^4 *x - 120*a*d*f*g*h^4*x + 60*b*d^2*h^5*x)/h^6 + (c*f^2*g^6 - b*f^2*g^5*h + 2*c*d*f*g^4*h^2 + a*f^2*g^4*h^2 - 2*b*d*f*g^3*h^3 + c*d^2*g^2*h^4 + 2*a*d* f*g^2*h^4 - b*d^2*g*h^5 + a*d^2*h^6)*log(abs(h*x + g))/h^7
Time = 16.51 (sec) , antiderivative size = 422, normalized size of antiderivative = 1.56 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=x^4\,\left (\frac {a\,f^2+2\,c\,d\,f}{4\,h}-\frac {g\,\left (\frac {b\,f^2}{h}-\frac {c\,f^2\,g}{h^2}\right )}{4\,h}\right )-x^3\,\left (\frac {g\,\left (\frac {a\,f^2+2\,c\,d\,f}{h}-\frac {g\,\left (\frac {b\,f^2}{h}-\frac {c\,f^2\,g}{h^2}\right )}{h}\right )}{3\,h}-\frac {2\,b\,d\,f}{3\,h}\right )+x^5\,\left (\frac {b\,f^2}{5\,h}-\frac {c\,f^2\,g}{5\,h^2}\right )-x\,\left (\frac {g\,\left (\frac {c\,d^2+2\,a\,f\,d}{h}+\frac {g\,\left (\frac {g\,\left (\frac {a\,f^2+2\,c\,d\,f}{h}-\frac {g\,\left (\frac {b\,f^2}{h}-\frac {c\,f^2\,g}{h^2}\right )}{h}\right )}{h}-\frac {2\,b\,d\,f}{h}\right )}{h}\right )}{h}-\frac {b\,d^2}{h}\right )+x^2\,\left (\frac {c\,d^2+2\,a\,f\,d}{2\,h}+\frac {g\,\left (\frac {g\,\left (\frac {a\,f^2+2\,c\,d\,f}{h}-\frac {g\,\left (\frac {b\,f^2}{h}-\frac {c\,f^2\,g}{h^2}\right )}{h}\right )}{h}-\frac {2\,b\,d\,f}{h}\right )}{2\,h}\right )+\frac {\ln \left (g+h\,x\right )\,\left (c\,d^2\,g^2\,h^4-b\,d^2\,g\,h^5+a\,d^2\,h^6+2\,c\,d\,f\,g^4\,h^2-2\,b\,d\,f\,g^3\,h^3+2\,a\,d\,f\,g^2\,h^4+c\,f^2\,g^6-b\,f^2\,g^5\,h+a\,f^2\,g^4\,h^2\right )}{h^7}+\frac {c\,f^2\,x^6}{6\,h} \] Input:
int(((d + f*x^2)^2*(a + b*x + c*x^2))/(g + h*x),x)
Output:
x^4*((a*f^2 + 2*c*d*f)/(4*h) - (g*((b*f^2)/h - (c*f^2*g)/h^2))/(4*h)) - x^ 3*((g*((a*f^2 + 2*c*d*f)/h - (g*((b*f^2)/h - (c*f^2*g)/h^2))/h))/(3*h) - ( 2*b*d*f)/(3*h)) + x^5*((b*f^2)/(5*h) - (c*f^2*g)/(5*h^2)) - x*((g*((c*d^2 + 2*a*d*f)/h + (g*((g*((a*f^2 + 2*c*d*f)/h - (g*((b*f^2)/h - (c*f^2*g)/h^2 ))/h))/h - (2*b*d*f)/h))/h))/h - (b*d^2)/h) + x^2*((c*d^2 + 2*a*d*f)/(2*h) + (g*((g*((a*f^2 + 2*c*d*f)/h - (g*((b*f^2)/h - (c*f^2*g)/h^2))/h))/h - ( 2*b*d*f)/h))/(2*h)) + (log(g + h*x)*(a*d^2*h^6 + c*f^2*g^6 + a*f^2*g^4*h^2 + c*d^2*g^2*h^4 - b*d^2*g*h^5 - b*f^2*g^5*h + 2*a*d*f*g^2*h^4 - 2*b*d*f*g ^3*h^3 + 2*c*d*f*g^4*h^2))/h^7 + (c*f^2*x^6)/(6*h)
Time = 0.16 (sec) , antiderivative size = 495, normalized size of antiderivative = 1.83 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{g+h x} \, dx=\frac {15 a \,f^{2} h^{6} x^{4}+60 b \,d^{2} h^{6} x +12 b \,f^{2} h^{6} x^{5}+30 c \,d^{2} h^{6} x^{2}+10 c \,f^{2} h^{6} x^{6}+60 \,\mathrm {log}\left (h x +g \right ) a \,f^{2} g^{4} h^{2}-60 \,\mathrm {log}\left (h x +g \right ) b \,d^{2} g \,h^{5}-60 \,\mathrm {log}\left (h x +g \right ) b \,f^{2} g^{5} h +60 \,\mathrm {log}\left (h x +g \right ) c \,d^{2} g^{2} h^{4}+60 a d f \,h^{6} x^{2}-60 a \,f^{2} g^{3} h^{3} x +30 a \,f^{2} g^{2} h^{4} x^{2}-20 a \,f^{2} g \,h^{5} x^{3}+40 b d f \,h^{6} x^{3}+60 b \,f^{2} g^{4} h^{2} x -30 b \,f^{2} g^{3} h^{3} x^{2}+20 b \,f^{2} g^{2} h^{4} x^{3}-15 b \,f^{2} g \,h^{5} x^{4}-60 c \,d^{2} g \,h^{5} x +30 c d f \,h^{6} x^{4}-60 c \,f^{2} g^{5} h x +30 c \,f^{2} g^{4} h^{2} x^{2}-20 c \,f^{2} g^{3} h^{3} x^{3}+15 c \,f^{2} g^{2} h^{4} x^{4}-12 c \,f^{2} g \,h^{5} x^{5}+60 \,\mathrm {log}\left (h x +g \right ) a \,d^{2} h^{6}+60 \,\mathrm {log}\left (h x +g \right ) c \,f^{2} g^{6}+120 \,\mathrm {log}\left (h x +g \right ) a d f \,g^{2} h^{4}-120 \,\mathrm {log}\left (h x +g \right ) b d f \,g^{3} h^{3}+120 \,\mathrm {log}\left (h x +g \right ) c d f \,g^{4} h^{2}-120 a d f g \,h^{5} x +120 b d f \,g^{2} h^{4} x -60 b d f g \,h^{5} x^{2}-120 c d f \,g^{3} h^{3} x +60 c d f \,g^{2} h^{4} x^{2}-40 c d f g \,h^{5} x^{3}}{60 h^{7}} \] Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g),x)
Output:
(60*log(g + h*x)*a*d**2*h**6 + 120*log(g + h*x)*a*d*f*g**2*h**4 + 60*log(g + h*x)*a*f**2*g**4*h**2 - 60*log(g + h*x)*b*d**2*g*h**5 - 120*log(g + h*x )*b*d*f*g**3*h**3 - 60*log(g + h*x)*b*f**2*g**5*h + 60*log(g + h*x)*c*d**2 *g**2*h**4 + 120*log(g + h*x)*c*d*f*g**4*h**2 + 60*log(g + h*x)*c*f**2*g** 6 - 120*a*d*f*g*h**5*x + 60*a*d*f*h**6*x**2 - 60*a*f**2*g**3*h**3*x + 30*a *f**2*g**2*h**4*x**2 - 20*a*f**2*g*h**5*x**3 + 15*a*f**2*h**6*x**4 + 60*b* d**2*h**6*x + 120*b*d*f*g**2*h**4*x - 60*b*d*f*g*h**5*x**2 + 40*b*d*f*h**6 *x**3 + 60*b*f**2*g**4*h**2*x - 30*b*f**2*g**3*h**3*x**2 + 20*b*f**2*g**2* h**4*x**3 - 15*b*f**2*g*h**5*x**4 + 12*b*f**2*h**6*x**5 - 60*c*d**2*g*h**5 *x + 30*c*d**2*h**6*x**2 - 120*c*d*f*g**3*h**3*x + 60*c*d*f*g**2*h**4*x**2 - 40*c*d*f*g*h**5*x**3 + 30*c*d*f*h**6*x**4 - 60*c*f**2*g**5*h*x + 30*c*f **2*g**4*h**2*x**2 - 20*c*f**2*g**3*h**3*x**3 + 15*c*f**2*g**2*h**4*x**4 - 12*c*f**2*g*h**5*x**5 + 10*c*f**2*h**6*x**6)/(60*h**7)