An multivariate inequality

Hi to all,

I need to verify an multivariate equality in maple, here it goes:

Nr := 3 - cos(x - y) - cos( z - x) - cos(y - z);

Dr := (sin(x/2))^2 +  (sin(y/2))^2 + (sin(z/2))^2;

assume(x>0, x<Pi); assume(y>0,y<Pi); assume(z>0,z<Pi);

eqn := Nr/Dr;

I need to check whether eqn <= 6. I have tried

is(eqn > 6)  and is(eqn <=6) and both give FAIL as output. But if I change the denominator, Dr say Dr := Dr + 6;

and then I get the result true which is indeed true. but if I change Dr to Dr + 1 or Dr + 2 ... Dr + 5  maple gives FAIL

as output. Can anyone explain this or does anyone know another way to verify this inequality.?

Thanks in advance!

pawan

 

alec's picture

Where does this problem come from?

The proof that eqn < 4 with the given assumptions is pretty simple. But before posting it I'd like to know more about the source of the problem. Is it a homework problem, a test problem, or some competition problem?

Alec

Axel Vogt's picture

inequalities

I do not expect Maple to do such inequalities "automatically", it would
not do 2*(a+b+c)-(a*b+b*c+a*c) <= 3 for the parameters between -1 and 1

 

alec's picture

Programming

For simple polynomial and trigonometric inequalities (in real domain), it seems to be not that hard to program. It seems strange that Maple, after 28 years of development, still doesn't cover that - it is a high school problem.

My choice in the poll at the l.h.s. was Math Algorithms, and I thought to myself entering it - covering at least high school algebra, geometry, and trigonometry would be nice.

By the way, this particular algebraic inequality can be done as

Optimization:-Maximize(2*(a+b+c)-(a*b+b*c+a*c),
    a=-1..1,b=-1..1,c=-1..1);

                    [3., [a = 1., b = 1., c = 0.]]

as well as

maximize(2*(a+b+c)-(a*b+b*c+a*c),a=-1..1,b=-1..1,c=-1..1);

                                  3

A similar thing can be done in the original example as well,

Optimization:-Maximize(eqn,x=0..Pi,y=0..Pi,z=0..Pi,
    initialpoint=[x=0.1,y=0.1,z=0.2]);

   [4.00000000000000088, [x = 0., y = 0., z = 2.66786575027781580]]

That doesn't prove the inequalities though, because, as we know, both maximize and Optimization:-Maximize give only a local maximum, and global maximum might be different.

Global Optimization Toolbox would be better for such problems, but it has to be purchased separately. Last time I used it  (I think it was a version for Maple 10), it gave correct results for problems with about 50 variables or less, close to correct with 50-100 variables, and wasn't very good for problems with more than 100 variables. It may be improved since then, though.

Alec

Axel Vogt's picture

similar, but different

I did it similar, but different (getting inspired by 3d plotting, choosing 1 parameter by random [which may lead to a way as well]):

differentiate w.r.t. to the parameters shows it to be monotonous, so x=y=1 is the maximum.

BTW: after transformation and a step inbetween that's the original example (in your sharpened version) ...

alec's picture

The original example

The original example can be done as follows. Start with Nr. Convert cos(a) there to 1-2*sin^2(a/2). Expand. Discard negative terms. Replace cos with 1. The result is 4*Dr.

Alec

Axel Vogt's picture

I used convert/tan

Sigh, for Nr-4*Dr I used convert/tan and arccos (+ steps inbetween + discarding + the above just discussed) ... not that elegant  (.-

alec's picture

The algebraic inequality

The algebraic inequality can be written as

(1-a)*(1-b)+(1-a)*(1-c)+(1-b)*(1-c) >= 0

which is true for a, b, and c less than or equal to 1.

Alec

Axel Vogt's picture

Aha - fine!

"gutes Auge" as we say in German ...

alec's picture

good eye

Google translated that as "good eye". What can I say. Citing one of my favorite singers and songwriters, Leonard Cohen (from Tower of Song):

I was born like this, I had no choice
I was born with the gift of a golden voice

Alec

another 28 years?

Some previous steps towards the automated proof are there:

is(a+b <= 2 ) assuming -1< a,a < 1,-1 < b,b <1;
                                    true

is(a*b <= 1 ) assuming -1< a,a < 1,-1 < b,b <1;
                                    true

But the next step fails:

is(a+b-a*b <= 1 ) assuming -1< a,a < 1,-1 < b,b <1;

                                    FAIL

'is' is a rather weak automated prover. This field of merging CAS with automated provers seems still experimental. Perhaps within another 28 years it will be ripe...

alec's picture

By the way

By the way,

solve({expand((1-a)*(1-b))>=0, a<=1});

                           {b = b, a <= 1}

which is wrong, for example, for a=0, b=2

Alec

without expand

on the other hand, it works:

solve({((1-a)*(1-b))>=0, a<=1});

                  {a <= 1, b <= 1}, {a = 1, 1 <= b}

alec's picture

expand

Yes, that's why I used expand. Factoring seems to be either not implemented, or its implementation has a bug.

Same with is - in the factored form it works,

is((1-a)*(1-b)>=0 ) assuming a <= 1, b<=1;

                                 true

Alec

JacquesC's picture

Some recent work

At least the 'community' is working on this.  In particular, see the paper by Behzad Akbarpour and Lawrence C. Paulson, MetiTarski: An Automatic Prover for the Elementary Functions recently presented at Calculemus 2008.  The work uses Isabelle and QEBCAD-B.  It proves significantly harder inequalities than those.

alec's picture

Other systems

I didn't try that in SAGE (yet), but Mathematica can do that. The algebraic inequality very simple - just using plain Reduce, and the trigonometric inequality with some tweaking (Reduce gives a long run which I interrupted after about an hour.)

Alec

comparation of provers

This paper mentions a collection of 179 problems. It would be interesting to see a comparative review of provers built in CAS and these other ones, eg how they perform under such collection of problems.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}