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.