OA=2+x x-distance from x=2 to the right
tg a = 2/x
OB=(2+x)tg a=2(2+x)/x
f(x)=
f'(x)=0
OA=4 (x)
OB=4 (y).
|AB| min=
The line has a negative slope.
If it had a positive slope, it could go through the origin making the distance
between A and B zero.
If you draw the line going through (2,2) with a negative slope,
we have similar triangles by drawing lines from (2,2) to the x and y axes.
hence
let x-2=c, y-2=k
the length of the line segment is, using Pythagoras' theorem
You could differentiate this with respect to c and set the result = 0
to find the value of x causing the segment length to be a minimum.
Alternatively,
the segment length is
we can differentiate wrt the angle to find the minimum length
this occurs when the angle is 45 degrees
hence the minimum segment length is
or