MATLAB: IsAlways(x^2>=0) is unable to give a solution. Why so when the problem is so simple

isalwayssymbolicSymbolic Math Toolbox

I am trying to code a script that checks is a given symbolic multivariate function is convex or not, by symbolically finding the hessian and its eigen values, followed by checking if all of them are positive, negative, and so on.
However, the function isAlways is failling even at extremely simple inequalities such as
isAlways(x^2>=0)
isAlways(x^4>=0)
Why is this so? Am I doing something wrongly?
Thank you!

Best Answer

Hi,
Matlab also calculates with complex numbers. Make assumptions on x:
syms x
assume(x,'real')
result = isAlways(x^2>=0)
result =
logical
1
Best regards
Stephan