({{, x<=y or x≤y
yields (RefLink[True, paclet:ref/True]) if x is determined to be less than or equal to y.}, {, (Subscript[x, 1])≤(Subscript[x, 2])≤(Subscript[x, 3])
yields (RefLink[True, paclet:ref/True]) if the (Subscript[x, i]) form a nondecreasing sequence. }})

OpenersNotesSection(Spacer1)Details

x≤y can be entered as x (Key0[esc]) <= (Key0[esc]) y or x∖[LessEqual]y.

(RefLink[LessEqual, paclet:ref/LessEqual]) gives (RefLink[True, paclet:ref/True]) or (RefLink[False, paclet:ref/False]) when its arguments are real numbers.

(RefLink[LessEqual, paclet:ref/LessEqual]) does some simplification when its arguments are not numbers.

For exact numeric quantities, (RefLink[LessEqual, paclet:ref/LessEqual]) internally uses numerical approximations to establish numerical ordering. This process can be affected by the setting of the global variable (RefLink[$MaxExtraPrecision, paclet:ref/$MaxExtraPrecision]).

In (RefLink[StandardForm, paclet:ref/StandardForm]), (RefLink[LessEqual, paclet:ref/LessEqual]) is printed using ≤.

x≤y, entered as x (Key0[esc]) </ (Key0[esc]) y or x∖[(RefLink[LessSlantEqual, paclet:ref/LessSlantEqual])]y, can be used on input as an alternative to x≤y.

OpenersPrimaryExamplesSection(Spacer1)Examples  (26)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Compare numbers:

1≤0

2/17≤1/5≤Pi/10

Represent an inequality:

x^3-2x+1≤0

Reduce[%,x]

OpenersExampleSection1(Spacer1)Scope  (9)

OpenersExampleSubsection0(Spacer1)Numeric Inequalities  (7)

Inequalities are defined only for real numbers:

I≤0

Compare rational numbers:

3/2≤5/3

Approximate numbers that differ in at most their last eight binary digits are considered equal:

1.≤1.-2^7 10^-16

1.≤1.-2^8 10^-16

Compare an exact numeric expression and an approximate number:

N[Pi,20]≤Pi

N[Pi,20]≤Pi(1-2^8 10^-20)

Compare two exact numeric expressions; a numeric test may suffice to prove inequality:

Pi^E≤E^Pi

Proving this inequality requires symbolic methods:

Sqrt[2]+Sqrt[3]≤Sqrt[5+2Sqrt[6]]

Symbolic and numeric methods used by (RefLink[LessEqual, paclet:ref/LessEqual]) are insufficient to prove this inequality:

