Integrand size = 27, antiderivative size = 298 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=\frac {\left (c \left (5 f^2 g^4+6 d f g^2 h^2+d^2 h^4\right )+f h \left (a h \left (3 f g^2+2 d h^2\right )-4 b \left (f g^3+d g h^2\right )\right )\right ) x}{h^6}+\frac {f \left (h \left (3 b f g^2-2 a f g h+2 b d h^2\right )-4 c \left (f g^3+d g h^2\right )\right ) x^2}{2 h^5}-\frac {f \left (f h (2 b g-a h)-c \left (3 f g^2+2 d h^2\right )\right ) x^3}{3 h^4}-\frac {f^2 (2 c g-b h) x^4}{4 h^3}+\frac {c f^2 x^5}{5 h^2}-\frac {\left (c g^2-b g h+a h^2\right ) \left (f g^2+d h^2\right )^2}{h^7 (g+h x)}-\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 ) \log (g+h x)}{h^7} \] Output:
(c*(d^2*h^4+6*d*f*g^2*h^2+5*f^2*g^4)+f*h*(a*h*(2*d*h^2+3*f*g^2)-4*b*(d*g*h ^2+f*g^3)))*x/h^6+1/2*f*(h*(-2*a*f*g*h+2*b*d*h^2+3*b*f*g^2)-4*c*(d*g*h^2+f *g^3))*x^2/h^5-1/3*f*(f*h*(-a*h+2*b*g)-c*(2*d*h^2+3*f*g^2))*x^3/h^4-1/4*f^ 2*(-b*h+2*c*g)*x^4/h^3+1/5*c*f^2*x^5/h^2-(a*h^2-b*g*h+c*g^2)*(d*h^2+f*g^2) ^2/h^7/(h*x+g)-(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)*ln(h*x+g)/h^7
Time = 0.30 (sec) , antiderivative size = 287, normalized size of antiderivative = 0.96 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=\frac {60 h \left (c \left (5 f^2 g^4+6 d f g^2 h^2+d^2 h^4\right )+f h \left (a h \left (3 f g^2+2 d h^2\right )-4 b \left (f g^3+d g h^2\right )\right )\right ) x-30 f h^2 \left (h \left (-3 b f g^2+2 a f g h-2 b d h^2\right )+4 c \left (f g^3+d g h^2\right )\right ) x^2+20 f h^3 \left (f h (-2 b g+a h)+c \left (3 f g^2+2 d h^2\right )\right ) x^3+15 f^2 h^4 (-2 c g+b h) x^4+12 c f^2 h^5 x^5-\frac {60 \left (f g^2+d h^2\right )^2 \left (c g^2+h (-b g+a h)\right )}{g+h x}-60 \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 ) \log (g+h x)}{60 h^7} \] Input:
Integrate[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x)^2,x]
Output:
(60*h*(c*(5*f^2*g^4 + 6*d*f*g^2*h^2 + d^2*h^4) + f*h*(a*h*(3*f*g^2 + 2*d*h ^2) - 4*b*(f*g^3 + d*g*h^2)))*x - 30*f*h^2*(h*(-3*b*f*g^2 + 2*a*f*g*h - 2* b*d*h^2) + 4*c*(f*g^3 + d*g*h^2))*x^2 + 20*f*h^3*(f*h*(-2*b*g + a*h) + c*( 3*f*g^2 + 2*d*h^2))*x^3 + 15*f^2*h^4*(-2*c*g + b*h)*x^4 + 12*c*f^2*h^5*x^5 - (60*(f*g^2 + d*h^2)^2*(c*g^2 + h*(-(b*g) + a*h)))/(g + h*x) - 60*(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)* Log[g + h*x])/(60*h^7)
Time = 0.75 (sec) , antiderivative size = 298, 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)^2} \, dx\) |
\(\Big \downarrow \) 2159 |
\(\displaystyle \int \left (\frac {f h \left (a h \left (2 d h^2+3 f g^2\right )-4 b \left (d g h^2+f g^3\right )\right )+c \left (d^2 h^4+6 d f g^2 h^2+5 f^2 g^4\right )}{h^6}+\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)^2}+\frac {f x^2 \left (c \left (2 d h^2+3 f g^2\right )-f h (2 b g-a h)\right )}{h^4}+\frac {f x \left (h \left (-2 a f g h+2 b d h^2+3 b f g^2\right )-4 c \left (d g h^2+f g^3\right )\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)}+\frac {f^2 x^3 (b h-2 c g)}{h^3}+\frac {c f^2 x^4}{h^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x \left (f h \left (a h \left (2 d h^2+3 f g^2\right )-4 b \left (d g h^2+f g^3\right )\right )+c \left (d^2 h^4+6 d f g^2 h^2+5 f^2 g^4\right )\right )}{h^6}-\frac {\left (d h^2+f g^2\right )^2 \left (a h^2-b g h+c g^2\right )}{h^7 (g+h x)}-\frac {f x^3 \left (f h (2 b g-a h)-c \left (2 d h^2+3 f g^2\right )\right )}{3 h^4}+\frac {f x^2 \left (h \left (-2 a f g h+2 b d h^2+3 b f g^2\right )-4 c \left (d g h^2+f g^3\right )\right )}{2 h^5}-\frac {\left (d h^2+f g^2\right ) \log (g+h x) \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}-\frac {f^2 x^4 (2 c g-b h)}{4 h^3}+\frac {c f^2 x^5}{5 h^2}\) |
Input:
Int[((a + b*x + c*x^2)*(d + f*x^2)^2)/(g + h*x)^2,x]
Output:
((c*(5*f^2*g^4 + 6*d*f*g^2*h^2 + d^2*h^4) + f*h*(a*h*(3*f*g^2 + 2*d*h^2) - 4*b*(f*g^3 + d*g*h^2)))*x)/h^6 + (f*(h*(3*b*f*g^2 - 2*a*f*g*h + 2*b*d*h^2 ) - 4*c*(f*g^3 + d*g*h^2))*x^2)/(2*h^5) - (f*(f*h*(2*b*g - a*h) - c*(3*f*g ^2 + 2*d*h^2))*x^3)/(3*h^4) - (f^2*(2*c*g - b*h)*x^4)/(4*h^3) + (c*f^2*x^5 )/(5*h^2) - ((c*g^2 - b*g*h + a*h^2)*(f*g^2 + d*h^2)^2)/(h^7*(g + h*x)) - ((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)*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.10 (sec) , antiderivative size = 401, normalized size of antiderivative = 1.35
method | result | size |
norman | \(\frac {\frac {\left (a \,d^{2} h^{6}+4 a d f \,g^{2} h^{4}+4 a \,f^{2} g^{4} h^{2}-b \,d^{2} g \,h^{5}-6 b d f \,g^{3} h^{3}-5 b \,f^{2} g^{5} h +2 c \,d^{2} g^{2} h^{4}+8 c d f \,g^{4} h^{2}+6 c \,f^{2} g^{6}\right ) x}{h^{6} g}+\frac {\left (4 a d f \,h^{4}+4 a \,f^{2} g^{2} h^{2}-6 b d f g \,h^{3}-5 b \,f^{2} g^{3} h +2 c \,d^{2} h^{4}+8 c d f \,g^{2} h^{2}+6 c \,f^{2} g^{4}\right ) x^{2}}{2 h^{5}}+\frac {c \,f^{2} x^{6}}{5 h}+\frac {f \left (4 a f \,h^{2}-5 b f g h +8 c d \,h^{2}+6 c f \,g^{2}\right ) x^{4}}{12 h^{3}}-\frac {f \left (4 a f g \,h^{2}-6 b d \,h^{3}-5 b f \,g^{2} h +8 c d g \,h^{2}+6 c f \,g^{3}\right ) x^{3}}{6 h^{4}}+\frac {f^{2} \left (5 b h -6 c g \right ) x^{5}}{20 h^{2}}}{h x +g}-\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 ) \ln \left (h x +g \right )}{h^{7}}\) | \(401\) |
default | \(\frac {\frac {1}{5} c \,f^{2} x^{5} h^{4}+\frac {1}{4} b \,f^{2} h^{4} x^{4}-\frac {1}{2} c \,f^{2} g \,h^{3} x^{4}+\frac {1}{3} a \,f^{2} h^{4} x^{3}-\frac {2}{3} b \,f^{2} g \,h^{3} x^{3}+\frac {2}{3} c d f \,h^{4} x^{3}+c \,f^{2} g^{2} h^{2} x^{3}-a \,f^{2} g \,h^{3} x^{2}+b d f \,h^{4} x^{2}+\frac {3}{2} b \,f^{2} g^{2} h^{2} x^{2}-2 c d f g \,h^{3} x^{2}-2 c \,f^{2} g^{3} h \,x^{2}+2 a d f \,h^{4} x +3 a \,f^{2} g^{2} h^{2} x -4 b d f g \,h^{3} x -4 b \,f^{2} g^{3} h x +c \,d^{2} h^{4} x +6 c d f \,g^{2} h^{2} x +5 c \,f^{2} g^{4} 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 ) \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}}{h^{7} \left (h x +g \right )}\) | \(426\) |
risch | \(\frac {b d f \,x^{2}}{h^{2}}+\frac {c \,f^{2} x^{5}}{5 h^{2}}-\frac {c \,f^{2} g \,x^{4}}{2 h^{3}}-\frac {2 b \,f^{2} g \,x^{3}}{3 h^{3}}+\frac {2 c d f \,x^{3}}{3 h^{2}}+\frac {c \,f^{2} g^{2} x^{3}}{h^{4}}-\frac {a \,f^{2} g \,x^{2}}{h^{3}}+\frac {3 b \,f^{2} g^{2} x^{2}}{2 h^{4}}-\frac {2 c \,f^{2} g^{3} x^{2}}{h^{5}}-\frac {4 \ln \left (h x +g \right ) a \,f^{2} g^{3}}{h^{5}}+\frac {5 \ln \left (h x +g \right ) b \,f^{2} g^{4}}{h^{6}}-\frac {2 \ln \left (h x +g \right ) c \,d^{2} g}{h^{3}}-\frac {6 \ln \left (h x +g \right ) c \,f^{2} g^{5}}{h^{7}}+\frac {2 a d f x}{h^{2}}+\frac {3 a \,f^{2} g^{2} x}{h^{4}}-\frac {4 b \,f^{2} g^{3} x}{h^{5}}+\frac {5 c \,f^{2} g^{4} x}{h^{6}}-\frac {a \,f^{2} g^{4}}{h^{5} \left (h x +g \right )}+\frac {b \,d^{2} g}{h^{2} \left (h x +g \right )}+\frac {b \,f^{2} g^{5}}{h^{6} \left (h x +g \right )}-\frac {c \,d^{2} g^{2}}{h^{3} \left (h x +g \right )}-\frac {c \,f^{2} g^{6}}{h^{7} \left (h x +g \right )}+\frac {b \,f^{2} x^{4}}{4 h^{2}}+\frac {a \,f^{2} x^{3}}{3 h^{2}}+\frac {c \,d^{2} x}{h^{2}}-\frac {a \,d^{2}}{h \left (h x +g \right )}+\frac {\ln \left (h x +g \right ) b \,d^{2}}{h^{2}}+\frac {6 c d f \,g^{2} x}{h^{4}}-\frac {2 a d f \,g^{2}}{h^{3} \left (h x +g \right )}+\frac {2 b d f \,g^{3}}{h^{4} \left (h x +g \right )}-\frac {2 c d f \,g^{4}}{h^{5} \left (h x +g \right )}-\frac {2 c d f g \,x^{2}}{h^{3}}-\frac {4 b d f g x}{h^{3}}+\frac {6 \ln \left (h x +g \right ) b d f \,g^{2}}{h^{4}}-\frac {8 \ln \left (h x +g \right ) c d f \,g^{3}}{h^{5}}-\frac {4 \ln \left (h x +g \right ) a d f g}{h^{3}}\) | \(527\) |
parallelrisch | \(-\frac {150 x^{2} b \,f^{2} g^{3} h^{3}-180 x^{2} c \,f^{2} g^{4} h^{2}-50 x^{3} b \,f^{2} g^{2} h^{4}+60 x^{3} c \,f^{2} g^{3} h^{3}-120 x^{2} a d f \,h^{6}-120 x^{2} a \,f^{2} g^{2} h^{4}-360 b d f \,g^{3} h^{3}+480 c d f \,g^{4} h^{2}+240 a d f \,g^{2} h^{4}-60 \ln \left (h x +g \right ) x b \,d^{2} h^{6}-360 \ln \left (h x +g \right ) x b d f \,g^{2} h^{4}+240 \ln \left (h x +g \right ) x a d f g \,h^{5}+480 \ln \left (h x +g \right ) x c d f \,g^{3} h^{3}+240 a \,f^{2} g^{4} h^{2}-30 x^{4} c \,f^{2} g^{2} h^{4}-60 \ln \left (h x +g \right ) b \,d^{2} g \,h^{5}-40 x^{4} c d f \,h^{6}-60 x^{3} b d f \,h^{6}-300 \ln \left (h x +g \right ) b \,f^{2} g^{5} h +120 \ln \left (h x +g \right ) c \,d^{2} g^{2} h^{4}+120 c \,d^{2} g^{2} h^{4}+360 c \,f^{2} g^{6}-300 b \,f^{2} g^{5} h +18 x^{5} c \,f^{2} g \,h^{5}+25 x^{4} b \,f^{2} g \,h^{5}-60 b \,d^{2} g \,h^{5}+80 x^{3} c d f g \,h^{5}+240 \ln \left (h x +g \right ) a d f \,g^{2} h^{4}+40 x^{3} a \,f^{2} g \,h^{5}+240 \ln \left (h x +g \right ) a \,f^{2} g^{4} h^{2}-15 x^{5} b \,f^{2} h^{6}-20 x^{4} a \,f^{2} h^{6}+60 a \,d^{2} h^{6}+180 x^{2} b d f g \,h^{5}-240 x^{2} c d f \,g^{2} h^{4}+480 \ln \left (h x +g \right ) c d f \,g^{4} h^{2}-60 x^{2} c \,d^{2} h^{6}-12 x^{6} c \,f^{2} h^{6}+360 \ln \left (h x +g \right ) c \,f^{2} g^{6}+240 \ln \left (h x +g \right ) x a \,f^{2} g^{3} h^{3}-300 \ln \left (h x +g \right ) x b \,f^{2} g^{4} h^{2}+120 \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 -360 \ln \left (h x +g \right ) b d f \,g^{3} h^{3}}{60 h^{7} \left (h x +g \right )}\) | \(631\) |
Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^2,x,method=_RETURNVERBOSE)
Output:
((a*d^2*h^6+4*a*d*f*g^2*h^4+4*a*f^2*g^4*h^2-b*d^2*g*h^5-6*b*d*f*g^3*h^3-5* b*f^2*g^5*h+2*c*d^2*g^2*h^4+8*c*d*f*g^4*h^2+6*c*f^2*g^6)/h^6/g*x+1/2*(4*a* d*f*h^4+4*a*f^2*g^2*h^2-6*b*d*f*g*h^3-5*b*f^2*g^3*h+2*c*d^2*h^4+8*c*d*f*g^ 2*h^2+6*c*f^2*g^4)/h^5*x^2+1/5*c*f^2*x^6/h+1/12*f*(4*a*f*h^2-5*b*f*g*h+8*c *d*h^2+6*c*f*g^2)/h^3*x^4-1/6*f*(4*a*f*g*h^2-6*b*d*h^3-5*b*f*g^2*h+8*c*d*g *h^2+6*c*f*g^3)/h^4*x^3+1/20*f^2*(5*b*h-6*c*g)/h^2*x^5)/(h*x+g)-(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*ln(h*x+g)
Time = 0.07 (sec) , antiderivative size = 553, normalized size of antiderivative = 1.86 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=\frac {12 \, c f^{2} h^{6} x^{6} - 60 \, c f^{2} g^{6} + 60 \, b f^{2} g^{5} h + 120 \, b d f g^{3} h^{3} + 60 \, b d^{2} g h^{5} - 60 \, a d^{2} h^{6} - 60 \, {\left (2 \, c d f + a f^{2}\right )} g^{4} h^{2} - 60 \, {\left (c d^{2} + 2 \, a d f\right )} g^{2} h^{4} - 3 \, {\left (6 \, c f^{2} g h^{5} - 5 \, b f^{2} h^{6}\right )} x^{5} + 5 \, {\left (6 \, c f^{2} g^{2} h^{4} - 5 \, b f^{2} g h^{5} + 4 \, {\left (2 \, c d f + a f^{2}\right )} h^{6}\right )} x^{4} - 10 \, {\left (6 \, c f^{2} g^{3} h^{3} - 5 \, b f^{2} g^{2} h^{4} - 6 \, b d f h^{6} + 4 \, {\left (2 \, c d f + a f^{2}\right )} g h^{5}\right )} x^{3} + 30 \, {\left (6 \, c f^{2} g^{4} h^{2} - 5 \, b f^{2} g^{3} h^{3} - 6 \, b d f g h^{5} + 4 \, {\left (2 \, c d f + a f^{2}\right )} g^{2} h^{4} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} h^{6}\right )} x^{2} + 60 \, {\left (5 \, c f^{2} g^{5} h - 4 \, b f^{2} g^{4} h^{2} - 4 \, b d f g^{2} h^{4} + 3 \, {\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 (6 \, c f^{2} g^{6} - 5 \, b f^{2} g^{5} h - 6 \, b d f g^{3} h^{3} - b d^{2} g h^{5} + 4 \, {\left (2 \, c d f + a f^{2}\right )} g^{4} h^{2} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} g^{2} h^{4} + {\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\right )} \log \left (h x + g\right )}{60 \, {\left (h^{8} x + g h^{7}\right )}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^2,x, algorithm="fricas")
Output:
1/60*(12*c*f^2*h^6*x^6 - 60*c*f^2*g^6 + 60*b*f^2*g^5*h + 120*b*d*f*g^3*h^3 + 60*b*d^2*g*h^5 - 60*a*d^2*h^6 - 60*(2*c*d*f + a*f^2)*g^4*h^2 - 60*(c*d^ 2 + 2*a*d*f)*g^2*h^4 - 3*(6*c*f^2*g*h^5 - 5*b*f^2*h^6)*x^5 + 5*(6*c*f^2*g^ 2*h^4 - 5*b*f^2*g*h^5 + 4*(2*c*d*f + a*f^2)*h^6)*x^4 - 10*(6*c*f^2*g^3*h^3 - 5*b*f^2*g^2*h^4 - 6*b*d*f*h^6 + 4*(2*c*d*f + a*f^2)*g*h^5)*x^3 + 30*(6* c*f^2*g^4*h^2 - 5*b*f^2*g^3*h^3 - 6*b*d*f*g*h^5 + 4*(2*c*d*f + a*f^2)*g^2* h^4 + 2*(c*d^2 + 2*a*d*f)*h^6)*x^2 + 60*(5*c*f^2*g^5*h - 4*b*f^2*g^4*h^2 - 4*b*d*f*g^2*h^4 + 3*(2*c*d*f + a*f^2)*g^3*h^3 + (c*d^2 + 2*a*d*f)*g*h^5)* x - 60*(6*c*f^2*g^6 - 5*b*f^2*g^5*h - 6*b*d*f*g^3*h^3 - b*d^2*g*h^5 + 4*(2 *c*d*f + a*f^2)*g^4*h^2 + 2*(c*d^2 + 2*a*d*f)*g^2*h^4 + (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)*log(h*x + g))/(h^8*x + g*h^7)
Time = 1.04 (sec) , antiderivative size = 416, 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)^2} \, dx=\frac {c f^{2} x^{5}}{5 h^{2}} + x^{4} \left (\frac {b f^{2}}{4 h^{2}} - \frac {c f^{2} g}{2 h^{3}}\right ) + x^{3} \left (\frac {a f^{2}}{3 h^{2}} - \frac {2 b f^{2} g}{3 h^{3}} + \frac {2 c d f}{3 h^{2}} + \frac {c f^{2} g^{2}}{h^{4}}\right ) + x^{2} \left (- \frac {a f^{2} g}{h^{3}} + \frac {b d f}{h^{2}} + \frac {3 b f^{2} g^{2}}{2 h^{4}} - \frac {2 c d f g}{h^{3}} - \frac {2 c f^{2} g^{3}}{h^{5}}\right ) + x \left (\frac {2 a d f}{h^{2}} + \frac {3 a f^{2} g^{2}}{h^{4}} - \frac {4 b d f g}{h^{3}} - \frac {4 b f^{2} g^{3}}{h^{5}} + \frac {c d^{2}}{h^{2}} + \frac {6 c d f g^{2}}{h^{4}} + \frac {5 c f^{2} g^{4}}{h^{6}}\right ) + \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}}{g h^{7} + h^{8} x} - \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 ) \log {\left (g + h x \right )}}{h^{7}} \] Input:
integrate((c*x**2+b*x+a)*(f*x**2+d)**2/(h*x+g)**2,x)
Output:
c*f**2*x**5/(5*h**2) + x**4*(b*f**2/(4*h**2) - c*f**2*g/(2*h**3)) + x**3*( a*f**2/(3*h**2) - 2*b*f**2*g/(3*h**3) + 2*c*d*f/(3*h**2) + c*f**2*g**2/h** 4) + x**2*(-a*f**2*g/h**3 + b*d*f/h**2 + 3*b*f**2*g**2/(2*h**4) - 2*c*d*f* g/h**3 - 2*c*f**2*g**3/h**5) + x*(2*a*d*f/h**2 + 3*a*f**2*g**2/h**4 - 4*b* d*f*g/h**3 - 4*b*f**2*g**3/h**5 + c*d**2/h**2 + 6*c*d*f*g**2/h**4 + 5*c*f* *2*g**4/h**6) + (-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)/(g*h**7 + h**8*x) - (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)*log(g + h*x)/h **7
Time = 0.04 (sec) , antiderivative size = 392, 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)^2} \, dx=-\frac {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}}{h^{8} x + g h^{7}} + \frac {12 \, c f^{2} h^{4} x^{5} - 15 \, {\left (2 \, c f^{2} g h^{3} - b f^{2} h^{4}\right )} x^{4} + 20 \, {\left (3 \, c f^{2} g^{2} h^{2} - 2 \, b f^{2} g h^{3} + {\left (2 \, c d f + a f^{2}\right )} h^{4}\right )} x^{3} - 30 \, {\left (4 \, c f^{2} g^{3} h - 3 \, b f^{2} g^{2} h^{2} - 2 \, b d f h^{4} + 2 \, {\left (2 \, c d f + a f^{2}\right )} g h^{3}\right )} x^{2} + 60 \, {\left (5 \, c f^{2} g^{4} - 4 \, b f^{2} g^{3} h - 4 \, b d f g h^{3} + 3 \, {\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 )} x}{60 \, h^{6}} - \frac {{\left (6 \, c f^{2} g^{5} - 5 \, b f^{2} g^{4} h - 6 \, b d f g^{2} h^{3} - b d^{2} h^{5} + 4 \, {\left (2 \, c d f + a f^{2}\right )} g^{3} h^{2} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} g 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)^2,x, algorithm="maxima")
Output:
-(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)/(h^8*x + g*h^7) + 1/6 0*(12*c*f^2*h^4*x^5 - 15*(2*c*f^2*g*h^3 - b*f^2*h^4)*x^4 + 20*(3*c*f^2*g^2 *h^2 - 2*b*f^2*g*h^3 + (2*c*d*f + a*f^2)*h^4)*x^3 - 30*(4*c*f^2*g^3*h - 3* b*f^2*g^2*h^2 - 2*b*d*f*h^4 + 2*(2*c*d*f + a*f^2)*g*h^3)*x^2 + 60*(5*c*f^2 *g^4 - 4*b*f^2*g^3*h - 4*b*d*f*g*h^3 + 3*(2*c*d*f + a*f^2)*g^2*h^2 + (c*d^ 2 + 2*a*d*f)*h^4)*x)/h^6 - (6*c*f^2*g^5 - 5*b*f^2*g^4*h - 6*b*d*f*g^2*h^3 - b*d^2*h^5 + 4*(2*c*d*f + a*f^2)*g^3*h^2 + 2*(c*d^2 + 2*a*d*f)*g*h^4)*log (h*x + g)/h^7
Time = 0.13 (sec) , antiderivative size = 520, normalized size of antiderivative = 1.74 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=\frac {{\left (12 \, c f^{2} - \frac {15 \, {\left (6 \, c f^{2} g h - b f^{2} h^{2}\right )}}{{\left (h x + g\right )} h} + \frac {20 \, {\left (15 \, c f^{2} g^{2} h^{2} - 5 \, b f^{2} g h^{3} + 2 \, c d f h^{4} + a f^{2} h^{4}\right )}}{{\left (h x + g\right )}^{2} h^{2}} - \frac {60 \, {\left (10 \, c f^{2} g^{3} h^{3} - 5 \, b f^{2} g^{2} h^{4} + 4 \, c d f g h^{5} + 2 \, a f^{2} g h^{5} - b d f h^{6}\right )}}{{\left (h x + g\right )}^{3} h^{3}} + \frac {60 \, {\left (15 \, c f^{2} g^{4} h^{4} - 10 \, b f^{2} g^{3} h^{5} + 12 \, c d f g^{2} h^{6} + 6 \, a f^{2} g^{2} h^{6} - 6 \, b d f g h^{7} + c d^{2} h^{8} + 2 \, a d f h^{8}\right )}}{{\left (h x + g\right )}^{4} h^{4}}\right )} {\left (h x + g\right )}^{5}}{60 \, h^{7}} + \frac {{\left (6 \, c f^{2} g^{5} - 5 \, b f^{2} g^{4} h + 8 \, c d f g^{3} h^{2} + 4 \, a f^{2} g^{3} h^{2} - 6 \, b d f g^{2} h^{3} + 2 \, c d^{2} g h^{4} + 4 \, a d f g h^{4} - b d^{2} h^{5}\right )} \log \left (\frac {{\left | h x + g \right |}}{{\left (h x + g\right )}^{2} {\left | h \right |}}\right )}{h^{7}} - \frac {\frac {c f^{2} g^{6} h^{5}}{h x + g} - \frac {b f^{2} g^{5} h^{6}}{h x + g} + \frac {2 \, c d f g^{4} h^{7}}{h x + g} + \frac {a f^{2} g^{4} h^{7}}{h x + g} - \frac {2 \, b d f g^{3} h^{8}}{h x + g} + \frac {c d^{2} g^{2} h^{9}}{h x + g} + \frac {2 \, a d f g^{2} h^{9}}{h x + g} - \frac {b d^{2} g h^{10}}{h x + g} + \frac {a d^{2} h^{11}}{h x + g}}{h^{12}} \] Input:
integrate((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^2,x, algorithm="giac")
Output:
1/60*(12*c*f^2 - 15*(6*c*f^2*g*h - b*f^2*h^2)/((h*x + g)*h) + 20*(15*c*f^2 *g^2*h^2 - 5*b*f^2*g*h^3 + 2*c*d*f*h^4 + a*f^2*h^4)/((h*x + g)^2*h^2) - 60 *(10*c*f^2*g^3*h^3 - 5*b*f^2*g^2*h^4 + 4*c*d*f*g*h^5 + 2*a*f^2*g*h^5 - b*d *f*h^6)/((h*x + g)^3*h^3) + 60*(15*c*f^2*g^4*h^4 - 10*b*f^2*g^3*h^5 + 12*c *d*f*g^2*h^6 + 6*a*f^2*g^2*h^6 - 6*b*d*f*g*h^7 + c*d^2*h^8 + 2*a*d*f*h^8)/ ((h*x + g)^4*h^4))*(h*x + g)^5/h^7 + (6*c*f^2*g^5 - 5*b*f^2*g^4*h + 8*c*d* f*g^3*h^2 + 4*a*f^2*g^3*h^2 - 6*b*d*f*g^2*h^3 + 2*c*d^2*g*h^4 + 4*a*d*f*g* h^4 - b*d^2*h^5)*log(abs(h*x + g)/((h*x + g)^2*abs(h)))/h^7 - (c*f^2*g^6*h ^5/(h*x + g) - b*f^2*g^5*h^6/(h*x + g) + 2*c*d*f*g^4*h^7/(h*x + g) + a*f^2 *g^4*h^7/(h*x + g) - 2*b*d*f*g^3*h^8/(h*x + g) + c*d^2*g^2*h^9/(h*x + g) + 2*a*d*f*g^2*h^9/(h*x + g) - b*d^2*g*h^10/(h*x + g) + a*d^2*h^11/(h*x + g) )/h^12
Time = 0.13 (sec) , antiderivative size = 575, normalized size of antiderivative = 1.93 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=x^4\,\left (\frac {b\,f^2}{4\,h^2}-\frac {c\,f^2\,g}{2\,h^3}\right )-x^3\,\left (\frac {2\,g\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{3\,h}-\frac {a\,f^2+2\,c\,d\,f}{3\,h^2}+\frac {c\,f^2\,g^2}{3\,h^4}\right )+x^2\,\left (\frac {g\,\left (\frac {2\,g\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{h}-\frac {a\,f^2+2\,c\,d\,f}{h^2}+\frac {c\,f^2\,g^2}{h^4}\right )}{h}-\frac {g^2\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{2\,h^2}+\frac {b\,d\,f}{h^2}\right )+x\,\left (\frac {c\,d^2+2\,a\,f\,d}{h^2}-\frac {2\,g\,\left (\frac {2\,g\,\left (\frac {2\,g\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{h}-\frac {a\,f^2+2\,c\,d\,f}{h^2}+\frac {c\,f^2\,g^2}{h^4}\right )}{h}-\frac {g^2\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{h^2}+\frac {2\,b\,d\,f}{h^2}\right )}{h}+\frac {g^2\,\left (\frac {2\,g\,\left (\frac {b\,f^2}{h^2}-\frac {2\,c\,f^2\,g}{h^3}\right )}{h}-\frac {a\,f^2+2\,c\,d\,f}{h^2}+\frac {c\,f^2\,g^2}{h^4}\right )}{h^2}\right )-\frac {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}{h\,\left (x\,h^7+g\,h^6\right )}-\frac {\ln \left (g+h\,x\right )\,\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 )}{h^7}+\frac {c\,f^2\,x^5}{5\,h^2} \] Input:
int(((d + f*x^2)^2*(a + b*x + c*x^2))/(g + h*x)^2,x)
Output:
x^4*((b*f^2)/(4*h^2) - (c*f^2*g)/(2*h^3)) - x^3*((2*g*((b*f^2)/h^2 - (2*c* f^2*g)/h^3))/(3*h) - (a*f^2 + 2*c*d*f)/(3*h^2) + (c*f^2*g^2)/(3*h^4)) + x^ 2*((g*((2*g*((b*f^2)/h^2 - (2*c*f^2*g)/h^3))/h - (a*f^2 + 2*c*d*f)/h^2 + ( c*f^2*g^2)/h^4))/h - (g^2*((b*f^2)/h^2 - (2*c*f^2*g)/h^3))/(2*h^2) + (b*d* f)/h^2) + x*((c*d^2 + 2*a*d*f)/h^2 - (2*g*((2*g*((2*g*((b*f^2)/h^2 - (2*c* f^2*g)/h^3))/h - (a*f^2 + 2*c*d*f)/h^2 + (c*f^2*g^2)/h^4))/h - (g^2*((b*f^ 2)/h^2 - (2*c*f^2*g)/h^3))/h^2 + (2*b*d*f)/h^2))/h + (g^2*((2*g*((b*f^2)/h ^2 - (2*c*f^2*g)/h^3))/h - (a*f^2 + 2*c*d*f)/h^2 + (c*f^2*g^2)/h^4))/h^2) - (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*(g*h^ 6 + h^7*x)) - (log(g + h*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))/h^7 + (c*f^2*x^5)/(5*h^2)
Time = 0.16 (sec) , antiderivative size = 669, normalized size of antiderivative = 2.24 \[ \int \frac {\left (a+b x+c x^2\right ) \left (d+f x^2\right )^2}{(g+h x)^2} \, dx=\frac {-240 \,\mathrm {log}\left (h x +g \right ) a \,f^{2} g^{5} h^{2}+60 \,\mathrm {log}\left (h x +g \right ) b \,d^{2} g^{2} h^{5}+300 \,\mathrm {log}\left (h x +g \right ) b \,f^{2} g^{6} h -120 \,\mathrm {log}\left (h x +g \right ) c \,d^{2} g^{3} h^{4}+240 a \,f^{2} g^{4} h^{3} x +120 a \,f^{2} g^{3} h^{4} x^{2}-40 a \,f^{2} g^{2} h^{5} x^{3}+20 a \,f^{2} g \,h^{6} x^{4}-60 b \,d^{2} g \,h^{6} x -300 b \,f^{2} g^{5} h^{2} x -150 b \,f^{2} g^{4} h^{3} x^{2}+50 b \,f^{2} g^{3} h^{4} x^{3}-25 b \,f^{2} g^{2} h^{5} x^{4}+15 b \,f^{2} g \,h^{6} x^{5}+120 c \,d^{2} g^{2} h^{5} x +60 c \,d^{2} g \,h^{6} x^{2}+360 c \,f^{2} g^{6} h x -240 \,\mathrm {log}\left (h x +g \right ) a d f \,g^{2} h^{5} x +360 \,\mathrm {log}\left (h x +g \right ) b d f \,g^{3} h^{4} x -480 \,\mathrm {log}\left (h x +g \right ) c d f \,g^{4} h^{3} x +60 a \,d^{2} h^{7} x -360 \,\mathrm {log}\left (h x +g \right ) c \,f^{2} g^{7}-240 \,\mathrm {log}\left (h x +g \right ) a d f \,g^{3} h^{4}-240 \,\mathrm {log}\left (h x +g \right ) a \,f^{2} g^{4} h^{3} x +60 \,\mathrm {log}\left (h x +g \right ) b \,d^{2} g \,h^{6} x +360 \,\mathrm {log}\left (h x +g \right ) b d f \,g^{4} h^{3}+300 \,\mathrm {log}\left (h x +g \right ) b \,f^{2} g^{5} h^{2} x -120 \,\mathrm {log}\left (h x +g \right ) c \,d^{2} g^{2} h^{5} x -480 \,\mathrm {log}\left (h x +g \right ) c d f \,g^{5} h^{2}-360 \,\mathrm {log}\left (h x +g \right ) c \,f^{2} g^{6} h x +240 a d f \,g^{2} h^{5} x +120 a d f g \,h^{6} x^{2}-360 b d f \,g^{3} h^{4} x -180 b d f \,g^{2} h^{5} x^{2}+60 b d f g \,h^{6} x^{3}+480 c d f \,g^{4} h^{3} x +240 c d f \,g^{3} h^{4} x^{2}-80 c d f \,g^{2} h^{5} x^{3}+40 c d f g \,h^{6} x^{4}+180 c \,f^{2} g^{5} h^{2} x^{2}-60 c \,f^{2} g^{4} h^{3} x^{3}+30 c \,f^{2} g^{3} h^{4} x^{4}-18 c \,f^{2} g^{2} h^{5} x^{5}+12 c \,f^{2} g \,h^{6} x^{6}}{60 g \,h^{7} \left (h x +g \right )} \] Input:
int((c*x^2+b*x+a)*(f*x^2+d)^2/(h*x+g)^2,x)
Output:
( - 240*log(g + h*x)*a*d*f*g**3*h**4 - 240*log(g + h*x)*a*d*f*g**2*h**5*x - 240*log(g + h*x)*a*f**2*g**5*h**2 - 240*log(g + h*x)*a*f**2*g**4*h**3*x + 60*log(g + h*x)*b*d**2*g**2*h**5 + 60*log(g + h*x)*b*d**2*g*h**6*x + 360 *log(g + h*x)*b*d*f*g**4*h**3 + 360*log(g + h*x)*b*d*f*g**3*h**4*x + 300*l og(g + h*x)*b*f**2*g**6*h + 300*log(g + h*x)*b*f**2*g**5*h**2*x - 120*log( g + h*x)*c*d**2*g**3*h**4 - 120*log(g + h*x)*c*d**2*g**2*h**5*x - 480*log( g + h*x)*c*d*f*g**5*h**2 - 480*log(g + h*x)*c*d*f*g**4*h**3*x - 360*log(g + h*x)*c*f**2*g**7 - 360*log(g + h*x)*c*f**2*g**6*h*x + 60*a*d**2*h**7*x + 240*a*d*f*g**2*h**5*x + 120*a*d*f*g*h**6*x**2 + 240*a*f**2*g**4*h**3*x + 120*a*f**2*g**3*h**4*x**2 - 40*a*f**2*g**2*h**5*x**3 + 20*a*f**2*g*h**6*x* *4 - 60*b*d**2*g*h**6*x - 360*b*d*f*g**3*h**4*x - 180*b*d*f*g**2*h**5*x**2 + 60*b*d*f*g*h**6*x**3 - 300*b*f**2*g**5*h**2*x - 150*b*f**2*g**4*h**3*x* *2 + 50*b*f**2*g**3*h**4*x**3 - 25*b*f**2*g**2*h**5*x**4 + 15*b*f**2*g*h** 6*x**5 + 120*c*d**2*g**2*h**5*x + 60*c*d**2*g*h**6*x**2 + 480*c*d*f*g**4*h **3*x + 240*c*d*f*g**3*h**4*x**2 - 80*c*d*f*g**2*h**5*x**3 + 40*c*d*f*g*h* *6*x**4 + 360*c*f**2*g**6*h*x + 180*c*f**2*g**5*h**2*x**2 - 60*c*f**2*g**4 *h**3*x**3 + 30*c*f**2*g**3*h**4*x**4 - 18*c*f**2*g**2*h**5*x**5 + 12*c*f* *2*g*h**6*x**6)/(60*g*h**7*(g + h*x))