Explanation:
to eliminate the always positive absolute value at the end let's set y = -3x
that makes the absolute value term = 0 in all cases.
then we have
sqrt((x - 8)² + (-3x + 4)²)
the x-value that makes this a minimum result also makes
(x - 8)² + (-3x + 4)²
a minimum.
x² - 16x + 64 + 9x² - 24x + 16
10x² - 40x + 80
the x that makes this a minimum, also makes
x² - 4x + 8
a minimum.
we get the extreme value as zero of the first derivative :
0 = 2x - 4
4 = 2x
x = 2
so, we get the minimum of all these expressions for x = 2.
as y = -3x, we get y = -3×2 = -6.
the minimum value for the expression is with
x = 2
y = -6
so, the minimum value is
sqrt((2 - 8)² + (-6 + 4)²) + |-6 + 3×2| =
= sqrt((-6)² + (-2)²) + |-6 + 6| =
= sqrt(36 + 4) + 0 =
= sqrt(40) = 6.32455532...