Sign in to follow this  

Variable Y location in the Cartesian Plane

This topic is 3667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Suppose you have two points with (x1, y1) and (x2 and y2). Y2 is unknown but all the rest are known. You also have the length of the line between these two points. How am I supposed to calculate y2? I tried the length formula L = Sqrt ( (x2-x2)^2 + (y2-y1)^2 ) but I couldn't find y2. I'd appreciate it if somebody could please help me with this.

Share this post


Link to post
Share on other sites
You first want to square both sides to get rid of the square root. Then you expand the binomials. You'll get a rather long expression, but since only y2 is a variable, a lot of them are constants and can be combined. You're left with a quadratic equation in terms of y2, which you can solve using the quadratic formula.

Share this post


Link to post
Share on other sites
And you'll likely end up with two answers or none at all.

Visually, the three coordinates define a point and a vertical line. If the horizontal distance between these two is strictly bigger than L, then obviously no answer may exist. Conversely, if it's strictly smaller than L then two such lines will exist (mirror-images of each other about this connecting horizontal line). Only in the degenerate case where |x1 - x2| = L does a unique answer exist.

Admiral

Share this post


Link to post
Share on other sites
Thank you guys for your help. The farthest I could go with this equation is this:

http://img266.imageshack.us/my.php?image=formulaor1.png

I am ending up with a quadratic equation. I try to simplify the equation by moving the variables to one side and others to the other side. However, I am ending up with two y2 variables while in fact I have to end up with one only. I would appreciate it if somebody could help me simplify this equation further.

Share this post


Link to post
Share on other sites
(x2 - x1)^2 + (y2 - y1)^2 = L^2

After expanding the second term:

y2^2 - 2y1y2 + y1^2 + (x2 - x1)^2 - L^2 = 0

So:

for polynomial:

ax^2 + bx + c = 0

Here we have:

a = 1
b = -2y1
c = y1^2 + (x2 - x1)^2 - L^2

delta = b^2 - 4ac

No you have two solutions:

y2 = (-b - sqrt(delta)) / 2a or
y2 = (-b + sqrt(delta)) / 2a

Share this post


Link to post
Share on other sites

This topic is 3667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this