Union and Intersection of intervals
a = Interval[{1, 5}];
b = Interval[{5, 8}];
IntervalUnion[a, b]
Interval[{1, 8}]
IntervalIntersection[a, b]
Interval[{5, 5}]
a = Interval[{1, 5}];
b = Interval[{5, 8}];
IntervalUnion[a, b]
Interval[{1, 8}]
IntervalIntersection[a, b]
Interval[{5, 5}]