How to check the positivity function?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Andrea Strappato
il 2 Ott 2021
Risposto: Walter Roberson
il 2 Ott 2021
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 Commenti
Risposta accettata
Walter Roberson
il 2 Ott 2021
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Assumptions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!