Sqrt[2]+Sqrt[3]≤Root[#^4-10#^2+1&,4]

Use (RefLink[RootReduce, paclet:ref/RootReduce]) to decide the sign of algebraic numbers:

RootReduce[%[[1]]-%[[2]]]≤0

Numeric methods used by (RefLink[LessEqual, paclet:ref/LessEqual]) do not use sufficient precision to disprove this inequality:

Sqrt[2]+Sqrt[3]≤Root[#^4-10#^2+1&,4]-10^-100

(RefLink[RootReduce, paclet:ref/RootReduce]) disproves the inequality using exact methods:

RootReduce[%[[1]]-%[[2]]]≤0

Increasing (RefLink[$MaxExtraPrecision, paclet:ref/$MaxExtraPrecision]) may also disprove the inequality:

Block[{$MaxExtraPrecision=100},Sqrt[2]+Sqrt[3]≤Root[#^4-10#^2+1&,4]-10^-100]

OpenersExampleSubsection1(Spacer1)Symbolic Inequalities  (2)

Symbolic inequalities remain unevaluated, since x may not be a real number:

x≤x

Use (RefLink[Refine, paclet:ref/Refine]) to reevaluate the inequality assuming that x is real:

Refine[%,Element[x,Reals]]

A symbolic inequality:

ineq=1≤x^2+y^2≤2

Use (RefLink[Reduce, paclet:ref/Reduce]) to find an explicit description of the solution set:

Reduce[ineq,{x,y}]

Use (RefLink[FindInstance, paclet:ref/FindInstance]) to find a solution instance:

FindInstance[ineq,{x,y}]

Use (RefLink[Minimize, paclet:ref/Minimize]) to optimize over the inequality-defined region:

Minimize[{x^2-y^2,ineq},{x,y}]

Use (RefLink[Refine, paclet:ref/Refine]) to simplify under the inequality-defined assumptions:

Refine[Sqrt[(2-x^2)^2],ineq]

OpenersExampleSection2(Spacer1)Properties & Relations  (12)

The negation of two-argument (RefLink[LessEqual, paclet:ref/LessEqual]) is (RefLink[Greater, paclet:ref/Greater]):

Not[x≤y]

The negation of three-argument (RefLink[LessEqual, paclet:ref/LessEqual]) does not simplify automatically:

Not[x≤y≤z]

Use (RefLink[LogicalExpand, paclet:ref/LogicalExpand]) to express it in terms of two-argument (RefLink[Greater, paclet:ref/Greater]):

LogicalExpand[%]

This is not equivalent to three-argument (RefLink[Greater, paclet:ref/Greater]):

LogicalExpand[x>y>z]

When (RefLink[LessEqual, paclet:ref/LessEqual]) cannot decide inequality between numeric expressions, it returns unchanged:

a=Log[Sqrt[2]+Sqrt[3]];
b=Log[5+2Sqrt[6]]/2;
a≤b

(RefLink[FullSimplify, paclet:ref/FullSimplify]) uses exact symbolic transformations to prove the inequality:

FullSimplify[%]

(RefLink[NonPositive, paclet:ref/NonPositive])[x] is equivalent to x∈ℝ∧x≤0:

NonPositive/@{-1,0,1,I}

Use (RefLink[Reduce, paclet:ref/Reduce]) to solve inequalities:

Reduce[x^5-3x+2≤0,x]

Reduce[y^2-4x^2+4x^4≤0,{x,y}]

Use (RefLink[FindInstance, paclet:ref/FindInstance]) to find solution instances:

FindInstance[y^2-4x^2+4x^4≤-z^2,{x,y,z}]

Use (RefLink[RegionPlot, paclet:ref/RegionPlot]) and (RefLink[RegionPlot3D, paclet:ref/RegionPlot3D]) to visualize solution sets of inequalities:

RegionPlot[y^2-4x^2+4x^4≤0,{x,-1,1},{y,-1,1}]

RegionPlot3D[y^2-4x^2+4x^4≤ -z^2,{x,-1,1},{y,-1,1},{z,-1,1}]

Inequality assumptions:

Refine[Sqrt[x^2],x≤0]

Limit[a^n,n->Infinity,Assumptions->-1/2≤a≤1/2]

Use (RefLink[Minimize, paclet:ref/Minimize]) and (RefLink[Maximize, paclet:ref/Maximize]) to solve optimization problems constrained by inequalities:

Minimize[{x-y, y^2-4x^2+4x^4≤0},{x,y}]

Use (RefLink[NMinimize, paclet:ref/NMinimize]) and (RefLink[NMaximize, paclet:ref/NMaximize]) to numerically solve constrained optimization problems:

NMinimize[{x-y, 1≤Tan[x]+Tan[y]≤2},{x,y}]

(RefLink[Integrate, paclet:ref/Integrate]) a function over the solution set of inequalities:

Integrate[x^2 Boole[1≤x^2+y^2≤2],{x,-Infinity,Infinity},{y,-Infinity,Infinity}]

Use (RefLink[Median, paclet:ref/Median]), (RefLink[Quantile, paclet:ref/Quantile]), and (RefLink[Quartiles, paclet:ref/Quartiles]) to the n(^th) greatest number(s):

{x1,x2,x3}={1,2,3};

x1≤x2≤x3

Median[{x2,x3,x1}]

OpenersExampleSection3(Spacer1)Possible Issues  (3)

Inequalities for machine-precision approximate numbers can be subtle:

2.00006-2.00005≤0.00001

The result is based on extra digits:

2.00006-2.00005//InputForm

Arbitrary-precision approximate numbers do not have this problem:

2.00006`16-2.00005`16≤0.00001`16

Thanks to automatic precision tracking, (RefLink[LessEqual, paclet:ref/LessEqual]) knows to look only at the first 10 digits:

Precision[2.00006`16-2.00005`16]

In this case, inequality between machine numbers gives the expected result:

2.6-2.5≤0.1

The extra digits in this case are ignored by (RefLink[LessEqual, paclet:ref/LessEqual]):

2.6-2.5//InputForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Less, paclet:ref/Less])  ▪  (RefLink[GreaterEqual, paclet:ref/GreaterEqual])  ▪  (RefLink[LessEqualThan, paclet:ref/LessEqualThan])  ▪  (RefLink[AsymptoticLessEqual, paclet:ref/AsymptoticLessEqual])  ▪  (RefLink[OrderedQ, paclet:ref/OrderedQ])  ▪  (RefLink[Element, paclet:ref/Element])  ▪  (RefLink[RegionPlot, paclet:ref/RegionPlot])  ▪  (RefLink[RegionPlot3D, paclet:ref/RegionPlot3D])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Relational and Logical Operators, paclet:tutorial/RelationalAndLogicalOperators])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Inequalities, paclet:guide/Inequalities])}, {▪(RefLinkPlain[Numerical Functions, paclet:guide/NumericalFunctions])}, {▪(RefLinkPlain[Testing Expressions, paclet:guide/TestingExpressions])}})}})