How to check the positivity function?
2 ビュー (過去 30 日間)
古いコメントを表示
I can't prove the positivity of the function:
y = x1 - x2 + sin(x1)
such that:
0<x1<0.0001
0<x2<0.0001
x1>x2
My matlab code is:
x = sym('x', [1 2], 'real')
assume(0.0001>x>0 & x(1)>x(2))
y = x(1) - x(2) + sin(x(1))
isAlways(y>=0)
%Below the responde from command window
Warning: Unable to prove '0 <= x1 - x2 + sin(x1)'.
> In symengine
In sym/isAlways (line 42)
Why Matlab can't prove the positivity of the function y?
I can prove that "x(1)-x(2)" and "sin(x(1))" are positive, I don't know why I can't prove the positivity of the sum of positivity term.
Any kind of help is appreciate, I'm stucked on this for hours..
0 件のコメント
採用された回答
Walter Roberson
2021 年 10 月 2 日
Eh. So split it up. x1 strictly > x2 impliex x1 - x2 > 0
x1 > 0 and x1 < pi implies sin(x1) > 0
the sum of two positive quantities is positive.
x = sym('x', [1 2], 'real')
assume(0.0001>x>0 & x(1)>x(2))
y1 = x(1) + x(2)
y2 = sin(x(1))
isAlways(y1 > 0)
isAlways(y2 > 0)
syms y3 y4 %y3 is the positive quantity y1, y4 is the positive quantity sin(x(1))
assume(y3>0 & y4>0)
isAlways(y3+y4 > 0)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!