2
$\begingroup$

First a summary of the general problem I'm trying to solve: I want to get a set of inequalities for a very complex function (If you are interested is the no-arbitrage conditions Black-Scholes equation with a volatility given by an SVI function)

So basically I'm trying to find the parameters that best fit a model given some conditions.

Long story short these are my problems:

1) I want only ONE set of inequalities, Reduce and Solve give me many solutions but in doing so take a little to much time. (This shouldn't be difficult)

2) Only get "general" inequalities: (this is the hard one). I have parameters and variables: I can set the parameters but the variables are independant. There, I need solutions that don't depend on the variables, but only on the parameters.

As an easy example, let's say my model is: a*b*(1+x^2), where x is a Real variable and a and b are my variables. Note, if my condition is something like: f(a,b,x)>2 I want this result:

a*b>2

Instead of this result which is what I got:

a*b>2/(1+x^2)

The second term depends on x^2 so it doesn't give me defined boundaries for my conditions which I can use to fit the model to the data (As I need general terms of a and b that should fit any x)

EDIT: I found of the function ForAll which solves my simple example, but doesn't work for me on the actual problem as I have also conditions on x (Is there any similar command with no such conditions?)

Thanks in advance for your time, and sorry if this is simple, I couldn't find a solution within this site.

$\endgroup$

3 Answers 3

2
$\begingroup$

I have found CylindricalDecomposition very useful for analysing inequalities. The result you get will depend on the order in which you list the variables in the second argument.

I think the result you are looking for is given by

f = a*b*(1 + x^2);
CylindricalDecomposition[f > 0, {x, a, b}]
(* (a < 0 && b < 0) || (a > 0 && b > 0) *)
$\endgroup$
1
  • $\begingroup$ Hey, thanks for the answer! However, in my equation this doesn't solve my problem :). In the example equation I have conditions: f>2 (As with f>0 and b inequalities are indeed independant of x). If I use f>2 I get the following output: (a < 0 && b < 2/(a + a x^2)) || (a > 0 && b > 2/(a + a x^2)) (which still has a and b depending on x so I can't use that to fit my model). Thanks anyway! $\endgroup$
    – user982962
    Commented Apr 1, 2017 at 11:53
1
$\begingroup$

One approach is to eliminate x using Minimize. Additional constraints can be applied

f = a*b*(1 + x^2);
min = Minimize[f, x];

The minimum can be compared with the threshold and solved

Reduce[First[min] > 2, {a, b}]
(* (a < 0 && b < 2/a) || (a > 0 && b > 2/a) *)
$\endgroup$
1
  • $\begingroup$ Thanks for the answer! I thought about this (or something similar), but my actual equations are MUCH more complex than this simple example. Within this equations the boundaries for the parameters are not all of the form of greater than, so the only think I can think of is getting the full set of results from reduce, and then minimizing each smaller than boundary and maximizing each greater than boundary. However with the huge amount of results I'm getting out of Reduce, this would take ages. $\endgroup$
    – user982962
    Commented Apr 1, 2017 at 12:52
1
$\begingroup$

You wrote "I found of the function ForAll which solves my simple example, but doesn't work for me on the actual problem as I have also conditions on x (Is there any similar command with no such conditions?) ".

The ForAll function works with restricted variables too. How about the following?

ForAll[x, x >= -1 && x^2 < 2, a*b*(1 + x^2) > 2]

$$ \forall _{x,x\geq -1\land x^2<2}a b \left(x^2+1\right)>2$$

Resolve[%, {a, b}]

(a < 0 && b < 2/a) || (a > 0 && b > 2/a)

Addition. This makes the difference:

ForAll[x, x >= 1/2 && x^2 < 2, a*b*(1 + x^2) > 2];
Resolve[%]

$$ (a|b)\in \mathbb{R}\land a b>\frac{8}{5} $$

$\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.