MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Poor choice in PiecewiseExpand ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107550] Poor choice in PiecewiseExpand ?
  • From: Jack L Goldberg 1 <jackgold at umich.edu>
  • Date: Tue, 16 Feb 2010 03:55:41 -0500 (EST)

Hi Folks,

I am running ver. 7.01.0 on a MackBookPro using OS 10.6.2.

In[1]  PiecewiseExpand[Ceiling[x], 0 <= x <= 3]

For clarity, I write the piecewise output in the form of a "Which"  
command.  It DOES NOT display as "Which", of course.

Out[1]  Which[1, 1 <= x < 2, 2, 2 <= x <= 3, 3, x >= 3, 0, True]


My beef (confusion) is with the values given in Out[1] when x > 3.   
(This issue arises in Floor[x] and other such functions.)  Why is the  
value 3 ?  Since the assumption is that x lies in [0,3], giving a  
value of x outside this interval should result in an error message.  
No?.  By the way, the value returned for x = -1 is zero so clearly(?)  
Mathematica decided to make this function continuous with the values at the  
end points of the assumed interval, where possible.  Is this a  
documented feature of PiecewiseExpand?  Is it even a good idea?

I can live with this "feature" by the way.  I just wish I hadn't had  
to discovered it after spending much time fooling around with  
PiecewiseExpand in other code that I am writing.

My own feeling is that outside the assumed region, PiecewiseExpand  
should return  0 if anything.

Jack



  • Prev by Date: Re: (-1)^(1/2.) on Mathematica!
  • Next by Date: Re: Re: When can Mathematica have a decent Find dialogue?
  • Previous by thread: variable graph size when including Legend and FrameTicks
  • Next by thread: Re: Poor choice in PiecewiseExpand ?