3
$\begingroup$

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!

$\endgroup$
2
  • $\begingroup$ Maybe the example in this post will help. Otherwise, you will have to make the question more specific to get a useful answer. $\endgroup$
    – Jens
    Commented Apr 22, 2012 at 19:54
  • $\begingroup$ Uri, try to include a few more details about what you're trying to solve. $\endgroup$
    – Eli Lansey
    Commented Apr 22, 2012 at 21:31

2 Answers 2

3
$\begingroup$

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
$\endgroup$
2
$\begingroup$

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}]]]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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