Integrand size = 27, antiderivative size = 243 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=a d^2 g^2 x+\frac {1}{2} d^2 g (b g+2 a h) x^2+\frac {1}{3} d \left (c d g^2+2 a f g^2+2 b d g h+a d h^2\right ) x^3+\frac {1}{4} d \left (2 b f g^2+2 c d g h+4 a f g h+b d h^2\right ) x^4+\frac {1}{5} \left (c d \left (2 f g^2+d h^2\right )+f \left (a f g^2+4 b d g h+2 a d h^2\right )\right ) x^5+\frac {1}{6} f \left (b f g^2+4 c d g h+2 a f g h+2 b d h^2\right ) x^6+\frac {1}{7} f \left (f h (2 b g+a h)+c \left (f g^2+2 d h^2\right )\right ) x^7+\frac {1}{8} f^2 h (2 c g+b h) x^8+\frac {1}{9} c f^2 h^2 x^9 \] Output:
a*d^2*g^2*x+1/2*d^2*g*(2*a*h+b*g)*x^2+1/3*d*(a*d*h^2+2*a*f*g^2+2*b*d*g*h+c *d*g^2)*x^3+1/4*d*(4*a*f*g*h+b*d*h^2+2*b*f*g^2+2*c*d*g*h)*x^4+1/5*(c*d*(d* h^2+2*f*g^2)+f*(2*a*d*h^2+a*f*g^2+4*b*d*g*h))*x^5+1/6*f*(2*a*f*g*h+2*b*d*h ^2+b*f*g^2+4*c*d*g*h)*x^6+1/7*f*(f*h*(a*h+2*b*g)+c*(2*d*h^2+f*g^2))*x^7+1/ 8*f^2*h*(b*h+2*c*g)*x^8+1/9*c*f^2*h^2*x^9
Time = 0.16 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.01 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=a d^2 g^2 x+\frac {1}{2} d^2 g (b g+2 a h) x^2+\frac {1}{3} d \left (c d g^2+2 a f g^2+2 b d g h+a d h^2\right ) x^3+\frac {1}{4} d \left (2 b f g^2+2 c d g h+4 a f g h+b d h^2\right ) x^4+\frac {1}{5} \left (2 c d f g^2+a f^2 g^2+4 b d f g h+c d^2 h^2+2 a d f h^2\right ) x^5+\frac {1}{6} f \left (b f g^2+4 c d g h+2 a f g h+2 b d h^2\right ) x^6+\frac {1}{7} f \left (c f g^2+2 b f g h+2 c d h^2+a f h^2\right ) x^7+\frac {1}{8} f^2 h (2 c g+b h) x^8+\frac {1}{9} c f^2 h^2 x^9 \] Input:
Integrate[(g + h*x)^2*(a + b*x + c*x^2)*(d + f*x^2)^2,x]
Output:
a*d^2*g^2*x + (d^2*g*(b*g + 2*a*h)*x^2)/2 + (d*(c*d*g^2 + 2*a*f*g^2 + 2*b* d*g*h + a*d*h^2)*x^3)/3 + (d*(2*b*f*g^2 + 2*c*d*g*h + 4*a*f*g*h + b*d*h^2) *x^4)/4 + ((2*c*d*f*g^2 + a*f^2*g^2 + 4*b*d*f*g*h + c*d^2*h^2 + 2*a*d*f*h^ 2)*x^5)/5 + (f*(b*f*g^2 + 4*c*d*g*h + 2*a*f*g*h + 2*b*d*h^2)*x^6)/6 + (f*( c*f*g^2 + 2*b*f*g*h + 2*c*d*h^2 + a*f*h^2)*x^7)/7 + (f^2*h*(2*c*g + b*h)*x ^8)/8 + (c*f^2*h^2*x^9)/9
Time = 0.57 (sec) , antiderivative size = 218, normalized size of antiderivative = 0.90, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2017, 2341, 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 \left (d+f x^2\right )^2 (g+h x)^2 \left (a+b x+c x^2\right ) \, dx\) |
\(\Big \downarrow \) 2017 |
\(\displaystyle \int \left (f x^2+d\right )^2 \left ((g+h x)^2 \left (c x^2+b x+a\right )-\left (b g^2+2 a h g\right ) x\right )dx+\frac {g \left (d+f x^2\right )^3 (2 a h+b g)}{6 f}\) |
\(\Big \downarrow \) 2341 |
\(\displaystyle \int \left (c f^2 h^2 x^8+f^2 h (2 c g+b h) x^7+f \left (f h (2 b g+a h)+c \left (f g^2+2 d h^2\right )\right ) x^6+2 d f h (2 c g+b h) x^5+\left (c d \left (2 f g^2+d h^2\right )+f \left (a f g^2+4 b d h g+2 a d h^2\right )\right ) x^4+d^2 h (2 c g+b h) x^3+d \left (c d g^2+2 a f g^2+2 b d h g+a d h^2\right ) x^2+a d^2 g^2\right )dx+\frac {g \left (d+f x^2\right )^3 (2 a h+b g)}{6 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{7} f x^7 \left (f h (a h+2 b g)+c \left (2 d h^2+f g^2\right )\right )+\frac {1}{5} x^5 \left (f \left (2 a d h^2+a f g^2+4 b d g h\right )+c d \left (d h^2+2 f g^2\right )\right )+\frac {1}{3} d x^3 \left (a d h^2+2 a f g^2+2 b d g h+c d g^2\right )+\frac {g \left (d+f x^2\right )^3 (2 a h+b g)}{6 f}+a d^2 g^2 x+\frac {1}{4} d^2 h x^4 (b h+2 c g)+\frac {1}{3} d f h x^6 (b h+2 c g)+\frac {1}{8} f^2 h x^8 (b h+2 c g)+\frac {1}{9} c f^2 h^2 x^9\) |
Input:
Int[(g + h*x)^2*(a + b*x + c*x^2)*(d + f*x^2)^2,x]
Output:
a*d^2*g^2*x + (d*(c*d*g^2 + 2*a*f*g^2 + 2*b*d*g*h + a*d*h^2)*x^3)/3 + (d^2 *h*(2*c*g + b*h)*x^4)/4 + ((c*d*(2*f*g^2 + d*h^2) + f*(a*f*g^2 + 4*b*d*g*h + 2*a*d*h^2))*x^5)/5 + (d*f*h*(2*c*g + b*h)*x^6)/3 + (f*(f*h*(2*b*g + a*h ) + c*(f*g^2 + 2*d*h^2))*x^7)/7 + (f^2*h*(2*c*g + b*h)*x^8)/8 + (c*f^2*h^2 *x^9)/9 + (g*(b*g + 2*a*h)*(d + f*x^2)^3)/(6*f)
Int[(Px_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[Coeff[Px, x, n - 1]*((a + b*x^n)^(p + 1)/(b*n*(p + 1))), x] + Int[(Px - Coeff[Px, x, n - 1] *x^(n - 1))*(a + b*x^n)^p, x] /; FreeQ[{a, b}, x] && PolyQ[Px, x] && IGtQ[p , 1] && IGtQ[n, 1] && NeQ[Coeff[Px, x, n - 1], 0] && NeQ[Px, Coeff[Px, x, n - 1]*x^(n - 1)] && !MatchQ[Px, (Qx_.)*((c_) + (d_.)*x^(m_))^(q_) /; FreeQ [{c, d}, x] && PolyQ[Qx, x] && IGtQ[q, 1] && IGtQ[m, 1] && NeQ[Coeff[Qx*(a + b*x^n)^p, x, m - 1], 0] && GtQ[m*q, n*p]]
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq* (a + b*x^2)^p, x], x] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Time = 0.90 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.00
method | result | size |
default | \(\frac {c \,f^{2} h^{2} x^{9}}{9}+\frac {\left (h^{2} b +2 g h c \right ) f^{2} x^{8}}{8}+\frac {\left (\left (h^{2} a +2 g h b +g^{2} c \right ) f^{2}+2 h^{2} c d f \right ) x^{7}}{7}+\frac {\left (\left (2 g h a +b \,g^{2}\right ) f^{2}+2 \left (h^{2} b +2 g h c \right ) d f \right ) x^{6}}{6}+\frac {\left (a \,g^{2} f^{2}+2 \left (h^{2} a +2 g h b +g^{2} c \right ) d f +h^{2} c \,d^{2}\right ) x^{5}}{5}+\frac {\left (2 \left (2 g h a +b \,g^{2}\right ) d f +\left (h^{2} b +2 g h c \right ) d^{2}\right ) x^{4}}{4}+\frac {\left (2 a f \,g^{2} d +\left (h^{2} a +2 g h b +g^{2} c \right ) d^{2}\right ) x^{3}}{3}+\frac {\left (2 g h a +b \,g^{2}\right ) d^{2} x^{2}}{2}+a \,d^{2} g^{2} x\) | \(243\) |
norman | \(\frac {c \,f^{2} h^{2} x^{9}}{9}+\left (\frac {1}{8} b \,f^{2} h^{2}+\frac {1}{4} c \,f^{2} g h \right ) x^{8}+\left (\frac {1}{7} a \,f^{2} h^{2}+\frac {2}{7} b \,f^{2} g h +\frac {2}{7} h^{2} c d f +\frac {1}{7} c \,f^{2} g^{2}\right ) x^{7}+\left (\frac {1}{3} a \,f^{2} g h +\frac {1}{3} b d f \,h^{2}+\frac {1}{6} b \,f^{2} g^{2}+\frac {2}{3} c d f g h \right ) x^{6}+\left (\frac {2}{5} a d f \,h^{2}+\frac {1}{5} a \,g^{2} f^{2}+\frac {4}{5} b d f g h +\frac {1}{5} h^{2} c \,d^{2}+\frac {2}{5} c d f \,g^{2}\right ) x^{5}+\left (a d f g h +\frac {1}{4} b \,d^{2} h^{2}+\frac {1}{2} b d f \,g^{2}+\frac {1}{2} c \,d^{2} g h \right ) x^{4}+\left (\frac {1}{3} a \,d^{2} h^{2}+\frac {2}{3} a f \,g^{2} d +\frac {2}{3} b \,d^{2} g h +\frac {1}{3} c \,d^{2} g^{2}\right ) x^{3}+\left (a \,d^{2} g h +\frac {1}{2} b \,d^{2} g^{2}\right ) x^{2}+a \,d^{2} g^{2} x\) | \(263\) |
gosper | \(\frac {1}{4} x^{8} c \,f^{2} g h +\frac {2}{7} x^{7} b \,f^{2} g h +\frac {1}{6} x^{6} b \,f^{2} g^{2}+\frac {2}{3} x^{6} c d f g h +\frac {1}{3} x^{6} b d f \,h^{2}+\frac {1}{3} x^{6} a \,f^{2} g h +\frac {1}{3} x^{3} c \,d^{2} g^{2}+\frac {4}{5} x^{5} b d f g h +\frac {1}{2} x^{4} b d f \,g^{2}+\frac {1}{2} x^{4} c \,d^{2} g h +\frac {2}{5} x^{5} a d f \,h^{2}+\frac {2}{5} x^{5} c d f \,g^{2}+\frac {2}{3} x^{3} b \,d^{2} g h +x^{2} a \,d^{2} g h +\frac {2}{7} x^{7} h^{2} c d f +x^{4} a d f g h +\frac {2}{3} x^{3} a f \,g^{2} d +\frac {1}{7} x^{7} c \,f^{2} g^{2}+\frac {1}{4} x^{4} b \,d^{2} h^{2}+\frac {1}{3} x^{3} a \,d^{2} h^{2}+\frac {1}{5} x^{5} a \,g^{2} f^{2}+\frac {1}{9} c \,f^{2} h^{2} x^{9}+\frac {1}{8} x^{8} b \,f^{2} h^{2}+\frac {1}{7} x^{7} a \,f^{2} h^{2}+\frac {1}{2} x^{2} b \,d^{2} g^{2}+\frac {1}{5} x^{5} h^{2} c \,d^{2}+a \,d^{2} g^{2} x\) | \(303\) |
risch | \(\frac {1}{4} x^{8} c \,f^{2} g h +\frac {2}{7} x^{7} b \,f^{2} g h +\frac {1}{6} x^{6} b \,f^{2} g^{2}+\frac {2}{3} x^{6} c d f g h +\frac {1}{3} x^{6} b d f \,h^{2}+\frac {1}{3} x^{6} a \,f^{2} g h +\frac {1}{3} x^{3} c \,d^{2} g^{2}+\frac {4}{5} x^{5} b d f g h +\frac {1}{2} x^{4} b d f \,g^{2}+\frac {1}{2} x^{4} c \,d^{2} g h +\frac {2}{5} x^{5} a d f \,h^{2}+\frac {2}{5} x^{5} c d f \,g^{2}+\frac {2}{3} x^{3} b \,d^{2} g h +x^{2} a \,d^{2} g h +\frac {2}{7} x^{7} h^{2} c d f +x^{4} a d f g h +\frac {2}{3} x^{3} a f \,g^{2} d +\frac {1}{7} x^{7} c \,f^{2} g^{2}+\frac {1}{4} x^{4} b \,d^{2} h^{2}+\frac {1}{3} x^{3} a \,d^{2} h^{2}+\frac {1}{5} x^{5} a \,g^{2} f^{2}+\frac {1}{9} c \,f^{2} h^{2} x^{9}+\frac {1}{8} x^{8} b \,f^{2} h^{2}+\frac {1}{7} x^{7} a \,f^{2} h^{2}+\frac {1}{2} x^{2} b \,d^{2} g^{2}+\frac {1}{5} x^{5} h^{2} c \,d^{2}+a \,d^{2} g^{2} x\) | \(303\) |
parallelrisch | \(\frac {1}{4} x^{8} c \,f^{2} g h +\frac {2}{7} x^{7} b \,f^{2} g h +\frac {1}{6} x^{6} b \,f^{2} g^{2}+\frac {2}{3} x^{6} c d f g h +\frac {1}{3} x^{6} b d f \,h^{2}+\frac {1}{3} x^{6} a \,f^{2} g h +\frac {1}{3} x^{3} c \,d^{2} g^{2}+\frac {4}{5} x^{5} b d f g h +\frac {1}{2} x^{4} b d f \,g^{2}+\frac {1}{2} x^{4} c \,d^{2} g h +\frac {2}{5} x^{5} a d f \,h^{2}+\frac {2}{5} x^{5} c d f \,g^{2}+\frac {2}{3} x^{3} b \,d^{2} g h +x^{2} a \,d^{2} g h +\frac {2}{7} x^{7} h^{2} c d f +x^{4} a d f g h +\frac {2}{3} x^{3} a f \,g^{2} d +\frac {1}{7} x^{7} c \,f^{2} g^{2}+\frac {1}{4} x^{4} b \,d^{2} h^{2}+\frac {1}{3} x^{3} a \,d^{2} h^{2}+\frac {1}{5} x^{5} a \,g^{2} f^{2}+\frac {1}{9} c \,f^{2} h^{2} x^{9}+\frac {1}{8} x^{8} b \,f^{2} h^{2}+\frac {1}{7} x^{7} a \,f^{2} h^{2}+\frac {1}{2} x^{2} b \,d^{2} g^{2}+\frac {1}{5} x^{5} h^{2} c \,d^{2}+a \,d^{2} g^{2} x\) | \(303\) |
orering | \(\frac {x \left (280 h^{2} c \,f^{2} x^{8}+315 b \,f^{2} h^{2} x^{7}+630 c \,f^{2} g h \,x^{7}+360 a \,f^{2} h^{2} x^{6}+720 b \,f^{2} g h \,x^{6}+720 c d f \,h^{2} x^{6}+360 c \,f^{2} g^{2} x^{6}+840 a \,f^{2} g h \,x^{5}+840 b d f \,h^{2} x^{5}+420 b \,f^{2} g^{2} x^{5}+1680 c d f g h \,x^{5}+1008 a d f \,h^{2} x^{4}+504 a \,f^{2} g^{2} x^{4}+2016 b d f g h \,x^{4}+504 c \,d^{2} h^{2} x^{4}+1008 c d f \,g^{2} x^{4}+2520 a d f g h \,x^{3}+630 b \,d^{2} h^{2} x^{3}+1260 b d f \,g^{2} x^{3}+1260 c \,d^{2} g h \,x^{3}+840 a \,d^{2} h^{2} x^{2}+1680 a d f \,g^{2} x^{2}+1680 b \,d^{2} g h \,x^{2}+840 c \,d^{2} g^{2} x^{2}+2520 a \,d^{2} g h x +1260 b \,d^{2} g^{2} x +2520 a \,d^{2} g^{2}\right )}{2520}\) | \(304\) |
Input:
int((h*x+g)^2*(c*x^2+b*x+a)*(f*x^2+d)^2,x,method=_RETURNVERBOSE)
Output:
1/9*c*f^2*h^2*x^9+1/8*(b*h^2+2*c*g*h)*f^2*x^8+1/7*((a*h^2+2*b*g*h+c*g^2)*f ^2+2*h^2*c*d*f)*x^7+1/6*((2*a*g*h+b*g^2)*f^2+2*(b*h^2+2*c*g*h)*d*f)*x^6+1/ 5*(a*g^2*f^2+2*(a*h^2+2*b*g*h+c*g^2)*d*f+h^2*c*d^2)*x^5+1/4*(2*(2*a*g*h+b* g^2)*d*f+(b*h^2+2*c*g*h)*d^2)*x^4+1/3*(2*a*f*g^2*d+(a*h^2+2*b*g*h+c*g^2)*d ^2)*x^3+1/2*(2*a*g*h+b*g^2)*d^2*x^2+a*d^2*g^2*x
Time = 0.07 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.06 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=\frac {1}{9} \, c f^{2} h^{2} x^{9} + \frac {1}{8} \, {\left (2 \, c f^{2} g h + b f^{2} h^{2}\right )} x^{8} + \frac {1}{7} \, {\left (c f^{2} g^{2} + 2 \, b f^{2} g h + {\left (2 \, c d f + a f^{2}\right )} h^{2}\right )} x^{7} + \frac {1}{6} \, {\left (b f^{2} g^{2} + 2 \, b d f h^{2} + 2 \, {\left (2 \, c d f + a f^{2}\right )} g h\right )} x^{6} + a d^{2} g^{2} x + \frac {1}{5} \, {\left (4 \, b d f g h + {\left (2 \, c d f + a f^{2}\right )} g^{2} + {\left (c d^{2} + 2 \, a d f\right )} h^{2}\right )} x^{5} + \frac {1}{4} \, {\left (2 \, b d f g^{2} + b d^{2} h^{2} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} g h\right )} x^{4} + \frac {1}{3} \, {\left (2 \, b d^{2} g h + a d^{2} h^{2} + {\left (c d^{2} + 2 \, a d f\right )} g^{2}\right )} x^{3} + \frac {1}{2} \, {\left (b d^{2} g^{2} + 2 \, a d^{2} g h\right )} x^{2} \] Input:
integrate((h*x+g)^2*(c*x^2+b*x+a)*(f*x^2+d)^2,x, algorithm="fricas")
Output:
1/9*c*f^2*h^2*x^9 + 1/8*(2*c*f^2*g*h + b*f^2*h^2)*x^8 + 1/7*(c*f^2*g^2 + 2 *b*f^2*g*h + (2*c*d*f + a*f^2)*h^2)*x^7 + 1/6*(b*f^2*g^2 + 2*b*d*f*h^2 + 2 *(2*c*d*f + a*f^2)*g*h)*x^6 + a*d^2*g^2*x + 1/5*(4*b*d*f*g*h + (2*c*d*f + a*f^2)*g^2 + (c*d^2 + 2*a*d*f)*h^2)*x^5 + 1/4*(2*b*d*f*g^2 + b*d^2*h^2 + 2 *(c*d^2 + 2*a*d*f)*g*h)*x^4 + 1/3*(2*b*d^2*g*h + a*d^2*h^2 + (c*d^2 + 2*a* d*f)*g^2)*x^3 + 1/2*(b*d^2*g^2 + 2*a*d^2*g*h)*x^2
Time = 0.04 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.28 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=a d^{2} g^{2} x + \frac {c f^{2} h^{2} x^{9}}{9} + x^{8} \left (\frac {b f^{2} h^{2}}{8} + \frac {c f^{2} g h}{4}\right ) + x^{7} \left (\frac {a f^{2} h^{2}}{7} + \frac {2 b f^{2} g h}{7} + \frac {2 c d f h^{2}}{7} + \frac {c f^{2} g^{2}}{7}\right ) + x^{6} \left (\frac {a f^{2} g h}{3} + \frac {b d f h^{2}}{3} + \frac {b f^{2} g^{2}}{6} + \frac {2 c d f g h}{3}\right ) + x^{5} \cdot \left (\frac {2 a d f h^{2}}{5} + \frac {a f^{2} g^{2}}{5} + \frac {4 b d f g h}{5} + \frac {c d^{2} h^{2}}{5} + \frac {2 c d f g^{2}}{5}\right ) + x^{4} \left (a d f g h + \frac {b d^{2} h^{2}}{4} + \frac {b d f g^{2}}{2} + \frac {c d^{2} g h}{2}\right ) + x^{3} \left (\frac {a d^{2} h^{2}}{3} + \frac {2 a d f g^{2}}{3} + \frac {2 b d^{2} g h}{3} + \frac {c d^{2} g^{2}}{3}\right ) + x^{2} \left (a d^{2} g h + \frac {b d^{2} g^{2}}{2}\right ) \] Input:
integrate((h*x+g)**2*(c*x**2+b*x+a)*(f*x**2+d)**2,x)
Output:
a*d**2*g**2*x + c*f**2*h**2*x**9/9 + x**8*(b*f**2*h**2/8 + c*f**2*g*h/4) + x**7*(a*f**2*h**2/7 + 2*b*f**2*g*h/7 + 2*c*d*f*h**2/7 + c*f**2*g**2/7) + x**6*(a*f**2*g*h/3 + b*d*f*h**2/3 + b*f**2*g**2/6 + 2*c*d*f*g*h/3) + x**5* (2*a*d*f*h**2/5 + a*f**2*g**2/5 + 4*b*d*f*g*h/5 + c*d**2*h**2/5 + 2*c*d*f* g**2/5) + x**4*(a*d*f*g*h + b*d**2*h**2/4 + b*d*f*g**2/2 + c*d**2*g*h/2) + x**3*(a*d**2*h**2/3 + 2*a*d*f*g**2/3 + 2*b*d**2*g*h/3 + c*d**2*g**2/3) + x**2*(a*d**2*g*h + b*d**2*g**2/2)
Time = 0.03 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.06 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=\frac {1}{9} \, c f^{2} h^{2} x^{9} + \frac {1}{8} \, {\left (2 \, c f^{2} g h + b f^{2} h^{2}\right )} x^{8} + \frac {1}{7} \, {\left (c f^{2} g^{2} + 2 \, b f^{2} g h + {\left (2 \, c d f + a f^{2}\right )} h^{2}\right )} x^{7} + \frac {1}{6} \, {\left (b f^{2} g^{2} + 2 \, b d f h^{2} + 2 \, {\left (2 \, c d f + a f^{2}\right )} g h\right )} x^{6} + a d^{2} g^{2} x + \frac {1}{5} \, {\left (4 \, b d f g h + {\left (2 \, c d f + a f^{2}\right )} g^{2} + {\left (c d^{2} + 2 \, a d f\right )} h^{2}\right )} x^{5} + \frac {1}{4} \, {\left (2 \, b d f g^{2} + b d^{2} h^{2} + 2 \, {\left (c d^{2} + 2 \, a d f\right )} g h\right )} x^{4} + \frac {1}{3} \, {\left (2 \, b d^{2} g h + a d^{2} h^{2} + {\left (c d^{2} + 2 \, a d f\right )} g^{2}\right )} x^{3} + \frac {1}{2} \, {\left (b d^{2} g^{2} + 2 \, a d^{2} g h\right )} x^{2} \] Input:
integrate((h*x+g)^2*(c*x^2+b*x+a)*(f*x^2+d)^2,x, algorithm="maxima")
Output:
1/9*c*f^2*h^2*x^9 + 1/8*(2*c*f^2*g*h + b*f^2*h^2)*x^8 + 1/7*(c*f^2*g^2 + 2 *b*f^2*g*h + (2*c*d*f + a*f^2)*h^2)*x^7 + 1/6*(b*f^2*g^2 + 2*b*d*f*h^2 + 2 *(2*c*d*f + a*f^2)*g*h)*x^6 + a*d^2*g^2*x + 1/5*(4*b*d*f*g*h + (2*c*d*f + a*f^2)*g^2 + (c*d^2 + 2*a*d*f)*h^2)*x^5 + 1/4*(2*b*d*f*g^2 + b*d^2*h^2 + 2 *(c*d^2 + 2*a*d*f)*g*h)*x^4 + 1/3*(2*b*d^2*g*h + a*d^2*h^2 + (c*d^2 + 2*a* d*f)*g^2)*x^3 + 1/2*(b*d^2*g^2 + 2*a*d^2*g*h)*x^2
Time = 0.13 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.24 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=\frac {1}{9} \, c f^{2} h^{2} x^{9} + \frac {1}{4} \, c f^{2} g h x^{8} + \frac {1}{8} \, b f^{2} h^{2} x^{8} + \frac {1}{7} \, c f^{2} g^{2} x^{7} + \frac {2}{7} \, b f^{2} g h x^{7} + \frac {2}{7} \, c d f h^{2} x^{7} + \frac {1}{7} \, a f^{2} h^{2} x^{7} + \frac {1}{6} \, b f^{2} g^{2} x^{6} + \frac {2}{3} \, c d f g h x^{6} + \frac {1}{3} \, a f^{2} g h x^{6} + \frac {1}{3} \, b d f h^{2} x^{6} + \frac {2}{5} \, c d f g^{2} x^{5} + \frac {1}{5} \, a f^{2} g^{2} x^{5} + \frac {4}{5} \, b d f g h x^{5} + \frac {1}{5} \, c d^{2} h^{2} x^{5} + \frac {2}{5} \, a d f h^{2} x^{5} + \frac {1}{2} \, b d f g^{2} x^{4} + \frac {1}{2} \, c d^{2} g h x^{4} + a d f g h x^{4} + \frac {1}{4} \, b d^{2} h^{2} x^{4} + \frac {1}{3} \, c d^{2} g^{2} x^{3} + \frac {2}{3} \, a d f g^{2} x^{3} + \frac {2}{3} \, b d^{2} g h x^{3} + \frac {1}{3} \, a d^{2} h^{2} x^{3} + \frac {1}{2} \, b d^{2} g^{2} x^{2} + a d^{2} g h x^{2} + a d^{2} g^{2} x \] Input:
integrate((h*x+g)^2*(c*x^2+b*x+a)*(f*x^2+d)^2,x, algorithm="giac")
Output:
1/9*c*f^2*h^2*x^9 + 1/4*c*f^2*g*h*x^8 + 1/8*b*f^2*h^2*x^8 + 1/7*c*f^2*g^2* x^7 + 2/7*b*f^2*g*h*x^7 + 2/7*c*d*f*h^2*x^7 + 1/7*a*f^2*h^2*x^7 + 1/6*b*f^ 2*g^2*x^6 + 2/3*c*d*f*g*h*x^6 + 1/3*a*f^2*g*h*x^6 + 1/3*b*d*f*h^2*x^6 + 2/ 5*c*d*f*g^2*x^5 + 1/5*a*f^2*g^2*x^5 + 4/5*b*d*f*g*h*x^5 + 1/5*c*d^2*h^2*x^ 5 + 2/5*a*d*f*h^2*x^5 + 1/2*b*d*f*g^2*x^4 + 1/2*c*d^2*g*h*x^4 + a*d*f*g*h* x^4 + 1/4*b*d^2*h^2*x^4 + 1/3*c*d^2*g^2*x^3 + 2/3*a*d*f*g^2*x^3 + 2/3*b*d^ 2*g*h*x^3 + 1/3*a*d^2*h^2*x^3 + 1/2*b*d^2*g^2*x^2 + a*d^2*g*h*x^2 + a*d^2* g^2*x
Time = 0.13 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.00 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=x^5\,\left (\frac {c\,d^2\,h^2}{5}+\frac {2\,c\,d\,f\,g^2}{5}+\frac {4\,b\,d\,f\,g\,h}{5}+\frac {2\,a\,d\,f\,h^2}{5}+\frac {a\,f^2\,g^2}{5}\right )+x^3\,\left (\frac {c\,d^2\,g^2}{3}+\frac {2\,b\,d^2\,g\,h}{3}+\frac {a\,d^2\,h^2}{3}+\frac {2\,a\,f\,d\,g^2}{3}\right )+x^7\,\left (\frac {c\,f^2\,g^2}{7}+\frac {2\,b\,f^2\,g\,h}{7}+\frac {a\,f^2\,h^2}{7}+\frac {2\,c\,d\,f\,h^2}{7}\right )+\frac {d\,x^4\,\left (b\,d\,h^2+2\,b\,f\,g^2+4\,a\,f\,g\,h+2\,c\,d\,g\,h\right )}{4}+\frac {f\,x^6\,\left (2\,b\,d\,h^2+b\,f\,g^2+2\,a\,f\,g\,h+4\,c\,d\,g\,h\right )}{6}+\frac {d^2\,g\,x^2\,\left (2\,a\,h+b\,g\right )}{2}+\frac {f^2\,h\,x^8\,\left (b\,h+2\,c\,g\right )}{8}+\frac {c\,f^2\,h^2\,x^9}{9}+a\,d^2\,g^2\,x \] Input:
int((g + h*x)^2*(d + f*x^2)^2*(a + b*x + c*x^2),x)
Output:
x^5*((a*f^2*g^2)/5 + (c*d^2*h^2)/5 + (2*a*d*f*h^2)/5 + (2*c*d*f*g^2)/5 + ( 4*b*d*f*g*h)/5) + x^3*((a*d^2*h^2)/3 + (c*d^2*g^2)/3 + (2*a*d*f*g^2)/3 + ( 2*b*d^2*g*h)/3) + x^7*((a*f^2*h^2)/7 + (c*f^2*g^2)/7 + (2*c*d*f*h^2)/7 + ( 2*b*f^2*g*h)/7) + (d*x^4*(b*d*h^2 + 2*b*f*g^2 + 4*a*f*g*h + 2*c*d*g*h))/4 + (f*x^6*(2*b*d*h^2 + b*f*g^2 + 2*a*f*g*h + 4*c*d*g*h))/6 + (d^2*g*x^2*(2* a*h + b*g))/2 + (f^2*h*x^8*(b*h + 2*c*g))/8 + (c*f^2*h^2*x^9)/9 + a*d^2*g^ 2*x
Time = 0.16 (sec) , antiderivative size = 303, normalized size of antiderivative = 1.25 \[ \int (g+h x)^2 \left (a+b x+c x^2\right ) \left (d+f x^2\right )^2 \, dx=\frac {x \left (280 c \,f^{2} h^{2} x^{8}+315 b \,f^{2} h^{2} x^{7}+630 c \,f^{2} g h \,x^{7}+360 a \,f^{2} h^{2} x^{6}+720 b \,f^{2} g h \,x^{6}+720 c d f \,h^{2} x^{6}+360 c \,f^{2} g^{2} x^{6}+840 a \,f^{2} g h \,x^{5}+840 b d f \,h^{2} x^{5}+420 b \,f^{2} g^{2} x^{5}+1680 c d f g h \,x^{5}+1008 a d f \,h^{2} x^{4}+504 a \,f^{2} g^{2} x^{4}+2016 b d f g h \,x^{4}+504 c \,d^{2} h^{2} x^{4}+1008 c d f \,g^{2} x^{4}+2520 a d f g h \,x^{3}+630 b \,d^{2} h^{2} x^{3}+1260 b d f \,g^{2} x^{3}+1260 c \,d^{2} g h \,x^{3}+840 a \,d^{2} h^{2} x^{2}+1680 a d f \,g^{2} x^{2}+1680 b \,d^{2} g h \,x^{2}+840 c \,d^{2} g^{2} x^{2}+2520 a \,d^{2} g h x +1260 b \,d^{2} g^{2} x +2520 a \,d^{2} g^{2}\right )}{2520} \] Input:
int((h*x+g)^2*(c*x^2+b*x+a)*(f*x^2+d)^2,x)
Output:
(x*(2520*a*d**2*g**2 + 2520*a*d**2*g*h*x + 840*a*d**2*h**2*x**2 + 1680*a*d *f*g**2*x**2 + 2520*a*d*f*g*h*x**3 + 1008*a*d*f*h**2*x**4 + 504*a*f**2*g** 2*x**4 + 840*a*f**2*g*h*x**5 + 360*a*f**2*h**2*x**6 + 1260*b*d**2*g**2*x + 1680*b*d**2*g*h*x**2 + 630*b*d**2*h**2*x**3 + 1260*b*d*f*g**2*x**3 + 2016 *b*d*f*g*h*x**4 + 840*b*d*f*h**2*x**5 + 420*b*f**2*g**2*x**5 + 720*b*f**2* g*h*x**6 + 315*b*f**2*h**2*x**7 + 840*c*d**2*g**2*x**2 + 1260*c*d**2*g*h*x **3 + 504*c*d**2*h**2*x**4 + 1008*c*d*f*g**2*x**4 + 1680*c*d*f*g*h*x**5 + 720*c*d*f*h**2*x**6 + 360*c*f**2*g**2*x**6 + 630*c*f**2*g*h*x**7 + 280*c*f **2*h**2*x**8))/2520