# [Maxima] plotting modulus of complex function

Bart Vandewoestyne Bart.Vandewoestyne at telenet.be
Mon May 7 03:51:20 CDT 2012

On 05/04/2012 05:25 PM, Robert Dodier wrote:
> On 2012-05-04, Bart Vandewoestyne<Bart.Vandewoestyne at telenet.be>  wrote:
>
>> The real reason why I wanted to look at the Ge(s) function is that I
>> want to understand its behavior for s->0.  If I plot its modulus, i see
>> a quite smooth behavior between 1e-7 and 1e-1, but for values lower than
>> 1e-7 the abs(Ge(s)) function seems to go up again???
>
> Try replacing the ordinary floats (approx. 16 digits) with bigfloats
> (variable number of digits). I replaced the floats with bigfloats in
> your script as shown by the diff in the PS. Increasing fpprec (50, 100,
> 200) yields results that seem to converge to approximately 2.3b-4 as s
> goes to 0. (Usual disclaimer about numerical results applies.)
>
> Note that if you change fpprec, you probably have to reconstruct Ge and
> Gm because some arithmetic has already been carried out by the time you
> get around to defining the functions.
>
> By the way, after replacing the floats, you can still apply plot2d to
> the function, but since the plotting code wants floats, it's not
> an entirely accurate representation of the function. So to investigate
> the behavior close to s = 0, I think you can try something like:
>
> foo(s):=abs(Ge(s))\$
> for n thru 16 do print(bfloat(foo(1.0b0/10^n)))\$
>
> Hope this helps, it's an interesting problem.
>
> Robert Dodier

Hmmm... interesting... so according to Robert, the limit for s->0 is

2.3b-4 (a constant)

while Raymond Toy's conclusion in another reply appears to be approximately

(4.5e-23+%i*3.8e-24)/s  (1/s behavior)

Note the dramatic difference between these two!  Which of these two is
closest to the real truth (close to 0, the Ge(s) behaves as a constant
OR as a 1/s singularity) is *exactly* what I'm interested in :-)

I didn't have the courage yet to calculate this limit with pencil and
paper... but looking at the above results, it seems like i might go and
grab lots of ink and lots of sheets of paper to come to a real analytic
solution ;-)

Any other answers more than welcome!  The script/problem we're talking