Missing critical value with distance formula.

2017-12-03 03:07:35

Not sure why the second solution misses the critical value at y=1 (x=0).

Find the minimum distance between $y=x^2+1$ and the point $(0,2)$.

Solution 1:

$d=\sqrt{(x-x_0)^2+(y-y_0)^2}$

$d=\sqrt{(x-0)^2+((x^2+1)-2)^2}$

$d=\sqrt{x^2+(x^2-1)^2}$

$d=\sqrt{x^2+x^4-2x^2+1}$

$d=\sqrt{x^4-x^2+1}$

$d'=\dfrac{4x^3-2x}{2\sqrt{x^4-x^2+1}}$

$d'=\dfrac{2x^3-x}{\sqrt{x^4-x^2+1}}$

$d'=0\rightarrow 2x^3-x=x(2x^2-1)\rightarrow x=0,\pm\dfrac{1}{\sqrt{2}}$

Solution 2:

$d=\sqrt{(x-x_0)^2+(y-y_0)^2}$

$d=\sqrt{(x)^2+(y-2)^2}$

$d=\sqrt{y-1+(y-2)^2}$

$d=\sqrt{y-1+y^2-4y+4}$

$d=\sqrt{y^2-3y-3}$

$d'=\dfrac{2y-3}{2\sqrt{y^2-3y-3}}$

$d'=0\rightarrow 2y-3=0\rightarrow y=\dfrac{3}{2}\rightarrow x=\pm\dfrac{1}{\sqrt{2}}.$