Find the shortest distance of the point $(0, c)$ from the parabola $y=x^2$ where $0 \leq c\leq 5$.
The point on the parabola $(x,x^2)$.
$\mathscr{l}(x)=\sqrt{x^2+(y-c)^2}=\sqrt{x^2+(x^2-c)^2}\\\mathscr{l}(y)=\sqrt{y+(y-c)^2}$
If I follow the expression $\mathscr{l}(y)=0$ then its fine and i'll get $\mathscr{l}(y)$ is minimum at $y=\frac{2c-1}{2}$ and $\mathscr{l}_{min}=\frac{\sqrt{4c-1}}{2}$. $$ \frac{d\mathscr{l}(y)}{dy}=\frac{1+2(y-c)}{2\sqrt{y+(y-c)^2}}\\ \frac{d\mathscr{l}(y)}{dy}=0\implies y=\frac{2c-1}{2}\\ \mathscr{l}_{min}=\mathscr{l}(\frac{2c-1}{2})=\frac{\sqrt{4c-1}}{2} $$
My Attempt
But, if I consider $\mathscr{l}(x)$
$$\frac{d\mathscr{l}(x)}{dx}=\frac{2x+2(x^2-c).2x}{2\sqrt{x^2+(x^2-c)^2}}=\frac{x+2x(x^2-c)}{\sqrt{x^2+(x^2-c)^2}}=\frac{x\big[1+2(x^2-c)\big]}{\sqrt{x^2+(x^2-c)^2}} $$ $$ \mathscr{l}'(x)=0\implies x\big[1+2(x^2-c)\big]=0\\ \implies x=0 \text{ or } x^2=\frac{2c-1}{2}\\ \implies x=0 \text{ or } x=\sqrt{\frac{2c-1}{2}}\text{ as }x\geq 0\\ $$ How do I deal with the critical point $x=0$, and why do i not get this case if I use $\mathscr{l}(y)$ ?
Note: I have checked a similar problem link which does not completely address my post here.
To avoid confusion, I use $\ell$ to denote the distance. So, $\ell=\sqrt{x^2+(x^2-c)^2}=\sqrt{y+(y-c)^2}$.
$$\frac{d\ell}{dx}=\frac{d\ell}{dy}\cdot\frac{dy}{dx}=2x\frac{d\ell}{dy}$$
$\displaystyle \frac{d\ell}{dx}=0$ if and only if $\displaystyle \frac{d\ell}{dy}=0$ or $x=0$.
That's why we have one more critical point when differentiating w.r.t. $x$.
$$\frac{d\ell}{dx}=\frac{x\big[2x^2-(2c-1))\big]}{\sqrt{x^2+(x^2-c)^2}}$$
If $c>0.5$, $\displaystyle x=\pm\sqrt{\frac{2c-1}{2}}$ are local minimum points and $x=0$ is a local maximum point by the first derivative test.
If $0\le c\le 0.5$, $x=0$ is the only critical point which is a local minimum point by the first derivative test.
Note: When $0\le c<0.5$, $\displaystyle \frac{d\ell}{dy}>0$ for all $y\ge0$ and hence $\ell$ attains its least value when $y=0$.
Alternatively, we can use
$$\ell=\sqrt{x^4-(2c-1)x^2+c^2}=\sqrt{\left(x^2-\frac{2c-1}{2}\right)^2+\frac{4c-1}{4}}$$
If $c>0.5$, $\ell$ is the least if $\displaystyle x^2=\frac{2c-1}{2}$.
If $0\le c\le 0.5$, $\displaystyle \frac{2c-1}{2}\le0$ and $\ell$ is the least if $\displaystyle x=0$.