Large system of inequalities

Hi,

I have this system of equations

$\displaystyle x^2>x^2-4xy+2xz+2y^2-z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$

$\displaystyle x^2-4xy+2xz+2y^2-z^2>x^2-8xy+4xz+4y^2-2z^2\ \ \ \ \ \ \ \ \ (2)$

$\displaystyle x^2-8xy+4xz+4y^2-2z^2>x^2+2xy-2xz-y^2+z^2\ \ \ \ \ \ \ \ \ \ \ (3)$

$\displaystyle x^2+2xy-2xz-y^2+z^2>x^2-2xy+y^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (4)$

$\displaystyle x^2-2xy+y^2>x^2-6xy+2xz+3y^2-z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (5)$

$\displaystyle x^2-6xy+2xz+3y^2-z^2>x^2+4xy-4xz-2y^2+2z^2\ \ \ \ \ \ \ \ \ \ \ (6)$

$\displaystyle x^2+4xy-4xz-2y^2+2z^2>x^2-2xz+z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (7)$

$\displaystyle x^2-2xz+z^2>x^2-4xy+2y^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (8)$

$\displaystyle x^2-4xy+2y^2>0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (9)$

From here on I'm only working with +ve x, y and z integers where $\displaystyle \ \ \ \ \ \ \ x\ge4>z>y>0$

For any given x i've found the maximum value of y is

$\displaystyle x\left(1-\dfrac{1}{\sqrt{2}}\right)$

and that for y from 1 to this limit, z has a lower range and higher range of limits

