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

syms x
eq = x^2 > 4

% Assume that x > 2.

assume(x>2)

% Simplify the condition represented by the symbolic inequality eq. The simplify function returns the symbolic logical constant symtrue since the condition always holds for the assumption x > 2.

T = simplify(eq)

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

class(T)

% You can also use isAlways to check if the inequality holds under the assumption being made. In this example, isAlways returns logical 1 (true).

TF = isAlways(eq)

%
% Copyright 2019 The MathWorks, Inc.