MHB Distance between a line and a point

  • Thread starter Thread starter Amer
  • Start date Start date
  • Tags Tags
    Line Point
Click For Summary
The discussion focuses on finding the distance between a line represented by the equation ay - bx - c = 0 and a point (s, t) using calculus. The user derives a formula for the distance D(x) and its derivative D'(x) to minimize the distance. A suggestion is made to simplify the process by minimizing D² instead of D, which is acknowledged and appreciated by the user. The conversation highlights the importance of optimization techniques in solving geometric problems. Ultimately, the user seeks confirmation on their approach and simplification.
Amer
Messages
259
Reaction score
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 ?
 
Physics news on Phys.org
Amer said:
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 }} $

You will make things easier for yourself if you minimise \(D^2\) rather than \(D\).

CB
 
CaptainBlack said:
You will make things easier for yourself if you minimise \(D^2\) rather than \(D\).

CB

Thanks very much I did not notice that
 
Thread 'Problem with calculating projections of curl using rotation of contour'
Hello! I tried to calculate projections of curl using rotation of coordinate system but I encountered with following problem. Given: ##rot_xA=\frac{\partial A_z}{\partial y}-\frac{\partial A_y}{\partial z}=0## ##rot_yA=\frac{\partial A_x}{\partial z}-\frac{\partial A_z}{\partial x}=1## ##rot_zA=\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y}=0## I rotated ##yz##-plane of this coordinate system by an angle ##45## degrees about ##x##-axis and used rotation matrix to...

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
3
Views
2K