• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hint to solve equation having 3 unknowns

 
rushikesh kale
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends!

I want to write program which will calculate value of X,Y,Z by solving following 3 polynomial equation:

(x-4)^2+ (y-0)^2 = (45 + 5Z))^2 ------Equ 1
(x-7)^2+ (y-2)^2 = (23 + 6Z))^2 ------Equ 2
(x-0)^2+ (y-3)^2 = (89 + 4Z))^2 ------Equ 3

Sorry for not submitting any tried code; since i have know clue what is the logic for this problem.

Please give me some suggestion to form some logic to write a java program for this!

Thanks in advance
 
Campbell Ritchie
Sheriff
Pie
Posts: 49363
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to look in a mathematics book for "simultaneous quadratic equations."
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably, you are after an analytic, not numerical solution.

If I remember correctly, there is an analytic way of solving this type of puzzle. As I can't remember how, you probably want to read or Google "simultaneous quadratic equations" to find out. This forum is not the idea place to ask about hard maths.

If you want a numerical solution, the approach would be entirely different. For this type of simple equation, you could probably get away with Newton-Raphson.

So which is it?

One more thing: a quadratic with one variable has two solutions. I'm not sure how many solutions your three-variable problem has, but it could well be more than one. Some of the solutions could involve complex numbers, though. If there's more than one solution, and you need to find the the one(s) that are real numbers, that's an extra challenge.
[ February 25, 2008: Message edited by: Peter Chase ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic