Re: complex functions handling in M8

• To: mathgroup at smc.vnet.net
• Subject: [mg121418] Re: complex functions handling in M8
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Wed, 14 Sep 2011 05:15:45 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201109131120.HAA05095@smc.vnet.net>

On 09/13/2011 06:20 AM, Dikande wrote:
> I wish to generate curves from a 3-variable complex function under
> Mathematica 8. The results (shape of the curves) I get do not reflect
> expectations. I am a rather old mathematica user and used this program
> to solve quite complicated complex problems, including root
> extractions from functions involving special several complex arguments
> functions and never experienced such a failure from Mathematica. In
> fact I have always used old versions M7 of latest), and only today I
> decided to try M8 and came across this problem. The might be a problem
> with handling of complex functions under M8 oder??? This is the code
> having a problem:
> T0 = 1.1;
> alph = 1.0;
> bet = 1.0;
> gam = 0.5;
> gam0 = 0.5;
> Ie = 5.0;
> Y0 = 0.0;
>
> Ga[x_, y_, z_] :=
>    gam*Ie/((1.0 + x)^2) - x*z/((1.0 + x)^2 + I*T0*y*(1.0 + x));
>
> Gb[x_, y_, z_] :=
>    Sqrt[Ga[x, y, z]^2 - bet^2*y^4 + 2.0*Ie*gam0*bet*y^2];
>
> FM[x_, y_, z_] := -alph*y^2 + Ga[x, y, z] - Gb[x, y, z];
>
> FP[x_, y_, z_] := -alph*y^2 + Ga[x, y, z] + Gb[x, y, z];
>
> Frm[x_, y_, z_] := Re[FM[x, y, z]];
>
> Fim[x_, y_, z_] := Im[FM[x, y, z]];
>
> Frp[x_, y_, z_] := Re[FP[x, y, z]];
>
> Fip[x_, y_, z_] := Im[FP[x, y, z]];
>
> Plot[Frm[x, Y0, 3.0], {x, 0.0, 10}]
>
> Plot[Frp[x, Y0, 3.0], {x, 0.0, 10}]
>
> Normally Frm[x, Y0, 3] is always zero but M8 displays nonzero data but
> not M7!

Here is what I get for selected values in both version 7 and 8.

In[70]:= Table[Frm[x, Y0, 3.0], {x, 0.0, 10., .5}]

Out[70]= {0., 0., -0.25, -0.64, -0.777778, -0.816327, -0.8125, \
-0.790123, -0.76, -0.727273, -0.694444, -0.662722, -0.632653, \
-0.604444, -0.578125, -0.553633, -0.530864, -0.509695, -0.49, \
-0.471655, -0.454545}

Here is the actual function.

In[73]:= Chop[Frm[x, Y0, 3.0]]

Out[73]= Re[2.5/(1. + x)^2 - (3.*x)/(1. + x)^2 -
Sqrt[(2.5/(1. + x)^2 - (3.*x)/(1. + x)^2)^2]]

I would expect the result to be nonzero when 3.*x > 2.5, as this is
where the first two terms sum to a negative value, and the last term
subtracts off the positive square root of the square of that negative.

Daniel Lichtblau
Wolfram Research

• Prev by Date: Re: complex functions handling in M8
• Next by Date: Re: Plotting a hyperbolic paraboloid (saddle)
• Previous by thread: complex functions handling in M8
• Next by thread: Re: complex functions handling in M8