How to prove the positivity if this function?
2 views (last 30 days)
Show older comments
Andrea Strappato
on 12 Oct 2021
Commented: David Goodmanson
on 28 Oct 2021
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!
0 Comments
Accepted Answer
David Goodmanson
on 23 Oct 2021
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 Comments
David Goodmanson
on 28 Oct 2021
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'.
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!