0
$\begingroup$

I'm having a problem with Mathematica.

I have a large and complicate system of 3 inequalities in 3 variables, let's call them x,y,z.

Now, I can't use reduce to solve it exactly.

There is a way to define the region of x,y such as the system is satisfied for all z?

I tried

ImplicitRegion[ForAll[z,z :elem: Reals, sys],{x,y}]

of course, it doesn't work.

I need this region for a minimization process.

Thanks for everyone that will help.

EDIT: Here is an example

sys = {};
AppendTo[sys, x^2*y*(1 + z^2 + x*z^4) >= 0];
AppendTo[sys, z^2*y*x^2 <= 0];
AppendTo[sys, z^4 + y^3 + x^8 >= 0];

Now I want to define the region of the plane x,y where the inequalities hold for all the z. For example, the point (x,y)=(1,1) is in this region, while (x,y)=(-1,1) is not.

Of course, this is just a toy problem, you can use reduce and find the solution, but in my real problem, I can't use it. This is just to give you some ideas.

Another thing, if it is too hard to find the region of the whole plane x,y, you can restrict to a bounded region for example [-1,1]x[-1,1].

$\endgroup$
  • 1
    $\begingroup$ Please provide a concrete example. $\endgroup$ – Bob Hanlon Jun 25 at 0:41
  • $\begingroup$ I've edited as you asked. Hope it is enough. $\endgroup$ – Eso Jun 25 at 7:42
1
$\begingroup$
sys = ForAll[z, And @@ {
     x^2*y*(1 + z^2 + x*z^4) >= 0,
     z^2*y*x^2 <= 0,
     z^4 + y^3 + x^8 >= 0
}];

reg = ImplicitRegion[Resolve[sys, Reals], {x, y, z}]

(* example minimization *)
Minimize[x^4, {x, y, z} ∈ reg]

The system can be reduced further:

Resolve[sys,Reals]
(* y == 0 || (x == 0 && x^8 + y^3 >= 0) *)
Reduce[%]
(* y == 0 || (y >= 0 && x == 0) *)
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks, but why Resolve would work while Reduce doesn't? ( There are so many things that I don't know...) $\endgroup$ – Eso Jun 25 at 12:01
  • $\begingroup$ @Eso Resolve takes out the quantifiers. See the documentation attempts to resolve expr into a form that eliminates ForAll and Exists quantifiers $\endgroup$ – flinty Jun 25 at 12:03
  • $\begingroup$ First of all, Thanks. I tried but it doesn't work for my system, it gets blocked at the resolve part. So I think we can't play with a toy system, so I want to post the real system but it is large, and copy and paste don't work. When I will understand how to do it I will post it. $\endgroup$ – Eso Jun 25 at 13:59
  • $\begingroup$ @Eso - Reduce works. Simplify@Reduce@sys evaluates to (x == 0 && y >= 0) || (y == 0 && x != 0) which is equivalent to what @flinty obtained since the excluded point {0, 0} in the second alternative is covered by the first alternative. $\endgroup$ – Bob Hanlon Jun 25 at 14:54
  • $\begingroup$ When I said that reduce doesn't work, I mean on the real system that I have and not on the toy problem that I proposed just as an example. Of course, it works for the toy problem, I said it into the post, and flinty shows us that works better after resolve. $\endgroup$ – Eso Jun 25 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.