I'm looking for some general strategy to divide polynomials leaving no remainder after division using the canonical multivariable polynomial division algorithm where we divide some polynomial $f$ by a set of polynomials $(f_1,...,f_n)$ using some term ordering.
I've already done some exercises using brute force method and it can really take ages to compute a polynomial division leaving no remainder when the term ordering is free of choose.
In the following exercise I've already verified that I have a remainder when term ordering is $\le: X>Y $ - so clearly $(X^2+Y, X^2Y+1)$ is not a Gröbner basis for $I$.
Decide whether $f = X^3Y + X^3 + X^2Y^3-X^2Y+XY+X$ lies in the ideal $I=\langle X^2 + Y, X^2Y+1\rangle$. If so find $a_1, a_2 \in k[X,Y]$ such that $f = a_1f_1+a_2f_2$.
How could I do this exercise fast instead of wasting time doing division attempts with the canonical multivariable polynomial division algorithm that I've already studied and mastered several times.
Thanks for your advice.