I'm struggling to calculate a divisor of a function $f$. I have tried to follow the examples but I feel like I'm not understanding the steps. For example, when do we divide by a variable or substitute, which affine chart do we work in? Should we work in multiple and sum together? Which points should we use and when? For example how would I go about finding $div(x/z)$ for $C=V(y^2z − x(x − z)(x − 2z))\subset \mathbb{P}^2$.
I have done a few examples but I do not have a solid set of steps to follow when doing it, it felt like lucky guesswork. If anyone could give a step by step process (if there is one) that would be most appreciated. Thanks in advance.