Message Boards Message Boards

GROUPS:

A bit different results for almost the same conditions but recomposed input

Posted 4 days ago
101 Views
|
0 Replies
|
0 Total Likes
|

I have some expression to solve. But if try to rewrite or recompose the expression, then the result a more or less different.

Here is the source, where solution is used as a prove for some statement: https://github.com/andry81/bittools/blob/trunk/src/bitsync/correlation.cpp

(a + c) * c + (b + d) * d <= max((a + c) ^ 2 + d ^ 2, (b + d) ^ 2 + c ^ 2), a > 0, b > 0, c >= 1, d >= 1

https://www.wolframalpha.com/input?i=%28a+%2B+c%29++c+%2B+%28b+%2B+d%29++d+%3C%3D+max%28%28a+%2B+c%29+%5E+2+%2B+d+%5E+2%2C+%28b+%2B+d%29+%5E+2+%2B+c+%5E+2%29%2C+a+%3E+0%2C+b+%3E+0%2C+c+%3E%3D+1%2C+d+%3E%3D+1

{a c + b d + c^2 + d^2<=1/2 a^2 sgn(-c^2 + (a + c)^2 + d^2 - (b + d)^2) + a^2/2 + 1/2 b^2 sgn(c^2 - (a + c)^2 - d^2 + (b + d)^2) + a c sgn(-c^2 + (a + c)^2 + d^2 - (b + d)^2) + 1/2 c^2 sgn(-c^2 + (a + c)^2 + d^2 - (b + d)^2) + 1/2 d^2 sgn(-c^2 + (a + c)^2 + d^2 - (b + d)^2) + 1/2 c^2 sgn(c^2 - (a + c)^2 - d^2 + (b + d)^2) + 1/2 d^2 sgn(c^2 - (a + c)^2 - d^2 + (b + d)^2) + b d sgn(c^2 - (a + c)^2 - d^2 + (b + d)^2) + a c + b^2/2 + b d + c^2 + d^2, a>0, b>0, c>=1, d>=1}

(x + u) * u + (y + v) * v <= max((x + u) ^ 2 + v ^ 2, (y + v) ^ 2 + u ^ 2), x > 0, y > 0, u >= 1, v >= 1

https://www.wolframalpha.com/input?i=%28x+%2B+u%29++u+%2B+%28y+%2B+v%29++v+%3C%3D+max%28%28x+%2B+u%29+%5E+2+%2B+v+%5E+2%2C+%28y+%2B+v%29+%5E+2+%2B+u+%5E+2%29%2C+x+%3E+0%2C+y+%3E+0%2C+u+%3E%3D+1%2C+v+%3E%3D+1

{u^2 + u x + v^2 + v y<=1/2 x^2 sgn(-u^2 + v^2 + (u + x)^2 - (v + y)^2) + 1/2 y^2 sgn(u^2 - v^2 - (u + x)^2 + (v + y)^2) + 1/2 u^2 sgn(-u^2 + v^2 + (u + x)^2 - (v + y)^2) + 1/2 u^2 sgn(u^2 - v^2 - (u + x)^2 + (v + y)^2) + u x sgn(-u^2 + v^2 + (u + x)^2 - (v + y)^2) + 1/2 v^2 sgn(-u^2 + v^2 + (u + x)^2 - (v + y)^2) + 1/2 v^2 sgn(u^2 - v^2 - (u + x)^2 + (v + y)^2) + v y sgn(u^2 - v^2 - (u + x)^2 + (v + y)^2) + u^2 + u x + v^2 + v y + x^2/2 + y^2/2, x>0, y>0, u>=1, v>=1}

Solve [(x + z) * z + (y + w) * w <= max((x + z) ^ 2 + w ^ 2, (y + w) ^ 2 + z ^ 2), x > 0, y > 0, z >= 1, w >= 1]

https://www.wolframalpha.com/input?i=Solve+%5B%28x+%2B+z%29++z+%2B+%28y+%2B+w%29++w+%3C%3D+max%28%28x+%2B+z%29+%5E+2+%2B+w+%5E+2%2C+%28y+%2B+w%29+%5E+2+%2B+z+%5E+2%29%2C+x+%3E+0%2C+y+%3E+0%2C+z+%3E%3D+1%2C+w+%3E%3D+1%5D

solve (x + z) z + (y + w) w<=max((x + z)^2 + w^2, (y + w)^2 + z^2)
x>0
y>0
z>=1
w>=1

If try to change a bit the 3d input:

Solve [(x + z) * z + (y + w) * y <= max((x + z) ^ 2 + w ^ 2, (y + w) ^ 2 + z ^ 2), x > 0, y > 0, z >= 1, w >= 1]

https://www.wolframalpha.com/input?i=Solve+%5B%28x+%2B+z%29++z+%2B+%28y+%2B+w%29++y+%3C%3D+max%28%28x+%2B+z%29+%5E+2+%2B+w+%5E+2%2C+%28y+%2B+w%29+%5E+2+%2B+z+%5E+2%29%2C+x+%3E+0%2C+y+%3E+0%2C+z+%3E%3D+1%2C+w+%3E%3D+1%5D

w>=1 and x>0 and 0<y<=sqrt(2 w^2 + x^2) and z>=1
w>=1 and x>0 and y>sqrt(2 w^2 + x^2) and 1<=z<=(w^2 + w y)/x
w>=1 and x>0 and y>sqrt(2 w^2 + x^2) and z>=(-w^2 + w y - x^2 + y^2)/x
  1. Is that supposed to work like that?
  2. What the input and solution is correct?
  3. Why the 3d solution is not complete?
POSTED BY: Andrey D
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract