# Variable Y location in the Cartesian Plane

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

## 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 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 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.

##### 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 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

1. 1
Rutin
25
2. 2
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 14
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631758
• Total Posts
3002137
×