I was wondering: how does one use the ForAll function in Reduce? In particular, I am looking for the set $\{w\in \mathbb{R}^2 | \forall x \in \mathbb{R}^2 : \left<w,x\right> \leq f(x)\},$ where $\left<,\right> $ is the inner product and $f: \mathbb{R}^2\rightarrow\mathbb{R}^1$.
Thank you!
Asked
Active
Viewed 493 times
3
Eli Lansey
- 7,499
- 3
- 36
- 73
Uri
- 31
- 1
-
Maybe the example in this post will help. Otherwise, you will have to make the question more specific to get a useful answer. – Jens Apr 22 '12 at 19:54
-
Uri, try to include a few more details about what you're trying to solve. – Eli Lansey Apr 22 '12 at 21:31
2 Answers
3
This is a simple example. Suppose you have the following equation and you want to get the coefficients of it:
gl = a x^3 + b x^2 + c x + d == -x + (-3 + x) (5 + x^2);
Reduce[ForAll[x, gl]]
Your output will be:
d == -15 && c == 4 && b == -3 && a == 1
Peter Breitfeld
- 5,182
- 1
- 24
- 32
2
Perhaps you mean something like this:
f[{x1_, x2_}, {y1_, y2_}] := x1 y2 - x2 y1
Reduce[ForAll[{x1, x2, y1, y2},
{x1, x2}.{y1, y2} <= f[{x1, x2}, {y1, y2}]]]
murray
- 11,888
- 2
- 26
- 50