The minimum distance is the perpendicular distance. So establish the distance from the origin to the line using the distance formula.
The distance here is: d2=(x−0)^2+(y−0)^2
=x^2+y^2
To minimize this function d^2 subject to the constraint, 2x+y−10=0
If we substitute, the y-values the distance function can take will be related to the x-values by the line:y=10−2x
You can substitute this in for y in the distance function and take the derivative:
d=sqrt [x2+(10−2x)^2]
d′=1/2 (5x2−40x+100)^(−1/2) (10x−40)
Setting the derivative to zero to find optimal x,
d′=0→10x−40=0→x=4
This will be the x-value on the line such that the distance between the origin and line will be EITHER a maximum or minimum (technically, it should be checked afterward).
For x = 4, the corresponding y-value is found from the equation of the line (since we need the corresponding y-value on the line for this x-value).
Then y = 10 - 2(4) = 2.
So the point, P, is (4,2).