$\displaystyle \dfrac{3x+3-\sqrt{3(3x^2-10xy+5y^2}}{3}\ \ \ \le\ z\ \le\ \ \ x-\sqrt{x^2-4xy+2y^2}$

and

$\displaystyle x+1+\sqrt{x^2-4xy+2y^2}\ \ \ \le\ z\ \le\ \ \ \dfrac{3x+\sqrt{3(3x^2-10xy+5y^2}}{3}$

I had thought that y had a lower limit of 1

but when x gets to 31622777 and y = 1 there are no valid values of Z that satisfy the equations.

There __are__ valid values for z when x = 31622777 and y = 2

So somewhere in these equations I should be able to find this lower y limit

My problem? I can't :(

Any help would be greatly appreciated :D

Pro

Re: Not for the faint-hearted

I got a headache just looking at your post (Angry)

Re: Not for the faint-hearted

Quote:

Originally Posted by

**procyon** Hi,

I have this system of equations

:

:

:

Any help would be greatly appreciated :D

Pro

It might be helpful if you told us how this set of inequalities has arisen.

It would also be helpful if you simplified the inequalities.

CB

Re: Not for the faint-hearted

Quote:

Originally Posted by

**CaptainBlack** It might be helpful if you told us how this set of inequalities has arisen.

It would also be helpful if you simplified the inequalities.

CB

Indeed. Aren't (7) and (8) equivalent?

And can't you cancel x^2 from almost all the equations??

Re: Large system of inequalities

Hi,

First my apologies for not using a relevant title.

Yes, all of the equations can have $\displaystyle x^2$ factored out and yes, some of them are equivalent. I presented them in their entirety so I could be sure I hadn't misfactored somewhere along the way.

Anyway, I have a feeling that the result I got could simply be a computer rounding error, so I'm off to find a pencil and piece of paper.

Thanks (Wink)

[solved] Re: Large system of inequalities

Yes,

Sorry folks, it was a rounding error (Headbang)

Excel reports

31622777^2=1000000025191730 not the correct 1000000025191729

Moral of the story; Don't trust Micro$oft with anything you care about (Rofl)

Sigh, back to the grindstone

Pro

Re: [solved] Re: Large system of inequalities

Quote:

Originally Posted by

**procyon** Yes,

Sorry folks, it was a rounding error (Headbang)

Excel reports

31622777^2=1000000025191730 not the correct 1000000025191729

Moral of the story; Don't trust Micro$oft with anything you care about (Rofl)

Sigh, back to the grindstone

Pro

I was about to say that this is a limitation of double precision floating point, since 16 decimal digits in the mantissa is close to the limit of double precision floating point, but checking 31622777^2 is just inside the limits for exact integer arithmetic in DP floating point, indeed Gnumeric gets this right.

(to some extent I am incredulous that MS can get this wrong since they are supposed to be implementing the IEEE floating point specification, and it is not a fault with the MS C/C++ compiler since I have a couple of applications built with that which get 31622777^2 right)

CB

Re: [solved] Re: Large system of inequalities

The laughable thing is that the bog-standard calculator that comes with Vista can even get it right :D

Re: Large system of inequalities

Quote:

Originally Posted by

**procyon**

$\displaystyle x^2-4xy+2y^2>0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (9)$

From here on I'm only working with +ve x, y and z integers where $\displaystyle \ \ \ \ \ \ \ x\ge4>z>y>0$

For any given x i've found the maximum value of y is

$\displaystyle x\left(1-\dfrac{1}{\sqrt{2}}\right)$

Well, if your equation (9) is set to zero, and solved for y:

2y^2 - 4xy + x^2 = 0

y = x[2 - SQRT(2)] / 2

which is same as your y = x[1 - 1/SQRT(2)]

So there really was nothing to be "found"; all that's needed is set (9) to

zero and solve for y, as I'm showing; ...am I missing something?

I'm still perplexed by those first 8 equations of yours; there's really only 2:

10xy - 6xz - 5y^2 + 3z^2 < 0

-4xy + 2xz + 2y^2 - 1z^2 < 0

And I see nothing wrong with adding 'em up to get:

6xy - 4xz - 3y^2 + 2z^2 < 0

Re: Large system of inequalities

Quote:

Originally Posted by

**Wilmer** Well, if your equation (9) is set to zero, and solved for y:

2y^2 - 4xy + x^2 = 0

y = x[2 - SQRT(2)] / 2

which is same as your y = x[1 - 1/SQRT(2)]

So there really was nothing to be "found"; all that's needed is set (9) to

zero and solve for y, as I'm showing;

Exactly

Quote:

...am I missing something?

Not at all, that's exactly where I 'found' it :D

Quote:

I'm still perplexed by those first 8 equations of yours; there's really only 2:

10xy - 6xz - 5y^2 + 3z^2 < 0

-4xy + 2xz + 2y^2 - 1z^2 < 0

As I replied to TheChaz, I only included them all for completeness sake, in case I had overlooked something. It appears I hadn't (Wink)

Quote:

And I see nothing wrong with adding 'em up to get:

6xy - 4xz - 3y^2 + 2z^2 < 0

Again, you are quite right, nothing at all wrong with that :D

My problem was with the result I was getting at x=31622777, but as I updated, it turns out that Excel can't count and I can't read. I had the equations set up in Excel so it would indicate for a given x, y and z if they were all true. In this particular instance I took it on blind faith that it was correctly reporting one or more of them was false so looked to the equations for a reason. If I'd had the sense to look at Excel's output for the individual equations, I would have noticed that (31622777)² couldn't end with a zero (Doh)

Thanks,

Pro

Re: Large system of inequalities

Quote:

Originally Posted by

**procyon** Exactly

Not at all, that's exactly where I 'found' it :D

As I replied to TheChaz, I only included them all for completeness sake, in case I had overlooked something. It appears I hadn't (Wink)

Again, you are quite right, nothing at all wrong with that :D

My problem was with the result I was getting at x=31622777, but as I updated, it turns out that Excel can't count and I can't read. I had the equations set up in Excel so it would indicate for a given x, y and z if they were all true. In this particular instance I took it on blind faith that it was correctly reporting one or more of them was false so looked to the equations for a reason. If I'd had the sense to look at Excel's output for the individual equations, I would have noticed that (31622777)² couldn't end with a zero (Doh)

Thanks,

Pro

You might want to try Gnumeric, it strives for correct numerical algorithms, still has some rough edges but seems more reliable numerically than Excel (and its free)

CB

Re: Large system of inequalities

OK,

I must take a look at it.

Thanks for that Captain

Re: [solved] Re: Large system of inequalities

Quote:

Originally Posted by

**procyon** The laughable thing is that the bog-standard calculator that comes with Vista can even get it right :D

The little Windows calculator is actually more sophisticated than it looks. It is good to 32 significant digits, well in excess of the 15 significant digits you get in Excel or double-precision floating point.

Re: [solved] Re: Large system of inequalities