Curvature of planar implicit curves

Let $(x_0,y_0)$ be a point of the curve $\gamma$ defined by $f(x,y)=0$, and let $s\mapsto(x(s),y(s))$ with $(x(0),y(0))=(x_0,y_0)$ be the parametric representation of $\gamma$ by arc length. Note that the sense of direction of $\gamma$ is not determined a priori, whence its curvature $\kappa$ is only determined up to sign.

From $f\bigl(x(s),y(s)\bigr)\equiv 0$ we get $f_x\dot x+ f_y\dot y\equiv 0$, and as $\dot x^2 +\dot y^2\equiv 1$ we see that (up to sign) $$\dot x={f_y\over\sigma},\quad \dot y=-{f_x\over\sigma}\qquad \left(\sigma:=\sqrt{f_x^2 + f_y^2}>0\right).\qquad(*)$$

To compute the curvature $\kappa$ we have to look at the polar angle of the tangent vector $(\dot x,\dot y)$, i.e., at $$\theta:=\arg(\dot x,\dot y)=\arg(f_y, -f_x).$$ The chain rule gives $$\kappa=\dot\theta={d\over ds}\arg(f_y,-f_x)=\nabla\arg(f_y,-f_x)\bullet\left({d\over ds}(f_y),{d\over ds} (-f_x)\right),$$ and using the formula $\nabla\arg(u,v)=\left({-v\over u^2+v^2}, {u\over u^2+v^2}\right)$ we obtain $$\kappa=\left({f_x\over\sigma^2},{f_y\over\sigma^2}\right)\bullet(f_{yx}\dot x+f_{yy}\dot y,\ -f_{xx}\dot x-f_{xy}\dot y)={-f_y^2 f_{xx}+2f_xf_yf_{xy}-f_x^2f_{yy}\over\sigma^3} $$ where we have used (*) and all partial derivatives of $f$ are to be evaluated at $(x_0,y_0)$.


Apply the formula $$\frac{d}{ds} = \frac{1}{|\nabla f|}\left(f_y \frac{\partial}{\partial x} - f_x \frac{\partial}{\partial y} \right)$$ to the very right hand side of $$\kappa = \left| \frac{dT}{ds} \right| = \left|\frac{d}{ds} \left(\frac{dx}{ds}, \frac{dy}{ds} \right)\right| = \left| \frac{d}{ds} \frac{(f_y, -f_x)^T}{\sqrt{f_x^2 + f_y^2}} \right| = \left| \frac{d}{ds}\left( \frac{f_y}{\sqrt{f_x^2 + f_y^2}}, \frac{-f_x}{\sqrt{f_x^2 + f_y^2}} \right)^T \right|$$ So: $$\frac{d}{ds}\left( \frac{f_y}{\sqrt{f_x^2 + f_y^2}} \right) = \frac{1}{|\nabla f|} \left[f_y \frac{\partial}{\partial x}\left(\frac{f_y}{\sqrt{f_x^2 + f_y^2}}\right) - f_x \frac{\partial}{\partial y}\left(\frac{f_y}{\sqrt{f_x^2 + f_y^2}}\right) \right]$$ and $$\frac{d}{ds}\left( \frac{-f_x}{\sqrt{f_x^2 + f_y^2}} \right) = \frac{1}{|\nabla f|} \left[f_y \frac{\partial}{\partial x}\left(\frac{-f_x}{\sqrt{f_x^2 + f_y^2}}\right) - f_x \frac{\partial}{\partial y}\left(\frac{-f_x}{\sqrt{f_x^2 + f_y^2}}\right) \right],$$ and I hope you don't mind if I leave the rest of the details to you.

Update: Yes, you're right that you need to use the quotient rule, and your calculations above are correct.

[18th.Dec.2019] There was a clerical error in the LaTeX code.