- #1
Amer
- 259
- 0
Find the distance between a line and a point using the extreme values
My work
Let the line
$ay - bx - c = 0 $
$y = \frac{bx+c}{a} $
and the point $(s,t)$
$D(x)= \sqrt{(x - s)^2 + (y - t)^2 } $
minimize
$D ' (x) = \dfrac{x -s +y' (y - t)}{\sqrt{(x - s)^2 + (y - t)^2 }} $
$x -s +y' (y - t) = 0\\ $
$x - s + \frac{b}{a}\left(\frac{bx+c}{a} - t \right)=0 $
$ax - as + b\left(\frac{bx+c}{a} - t \right) = 0 $
$$a^2x - a^2s + b^2x + bc - abt = 0 $$
$$ x (a^2+b^2) = a^2s - bc + abt $$
$$ x = \dfrac{a^2s - bc +abt }{a^2+b^2}$$
and
$$ y = \dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)}$$
The minmum D
$$D = \sqrt{\left(\dfrac{a^2s - bc +abt }{a^2+b^2} - s\right)^2 + \left(\dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)} - t\right)^2 } $$
Now i have to simplify just did i miss something ?
My work
Let the line
$ay - bx - c = 0 $
$y = \frac{bx+c}{a} $
and the point $(s,t)$
$D(x)= \sqrt{(x - s)^2 + (y - t)^2 } $
minimize
$D ' (x) = \dfrac{x -s +y' (y - t)}{\sqrt{(x - s)^2 + (y - t)^2 }} $
$x -s +y' (y - t) = 0\\ $
$x - s + \frac{b}{a}\left(\frac{bx+c}{a} - t \right)=0 $
$ax - as + b\left(\frac{bx+c}{a} - t \right) = 0 $
$$a^2x - a^2s + b^2x + bc - abt = 0 $$
$$ x (a^2+b^2) = a^2s - bc + abt $$
$$ x = \dfrac{a^2s - bc +abt }{a^2+b^2}$$
and
$$ y = \dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)}$$
The minmum D
$$D = \sqrt{\left(\dfrac{a^2s - bc +abt }{a^2+b^2} - s\right)^2 + \left(\dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)} - t\right)^2 } $$
Now i have to simplify just did i miss something ?