Take a parametrized curve $(x, f(x))$ in $\mathbb{R}^2$.
Assume that at $0$ the map $x \mapsto f(x)$ assumes a local maximum and that $f(x)$ is symmetric about $0$ (I add this just for the sake of simplicity) and $f(0)>0$.
Now, let $d(x)$ be minimal distance of the point $(x,0)$ from our curve. In an article I am reading the authors claim the formula $$\partial_x^2 d(x) = \frac{\kappa(p(x))}{1-\kappa(p(x))d(x)},$$ where $p(x)$ is the point in which the distance is obtained, i.e.: $d(x)=\| (x-p(x),-f(p(x)))\|$.
The formula should not hold for all $x$, but only in a neighborhood of $0$, assuming that $d(0) \leq \delta,$ for some small $\delta$.
The formula makes perfect sense to me, since by approximation through osculating circles one can imagine that some singularity occurs when $d(x)\geq\frac{1}{\kappa}.$ Still, I do not know how to show it, and I wonder whether there is a nice differential-geometric argument to see this.
My attempt so far, which leads to a wrong formula, is to simply differentiate the distance:
\begin{align*} \partial_x d(x) & = \frac{1}{2 d(x)} \partial_x [(x-p(x))^2 +f(p(x))^2 ] \\ & = \frac{(x-p(x))(1-p'(x))+ f(p(x))f'(p(x))p'(x)}{d(x)}\\ & = 0, \end{align*} the latter if evaluated in $x=0$, since we have $p(0)= f'(0)=0$. For the second derivative: \begin{align*} \partial_x^2 d(0) & = \frac{1}{2 d(0)} \partial_x^2 [(x-p(x))^2 +f(p(x))^2 ] \vert_{x=0} \\ & = \frac{(1-p'(0))^2+ f(0)f''(0)(p'(0))^2}{d(x)} \\ & = \kappa (0), \end{align*} since by symmetry (but it might be true in general) $p'(0)=1$. Of course, I don't see my error. Any help is appreciated!