Here's an example problem from a book I'm reading now:
Find all polynomials $f(x,y,z)$ with real coefficients such that $f(a+\frac{1}{a}, b+\frac{1}{b},c+\frac{1}{c})=0$ whenever $abc=1$. So with a substitution, this polynomial is divisible by $x^2+y^2+z^2-xyz-4$, where $x=a+\frac{1}{a}, y=b+\frac{1}{b},z=c+\frac{1}{c}$. I was reading the solution and it said this: There are polynomials $g(x,y,z), h(y,z), k(y,z)$ with real coefficients such that $f(x,y,z)= (x^2+y^2+z^2-xyz-4)g(x,y,z)+xh(y,z)+k(y,z)$, which has gotten me a bit confused because I don't understand how you can write it like this. Is there some more advanced math here about long division of multivariate polynomials? Because I was expecting to solve this problem with just elementary techniques and after much searching online, I've been seeing a lot of things about Gröbner bases and whatnot. Thanks.
For the monomials $x^a y^b z^c$ you need to give them an ordering (e.g. compare $a$ first, if they are equal compare $b$, then $c$). The only thing to look out for is that there cannot be an infinite descending chain: E.g. if you order $x^n$ by the reverse order of $n$, then $x^1>x^2>x^3...$ would be infinite descending.
Now, just do as you would do in single variable polynomial division: look for the leading term (i.e. the monomial that is largest under the order you'v just chosen) of the original polynomial $p(x,y,z)$, and determine that you need to multiply $q(x,y,z)$ by a monomial $m=?x^?y^?z^?$, so that the leading term matches. You then subtract $p(x,y,z)-mq(x,y,z)$. Repeat this process, and add up all the $m$'s you've chosen to get the quotient $s(x,y,z)$. And what's left of $p$ becomes the remainder $r(x,y,z)$.
Exercise: Prove that this process terminates.