0

How do I simplify Interval[{x,x}] to x ? Simplify and FullSimplify do not seem to do it.


OP comments (inserted by someone else ;)):

[...] I guess I don't understand why IntervalUnion[Interval[{x,x}],Interval[{x,y}]] is not Interval[{x,y}] when x and y are symbolic.

– Paul R. Mar 26 at 6:39

Kuba
  • 136,707
  • 13
  • 279
  • 740
Paul R.
  • 877
  • 4
  • 11
  • Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. – bbgodfrey Mar 24 '15 at 22:50
  • 1
    Please provide sample code showing how Interval appears. – bbgodfrey Mar 24 '15 at 22:51
  • Simplify to what? If x has a numeric value, Min and Max of interval are the (same) endpoints. – ciao Mar 24 '15 at 22:51
  • Perhaps, you mean a Rule: Interval[{x,x}]->x – bbgodfrey Mar 24 '15 at 22:52
  • @bbgodfrey - a pattern would be better: Interval[{y_, y_}] -> y – Bob Hanlon Mar 25 '15 at 00:45
  • @BobHanlon Probably so, although it depends on what the OP actually wants. For instance, he may wish to "simplify" only Interval[{x,x}] but not Interval[{z,z}]. – bbgodfrey Mar 25 '15 at 00:48
  • Hmm - I'm just learning to use Interval. I was puzzled that IntervalUnion[Interval[{x,y}],Interval[{y,z}]] did not give Interval[{x,z}]. Is it true that it only deals with numbers, not symbols? – Paul R. Mar 26 '15 at 06:26
  • Anyway, I have expressions like Interval[{x,x}] where x is a number, not a symbol, which I would like to replace with x. Bob Hanlon's pattern suggestion is the one I needed, and it works fine. Many thanks for everyone's answers. – Paul R. Mar 26 '15 at 06:35
  • Scratch that first comment, I can see how that is wrong. I guess I don't understand why IntervalUnion[Interval[{x,x}],Interval[{x,y}]] is not Interval[{x,y}] when x and y are symbolic. – Paul R. Mar 26 '15 at 06:39
  • 3
    With your additional comments the problem should be clear after understanding this topic: 98539 – Kuba Dec 09 '15 at 20:50

0 Answers0