Re: A Series test

*To*: mathgroup at smc.vnet.net*Subject*: [mg72770] Re: [mg72765] A Series test*From*: Daniel Lichtblau <danl at wolfram.com>*Date*: Fri, 19 Jan 2007 01:09:21 -0500 (EST)*References*: <200701181102.GAA01494@smc.vnet.net>

carlos at colorado.edu wrote: > Just curious. Could somebody pls run this script on the > latest Mathematica user version (I think it's 5.2) under > Windows or Unix and report the results: > > rho=(x+a*I)/(x-a*I); R=Abs[rho]; > s=Series[R,{x,0,4}]; > Print[FullSimplify[s,a>=0&&x>=0]//InputForm]; > > My 5.0 answer (Mac G5 under OS 10.4.8) is > > SeriesData[x, 0, {1, (-2*I)/a, (-2*(1 + Derivative[2][Abs][-1]))/a^2, > (((2*I)/3)*(3 + 6*Derivative[2][Abs][-1] - 2*Derivative[3][Abs][-1]))/ > a^3, (2*(3 + 9*Derivative[2][Abs][-1] - 6*Derivative[3][Abs][-1] + > Derivative[4][Abs][-1]))/(3*a^4)}, 0, 5, 1] > > The correct answer is 1. (The result with Simplify is more > complicated.) Thanks. I'll leave the 5.2 run to others. Here is what happens in the development kernel of Mathematica. rho = (x+a*I)/(x-a*I); absrho = Abs[rho]; In[20]:= InputForm[s0 = Series[absrho, {x,0,4}]] Out[20]//InputForm= Abs[(I*a + x)/((-I)*a + x)] In[21]:= InputForm[s0b = FullSimplify[s0,Assumptions->a>=0&&x>=0]] Out[21]//InputForm= 1 Other possibile routes include using absrho2 = Sqrt[rho*Conjugate[rho]]; or calling ComplexExpand explicitly to get your absolute value. This last will give 1 immediately. Also will do that in version 5.2, if you use Abs rather than Sqrt[rho*Conjugate[rho]]. Daniel Lichtblau Wolfram Research

**References**:**A Series test***From:*carlos@colorado.edu