If the polynomials have (degreef)≥(degreeg)({\hbox{degree}}\,f)\geq({\hbox{degree}}\,g), then we can use polynomial long division to write
where q(x)q(x) is a polynomial and r(x)r(x) is a polynomial with (degreer)<(degreeg)({\hbox{degree}}\,r)<({\hbox{degree}}\,g). (See MATH111, Thm. 7.1.10 for a proof.) It is easy to integrate the polynomial q(x).q(x).
For f(x)=x6+12x2+39x-44f(x)=x^{6}+12x^{2}+39x-44, g(x)=x3+x2+3x-5g(x)=x^{3}+x^{2}+3x-5 we have 𝑑𝑒𝑔𝑟𝑒𝑒f=6>𝑑𝑒𝑔𝑟𝑒𝑒g=3{\hbox{degree}}\,f=6>{\hbox{degree}}\,g=3. In this case we have