Find parameters in a system of Inequalities?

Hi,
in the past few days I´m trying to solve this system with no luck.

I define a function, h[w], with “w” a variable and “a”,“b”,“c” and “d” as constants that I need to calculate given some states as Inequalities like:

  1. 38<=h[wo] <= 42 wo a value given

  2. h[w]>= 37 with 20<w<2000

  3. h[w] <0 with 1 3000

I tried with Reduce, Resolve, and all sort of changes but I never get it to work. How I manage to to this? Do I need to use Exists for condition 2) and 3)

Example of one of my attemps:

Reduce[{h[wo)] <= 42,   h[wo] >= 38,  h[w] >= 37 && 20 <= w <= 2000,  h[w] < 0 && w <= 3000,  h[w] >= 1 && w >= 1}, {w}]

Any help Is welcome!
Regards,

Hi Sebastian,

there are some problems with the function that you use.

Reduce[{h[wo)] <= 42, h[wo] >= 38, h[w] >= 37 && 20 <= w <= 2000, h[w] < 0 && w <= 3000, h[w] >= 1 && w >= 1}, {w}]

For example the parenthesis do not match; the argument of the first function is enclosed in a square and on round bracket; in fact the round bracket needs to be deleted.

Reduce[{h[wo] <= 42, h[wo] >= 38, h[w] >= 37 && 20 <= w <= 2000, h[w] < 0 && w <= 3000, h[w] >= 1 && w >= 1}, {w}]

Then the arguments of some h are wo instead of w.

Reduce[{h[w] <= 42, h[w] >= 38, h[w] >= 37 && 20 <= w <= 2000, h[w] < 0 && w <= 3000, h[w] >= 1 && w >= 1}, {w}]

Then I concatenate all conditions with a &&.

Reduce[{h[w] <= 42 && h[w] >= 38 && h[w] >= 37 && 20 <= w <= 2000 && h[w] < 0 && w <= 3000&& h[w] >= 1 && w >= 1}, {w}]

Now, the result will depend on the function h. For example I define:

h[x_] := x^2 - 10

With that and your inequalities the set of solutions is empty. So I modified the conditions a little bit like so:

Reduce[{h[w] <= 42 && h[w] >= 38 && h[w] >= 37 && -20 <= w <= 2000 && h[w] > 0 && w <= 30007 h[w] >= 1 && w >= 1}, w]

This results in

4 Sqrt[3] <= w <= 2 Sqrt[13]

Cheers,

M.

Hi Marco,
Thanks for your fast reply!. Yes, my post is a simplification of my original function and condition as I was trying to solve the general aproach to solve a system of Inequalities like this.

Rembember that my h[w] has constants as parameters that I need to find in order that all the inequalitis are TRUE. For example:

h[x_] := a*(x^2) - 10*b + 2

Need to find a and b that verify conditions (1) (2) (3) above.

Hi,

if I haven’t made a mistake the result for your particular function and conditions is False, which seems to say that there is no solution. If I modify your conditions a tiny little bit I do get a result:

ClearAll["Global`*"];
h[x_] := a*(x^2) - 10*b + 2;
Reduce[{h[w] <= 42 && h[w] >= 38 && h[w] >= 37 && - 20 <= w <= 2000 && h[w] > 0 && w <= 30007 h[w] >= 1 && w >= 1}, {w, a, b}]

gives:

a \[Element] Reals && 1 <= w <= 2000 && 1/10 (-40 + a w^2) <= b <= 1/10 (-36 + a w^2)

Note, that I had to add a and b to the list of variables to solve for.

Cheers,

M.

Hi Marco,
I´m getting False too. I have 2 questions.

  1. Where are you setting the following condition?

        h[w]>= 37 with 20<w<2000
    

I think that if you concatenate all conditions with a && you are changing the restriction to a more global one. The h[w] function must be >= of 37 in the given range of values: 20<w<2000. Same with the other.

  1. I think your solution should be something like a= 0.02 and b= 1.235 or a posible range of values that satisfy the conditions (1), (2) and (3)

Regards,
Thanks a lot for the help.

any help?

Regards,

You are right. As I said I did change the conditions a bit. I did not use this condition:

h[w]>= 37 when 20<w<2000

Regarding your second point:

I think your solution should be something like a= 0.02 and b= 1.235 or
a posible range of values that satisfy the conditions (1), (2) and (3)

I don’t think so. As far as I understood the function h would depend on these parameters. That means that the solutions will in general depend on the parameters and w, which is exactly what they do. The solution that Mathematica finds indeed does effectively give intervals for the parameters a and b, but these intervals depend on w, too.

Cheers,

M.

Thanks Marco for all your help!

I gave up this time as I thought it was easy to use Mathematica.

Regards!

The thing is: it is really easy! I don’t think that you’ll get it easier than in Mathematica…

But then, every language has some kind of learning curve and requires a bit of dedication to learn.

M.