Re: Difficulties with Complex-Modulus Series

*To*: mathgroup at smc.vnet.net*Subject*: [mg72730] Re: Difficulties with Complex-Modulus Series*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Wed, 17 Jan 2007 06:08:34 -0500 (EST)*Organization*: The Open University, Milton Keynes, UK*References*: <eohtrs$q48$1@smc.vnet.net>

carlos at colorado.edu wrote: > Say I have r = (2*I+x)/(2*I-x), in which x is real and nonnegative. > > Series[r,{x,0,4}] and Series[r,{x,Infinity,4}] work as expected. > > Introduce now R=Abs[r] and try the same: > > Series[R,{x,0,4}] and Series[R,{x,Infinity,4}] > > Results are now "contaminated" with Abs'[-1], Abs''[-1], etc, > I dont understand the presence of those derivatives. > Anybody can explain the reason? (I teach students that the > derivative of a constant is zero, but perhaps that has changed > with the new year) BTW it would be nice to say > > Series[R,{x,0,4}, x>=0] or Series[R,{x,0,4}, R>=0] etc > > if that would get rid of the garbage, but Mathematica 5 > does not allow Assumptions in Series. Note BTW that R=1 for > any x, so the R series are in fact trivial to any order. > Hi Carlos, What version of Mathematica and system platform were you using when you performed your tests? I ask because I have been unsuccessful in my attempts to get any derivatives of the function *Abs*. In[1]:= $Version r = (2*I + x)/(2*I - x); R = Abs[r]; Series[R, {x, 0, 4}] Series[R, {x, Infinity, 4}] Out[1]= 5.2 for Microsoft Windows (June 20, 2005) Out[4]= 2 I + x Abs[-------] 2 I - x Out[5]= 2 I + x Abs[-------] 2 I - x As we can see, both calls of the *Series* function only returned the callee function. Now, the built-in Mathematica function *Abs* is meant to work with numeric argument only: "Abs[z] is left unevaluated if z is not a numeric quantity [1]." Since r is not a numeric expression, the Abs[r] is left untouched and especially there is no attempt to simplify or transform r. In[6]:= NumericQ[r] Out[6]= False The closest thing to your result I could get is by differentiating R w.r.t. x In[7]:= D[R, x] Out[7]= 1 2 I + x 2 I + x (------- + ----------) Abs'[-------] 2 I - x 2 2 I - x (2 I - x) Substituting a numeric value for x, we get In[8]:= % /. x -> 2 Out[8]= 1 -(-) Abs'[-I] 2 The above result should have been zero. If we nudge Mathematica to simplify the result, we get ride of the derivative of a constant (possibly evaluated to one) but still have some value with a change of sign. In[9]:= ComplexExpand[%] Out[9]= 1 - 2 Is this a bug or a feature, I don't know: at this point, I just gave up! Best regards, Jean-Marc [1] http://documents.wolfram.com/mathematica/functions/Abs