How to prove the positivity if this function?

3 次查看(过去 30 天)
Hi,
I need to prove the positivity of the y:
y = x1 - x2 + sin(x1)
such that:
pi>x1>0, x1>x2, x1,x2 real
The Matlab code is:
x = sym('x', [1 2], 'real');
assume(pi>x(1)>0 & x(1)>x(2));
y = x(1) - x(2) + sin(x(1));
We all know that the sum of "x(1)-x(2)" and "sin(x(1))" ,according to the boundary, is always definite positive.
Checking it in Matlab:
isAlways(y>=0)
I get:
Warning: Unable to prove '0 < x1 - x2 + sin(x1)'.
> In symengine
In sym/isAlways (line 42)
How can I prove the positivity of y?
The whole function is more bigger then y, so I can't simply say "y looks positive", I need to check it using Matlab.
Any kind of help is really appreciated!

采纳的回答

David Goodmanson
David Goodmanson 2021-10-23
Hi Andrea,
What might constitute a proof using Matlab is a good question. If the answer to isAlways(y>=0) had come out as 1, would that be a proof? I guess maybe it would if the focus is on learning how to use symbolic variables, but it provides zero insight into the inequality itself. It's just the output from a black box. However, rearranging y > 0 gives
sin(x1) > x2 - x1
By the conditions of the problem, the left hand side is positive due to the angle restrictions and the right hand side is negative. So the inequality is correct.
  2 个评论
Andrea Strappato
Andrea Strappato 2021-10-23
Thanks for the answer!
The "real" inequality to check is more complex then this, showed in the topic. Maybe solving an easier inequality could help.
Anyway, I've solved this just replacing a set of value for the symbolic variables and check if it is definite positive.
Best.
David Goodmanson
David Goodmanson 2021-10-28
Hi Andrea,
checking the inequality with a set of values is of course not a mathematical proof, but with enough sets of values it might be considered a 'proof for all practical purposes'.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by