the length of the shortest path
Hello BuilderBoy!
\(y=2x-4\\\color{blue}P_1(0,0)\\ P(x,2x-4)\\ \color{blue}P_2(0,1)\)
\(L_{1,P}^2=x^2+y^2=x^2+(2x-4)^2\\ L_{P,2}^2=x^2+(1-y)^2=x^2+(1-2x+4)^2\\ L_{1,P}^2+L_{P,2}^2=x^2+(2x-4)^2+x^2+(5-2x)^2\\ \)
\(\frac{d(L_{1,P}^2+L_{P,2}^2)}{dx}=2x+2(2x-4)\cdot 2+2x+2(5-2x)\cdot (-2)=0\\ 4x+8x-16-20+8x=0\\ 20x=36\\ \color{blue}x_P=1.8\\ \color{blue}y_p=-0.4 \\ \color{blue}P(1.8,-0.4)\)
You can calculate the distances between the points. The two-point equation is called:
\(L=\sqrt{(y_2-y_1)^2+(x_2-x_1)^2}\)
Have fun.