Welcome to NRICH.

 
Algorithm for non-linear simultaneous equations


By Jack Farchy (P1851) on Saturday, February 5, 2000 - 06:41 pm:

Hi,

Is there an algorithm that can solve the following simultaneous equation, where x and y are unknown, and n is known?:

x2+y2=2n
xy=n

What about some parameters for the following set?:
x2+y2>2n
xy=n

Thanx very much

Jack


By Dan Goodman (Dfmg2) on Saturday, February 5, 2000 - 10:24 pm:

For the first one, divide the first equation by the second one, to get:

(x2+y2)/xy=2
x2+y2=2xy
x2-2xy+y2=0
(x-y)2=0

therefore x=y, and we can subsitute this back into either equation to get x2=n, or x=y=sqrt(n). If you're looking for integer solutions, you'll only find them in n is a perfect square.


By Jack Farchy (P1851) on Sunday, February 6, 2000 - 04:13 pm:

Thanx Dan,

In a similar vein,
what about the equations and inequalities,

x2+y2>2n
x2+y2<n2+2n
xy=n

Where, once more, x and y are known and n is unkown.

Jack


By Dan Goodman (Dfmg2) on Sunday, February 6, 2000 - 07:22 pm:

First of all, you can set y=n/x and unify the first 2 equations into:

2n < x2+n2/x2 < n2+2n

You can then play around with the algebra here are reduce this to:

(x2-n)2 < x2n2

Can you get anywhere with this?


By Jack Farchy (P1851) on Monday, February 7, 2000 - 08:10 pm:

Thanx, but this isn't getting me anywhere. If you take things to their logical conclusions, and assume x=n (its highest possible value if x and y are both positive integers (which they are - they're also prime, but that hasn't got anything to do with it)), you get 1<2n, which is already known.
I suppose that makes me stuck.

Jack


By Dan Goodman (Dfmg2) on Wednesday, February 9, 2000 - 09:54 pm:

To find the set of values where it works, try this. Draw a graph of (x2-n)2-(nx)2, and wherever this graph is below the x axis (y=0) you have a solution. You can easily see from this that if x1 and x2 are solutions, then every x between x1 and x2 is a solution, so you just need to find the points at which (x2-n)2-(nx)2=0, and all values in between them will work. Also, note that this equation is a quadratic in x2 (i.e. write z=x2, substitute into the equation, solve for z and then take the square root to find x). Can you get any further?


By Jack Farchy (P1851) on Wednesday, February 9, 2000 - 10:48 pm:

Sorry, no joy here either. If you try drawing the graph you describe, it turns out that it's only positive for possible x's when x>n, which, as x is a factor of n, is impossible.

Thanx anyway,

Jack


By Dan Goodman (Dfmg2) on Friday, February 11, 2000 - 09:15 pm:

You want the graph to be negative not positive I think...