%% Simplify Symbolic Inequality
% Create a symbolic inequality x^2 > 4.

syms x
eq = x^2 > 4

% Assume that -2 < x < 2.

assume(-2<x & x<2)

% Simplify the condition represented by the symbolic inequality eq. The simplify function returns the symbolic logical constant symfalse since the condition never holds for the assumption -2 < x < 2.

F = simplify(eq)

% Display the data type of symfalse, which is sym.

class(F)

% You can also use isAlways to check if the inequality does not hold under the assumption being made. In this example, isAlways returns logical 0 (false).

TF = isAlways(eq)

% Copyright 2019 The MathWorks, Inc.