How to linearize the distance formula?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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.
linear-programming approximation linear-approximation
add a comment |Â
up vote
1
down vote
favorite
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.
linear-programming approximation linear-approximation
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 at 20:10
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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.
linear-programming approximation linear-approximation
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.
linear-programming approximation linear-approximation
asked Aug 29 at 10:00
kaki no
61
61
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 at 20:10
add a comment |Â
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 at 20:10
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 at 20:10
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 at 20:10
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
From the Taylor development,
$$sqrt(x_2+delta x-x_1)^2+(y_2+delta y-y_1)^2approx
\sqrt(x_2-x_1)^2+(y_2-y_1)^2+fracdelta 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 cd^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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
From the Taylor development,
$$sqrt(x_2+delta x-x_1)^2+(y_2+delta y-y_1)^2approx
\sqrt(x_2-x_1)^2+(y_2-y_1)^2+fracdelta 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 cd^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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
add a comment |Â
up vote
0
down vote
From the Taylor development,
$$sqrt(x_2+delta x-x_1)^2+(y_2+delta y-y_1)^2approx
\sqrt(x_2-x_1)^2+(y_2-y_1)^2+fracdelta 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 cd^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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
add a comment |Â
up vote
0
down vote
up vote
0
down vote
From the Taylor development,
$$sqrt(x_2+delta x-x_1)^2+(y_2+delta y-y_1)^2approx
\sqrt(x_2-x_1)^2+(y_2-y_1)^2+fracdelta 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 cd^2$.
From the Taylor development,
$$sqrt(x_2+delta x-x_1)^2+(y_2+delta y-y_1)^2approx
\sqrt(x_2-x_1)^2+(y_2-y_1)^2+fracdelta 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 cd^2$.
edited Aug 29 at 10:24
answered Aug 29 at 10:11
Yves Daoust
114k665208
114k665208
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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
add a comment |Â
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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
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 at 10:24
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 at 10:24
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 at 10:25
@kakino: I missed that you were after $c/d^2$. Use Taylor like I did for $d$.
â Yves Daoust
Aug 29 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 at 10:26
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 at 10:26
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
@kakino math.stackexchange.com/q/67896/65203
â Yves Daoust
Aug 29 at 10:38
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2898181%2fhow-to-linearize-the-distance-formula%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 at 20:10