0

So I have an equation that contains the distance formula squared. However, I am interested in linearizing this equation.

My equation is: Constant/distance squared

My distance is between a fixed point and a variable point. So x1 and y1 are known but x2 and y2 are variables. Any idea how to linearize this? I thought of expanding the distance and then linearizing the squares.

kaki no
  • 1
  • 1
  • Sometimes a different metric is used, such as the Manhattan distance. With just absolute values, this can be used without much problems in an LP solver. – Erwin Kalvelagen Aug 31 '18 at 20:10

1 Answers1

0

From the Taylor development,

$$\sqrt{(x_2+\delta x-x_1)^2+(y_2+\delta y-y_1)^2}\approx \\\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}+\frac{\delta x(x_2-x_1)+\delta y(y_2-y_1)}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}.$$

which is linear in $\delta x, \delta y$, the variations around some "central" $x_2,y_2$.

Notice that this gives you the algebraic distance to the plane tangent on the sphere centered at $p_1$, and passing through $p_2$.


You can reason similarly for the case of $\dfrac c{d^2}$.

  • Thank you for your answer!! Unfortunately, I did not get your idea very well. I have the following C/(x1-x2)^2 + (y1-y2)^2 > B , B and C are constants a x2nd I know x1 and y1. x2 and y2 are variables. However, I need to linearize this inquality. How can I do this? Many thanks!! – kaki no Aug 29 '18 at 10:24
  • @kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$. –  Aug 29 '18 at 10:25
  • Can you please provide a link that explains that or any other information as I did not fully understand. Really thanks for the help!! – kaki no Aug 29 '18 at 10:26
  • @kakino https://math.stackexchange.com/q/67896/65203 –  Aug 29 '18 at 10:38