# Solving for two unknowns

How would one go about to solve two equations with two unknows, x and y, where the two equations are of the following form:

A/B = c7 where:

A = (c1-x)^2 + (c2-y)^2 + (c3-x)^2 + (c4-y)^2 + c5

and

B= SQRT{[c6 + (c1-x)^2 + (c2-y)^2 ][c7 + (c3-x)^2 + (c4-y)^2 ]}

The various ci are constants that have different values in the two equations.

Thanks.

Related Introductory Physics Homework Help News on Phys.org
danago
Gold Member
Are A and B known constants? If not, then you have more than two unknowns.

Hi Danago,

No, they are not constants. You just need to replace the respective expressions to the right of the equal signs into A/B=c7. In other words:

(c1-x)^2 + (c2-y)^2 + (c3-x)^2 + (c4-y)^2 + c5
_______________________________________________________ = c7
SQRT{[c6 + (c1-x)^2 + (c2-y)^2 ][c7 + (c3-x)^2 + (c4-y)^2 ]}

The various constants c1, c2... are known. The two unknowns are x and y which should be solvable from two equations of the form given above.

In fact the situation that I have is that they are overdetermined since there are actually four equations with the same two unknowns.

Regards.

danago
Gold Member
Yes i understand that the expressions for A and B should be substituted into the first equation, however that still leaves a single equation in two unknowns. Unless i am missing something, i dont see how this system can be overdetermined, because A and B are still considered as unknowns. Removing them requires using three of the equations, so you cant really say that you have "four equations with the same two unknowns" because you only have two unknowns after you have used three of the equations.

Im not sure if you have seen it before, but a module called LaTeX has been installed on these forums which allows mathematical symbols and equations to be easily incorporated into text, rather than having to create fractions using underscores and represent square roots as SQRT{}. If you are interested, have a look at the following link:

It makes it much easier to form equations, especially when things like fractions and integrals are involved Thank you for the info about math symbols. I am very new to PF (s days) and have not seen that link yet.

Sorry about the lack of clarity in my thread. What I am saying in the first line of my original posting is that I have four equations each of of the form:

(c1-x)^2 + (c2-y)^2 + (c3-x)^2 + (c4-y)^2 + c5
__________________________________________________ _____ = c7
SQRT{[c6 + (c1-x)^2 + (c2-y)^2 ][c7 + (c3-x)^2 + (c4-y)^2 ]}

each with two unknowns x and y since all the ci have known values.

danago
Gold Member
Oh i see. Are all four equations independent?

As for solving a system like that, i would do it numerically on MATLAB. I cant see an obvious way of doing it algebraically. I think to do it algebraically you would need to multiply both sides by the denominator and then square both sides; this would leave you with a system of equations which are quartic in x and y. I would prefer not to solve a quartic system in 1 variable, let alone a system of two variables haha :yuck: Maybe somebody else will know of a better way that i have overlooked?

Yes, they are all independent.

You are right. A numeric approach would let the electrons in the computer do most of the work rather than me! :-).

The actual physical problem that I am trying to solve is that 30 years ago I pitched a tent in a mountainous wilderness area. I now would like to pitch the tent again on the same but uncertain spot.

I have a photograph of my tent in the foreground with the mountain in the background with several peaks with known coordinates and heights on it (see photo). Various angles from peak to tent to another peak are measurable on the photo. My efforts yielded the equations above with x and y reprenting the unknown GPS coordinates of the tent location.

gneill
Mentor
Actually, once the equation is squared and expanded you'll end up with an equation of degree six (because you still need to clear the denominator of B after squaring).

Unless there's something very pretty and symmetric about the relationships of the various c constants, this will be a tough system to solve algebraically. A numerical approach may be the best bet.

danago
Gold Member
Yes, they are all independent.

You are right. A numeric approach would let the electrons in the computer do most of the work rather than me! :-).

The actual physical problem that I am trying to solve is that 30 years ago I pitched a tent in a mountainous wilderness area. I now would like to pitch the tent again on the same but uncertain spot.

I have a photograph of my tent in the foreground with the mountain in the background with several peaks with known coordinates and heights on it (see photo). Various angles from peak to tent to another peak are measurable on the photo. My efforts yielded the equations above with x and y reprenting the unknown GPS coordinates of the tent location.
Oh wow and here i was thinking that this was from some textbook problem haha :rofl: