Among all pairs of numbers (x,y) such that 3x+y=15, find the minimum of x^2 + y^2.
We are looking for the minimum (squared) distance from the origin to the line 3x + y =15
Let this point be (x , 15 - 3x )
D^2 = ( x- 0)^2 + ( 15 -3x-0) ^2
D^2 = x^2 + ( 15-3x)^2
D^2 = x^2 + 225 - 90x + 9x^2 take the derivative and set to 0
D'^2 = 2x -90 + 18x = 0
20x - 90 = 0
20x =90
x= 9/2
y = 15 - 3(9/2) = 30/2 - 27/2 = 3/2
So x^2 + y^2 is a minimum when x= 9/2 and y =3/2
The minimum is (9/2)^2 + (3/2)^2 = [ 81 + 9 ] / 4 = 90 / 4 = 45/2 = 22.5