Order of rational function on projective curve It is known that any meromorphic function $f$ on projective plane curve $C=Z(P)\subset\mathbb{P}^{2}$ is rational, i.e. 
$$
f([x:y:z])=\frac{Q(x,y,z)}{R(x,y,z)}
$$
for some homogeneous polynomial of same degree $m$ and $P\nmid Q$.
If $p$ is a point on $C$, then order of $f$ at $p$ is given by
$$
\mathrm{ord}_{p}(f)=I_{p}(P, Q)-I_{p}(P, R)=I_{p}(C, Z(Q))-I_{p}(C, Z(R)).
$$
where $I_{p}(C, D)$ is local multiplicity of curves $C$ and $D$ at $p$. 
Intuitively, I think this statement is true but I can't prove this. (I really hope this is true.) How to prove this? Or... are there any counterexamples? Thanks in advance. 
 A: I found a proof with my friend, so I'll introduce our proof.
We will follow the proof of the theorem 3.22 in Kirwan's "Complex Algebraic curves". 
Assume $p=[0:0:1]$ and $\frac{\partial P}{\partial x}(0, 0, 1)\neq 0$. 
By implicit function thoerem for complex polynomials, there is a holomorphic function $\lambda_{1}:U\to V$ where $U$ and $V$ are open neighborhoods of $0$ in $\mathbb{C}$ s.t. $\lambda_{1}(0)=0$ and for $(x, y)\in U\times V$, $P(x, y, 1)=0$ iff $x=\lambda_{1}(y)$. 
Moreover, $$P(x, y, 1)=(x-\lambda_{1}(y))l(x, y)$$
where $l(x, y)$ is a polynomial in $x$ whose coefficients are holomorphic functions on $y$.
If we assume  $P(1, 0, 0)=1$, then $$l(x, y)=\prod_{i=2}^{n}(x-\lambda_{i}(y))$$
where $\lambda_{1}(y), \dots, \lambda_{n}(y)$ are the roots of $P(x, y, 1)$ regarded as a polynomial in $x$ with $y$ fixed. 
Similarly if $U$ and $V$ are chosen small enough there is a holomorphic function $\mu_{1}:U\to V$ s.t. $\mu_{1}(0)=0$ and we can write 
\begin{align*}
Q(x, y, 1)=(x-\mu_{1}(y))m(x, y) \\
R(x, y, 1)=(x-\eta_{1}(y))k(x, y)
\end{align*}
where 
\begin{align*}
m(x, y)=\prod_{i=2}^{m}(x-\mu_{i}(y)) \\
k(x, y)=\prod_{i=2}^{m}(x-\eta_{i}(y))
\end{align*}
is a polynomial in $x$ whose coefficients are holomorphic functions of $y$. 
Then the tangent lines to $C$, $D=Z(Q)$ and $E=Z(R)$ at $p=[0:0:1]$ are defined by the equations 
$$
x=\lambda_{1}'(0)y, \quad x=\mu_{1}'(0)y, \quad x=\eta_{1}'(0)y
$$ 
If $y\in U$ then 
\begin{align*}
\mathcal{R}_{P, Q}(y, 1)=(\mu_{1}(y)-\lambda_{1}(y))S(y) \\
\mathcal{R}_{P, R}(y, 1)=(\eta_{1}(y)-\lambda_{1}(y))T(y)
\end{align*}
where
\begin{align*}
S(y)=\prod_{(i, j)\neq (1, 1)}(\mu_{i}(y)-\lambda_{i}(y)) \\
T(y)=\prod_{(i, j)\neq (1, 1)}(\eta_{i}(y)-\lambda_{i}(y))
\end{align*}
(Here $\mathcal{R}_{P, Q}$ is resultant of two polynomials $P$ and $Q$.) 
Since $\lambda_{1}(0)=0=\mu_{1}(0)$ we obtain on differentiating above equation that 
$$
\frac{\partial \mathcal{R}_{P, Q}}{\partial y}(0, 1)=(\mu_{1}'(0)-\lambda_{1}'(0))S(0)
$$
So $I_{p}(C, D)>1$ iff $\lambda_{1}'(0)-\mu_{1}'(0)$. 
Similarly, we can show that $I_{p}(C, D)=e$ iff $$\lambda_{1}'(0)-\mu_{1}'(0)=\cdots=\lambda_{1}^{(e-1)}(0)-\mu_{1}^{(e-1)}(0)=0, \quad \lambda_{1}^{(e)}(0)-\mu_{1}^{(e)}(0)\neq 0$$
inductively by differentiating the equation repeatedly. Same thing holds for $I_{p}(C, E)$ and $\lambda_{1}^{(j)}(0)-\eta_{1}^{(j)}(0)$. 
Since local chart of $P$ near $p$ is given by $\phi:[\lambda_{1}(w):w:1]\mapsto w$, the function $f$ can be written as 
$$
f\circ\phi^{-1}(w)=\frac{Q(\lambda_{1}(w), w, 1)}{R(\lambda_{1}(w), w, 1)}=\frac{(\lambda_{1}(w)-\mu_{1}(w))m(\lambda_{1}(w), w)}{(\lambda_{1}(w)-\eta_{1}(w))k(\lambda_{1}(w), w)}
$$
By previous observation, $ord_{0}(\lambda_{1}(w)-\mu_{1}(w))=I_{p}(C, D)$ and $ord_{0}(\lambda_{1}(w)-\eta_{1}(w))=I_{p}(C, E)$. 
By differentiating the equation $Q(x, y, 1)=(x-\mu_{1}(y))m(x, y)$ w.r.t. $x$, we have 
$$
\frac{\partial Q}{\partial x}(\lambda_{1}(w), w, 1)=m(\lambda_{1}(w), w)+(\lambda_{1}(w)-\mu_{1}(w))\frac{\partial m}{\partial x}(\lambda_{1}(w), w)
$$
and $m(0, 0)=\frac{\partial Q}{\partial x}(0, 0, 1)\neq 0$, so $m(\lambda_{1}(w), w)$ is nonvanishing near $w=0$. Similarly, $k(\lambda_{1}(w), w)\neq 0$ near $w=0$, so
$$
ord_{p}f=ord_{0}(f\circ\phi^{-1}) =I_{p}(C, D)-I_{p}(C, E).
$$
