MathGroup Archive 1999

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

Search the Archive

Re: Some problems with complex functions like Sqrt[z]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18206] Re: [mg18168] Some problems with complex functions like Sqrt[z]
  • From: "Richard Finley" <rfinley at medicine.umsmed.edu>
  • Date: Mon, 21 Jun 1999 22:50:45 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Robert,

Try the following:

In[1]:= f[z_]:=Sqrt[z]

In[2]:= re = ComplexExpand[Re[f[a + I b]], TargetFunctions->{Re,Im}];

In[3]:= im = ComplexExpand[Im[f[a + I b]], TargetFunctions->{Re, Im}];

In[4]:= D[{re,im},a].D[{re,im},b]//FullSimplify

Out[4]:= 0

Hope that helps.....  RF

>>> Robert Prus <robert at fuw.edu.pl> 06/19/99 09:54PM >>>
Hi,

For any complex (holomorphic) function f[z] I should obtain 0 as the 
result of the following calculations:

Mathematica 3.0 for Silicon Graphics
Copyright 1988-97 Wolfram Research, Inc.
 -- Motif graphics initialized --

In[1]:= f[z_]:=z^3

In[2]:= re=Re[f[a+I b]]//ComplexExpand

         3        2
Out[2]= a  - 3 a b

In[3]:= im=Im[f[a+I b]]//ComplexExpand

           2      3
Out[3]= 3 a  b - b

In[4]:= D[{re,im},a].D[{re,im},b]//Simplify

Out[4]= 0

But if I choose more complicated function, like Sqrt[z], I obtain:

In[5]:= f[z_]:=Sqrt[z]

In[6]:= re=Re[f[a+I b]]//ComplexExpand

                               Arg[a + I b]
Out[6]= Sqrt[Abs[a + I b]] Cos[------------]
                                    2

In[7]:= im=Im[f[a+I b]]//ComplexExpand

                               Arg[a + I b]
Out[7]= Sqrt[Abs[a + I b]] Sin[------------]
                                    2

In[8]:= D[{re,im},a].D[{re,im},b]//Simplify

        I               2               2              2
        - (Abs'[a + I b]  + Abs[a + I b]  Arg'[a + I b] )
        4
Out[8]= -------------------------------------------------
                          Abs[a + I b]

In the following one can use the substitutions:

Abs'[x_+I y_] -> x/Sqrt[x^2+y^2]

Arg'[x_+I y_] -> -y/(x^2+y^2)

(one can check them using:

z=Abs'[x+I y]-x/Sqrt[x^2+y^2] (* or z=Arg'[x+I y]+y/(x^2+y^2) *)
Plot[Chop[z],{x,-10,10},{y,-10,10}]
Plot[Chop[z],{x,Random[],Random[]},{y,Random[],Random[]}]
)

As the final result I obtain:

In[10]:= %8/.{Abs'[x_+I y_] -> x/Sqrt[x^2+y^2], Arg'[x_+I y_] -> 
-y/(x^2+y^2)}/.Abs[x_+I y_] -> Sqrt[x^2+y^2]//Together

               I
               -
               4
Out[10]= -------------
               2    2
         Sqrt[a  + b ]

Under Mathematica 2.0 as the final result I have:

In[9]:= %8/.{Abs'[x_+I y_] -> x/Sqrt[x^2+y^2], Arg'[x_+I y_] -> 
-y/(x^2+y^2)}/.Abs[x_+I y_] -> Sqrt[x^2+y^2]//Together

                    b
Out[9]= -------------------------
                          2    2
        4 (a - I b) Sqrt[a  + b ]

But it should be equal to zero !!!

Any comments?

Robert Prus, robert at fuw.edu.pl
Institute of Theoretical Physics, Warsaw University
Hoza 69, 00-681 Warsaw, Poland




  • Prev by Date: Mathematica for Activex?
  • Next by Date: Re: Mathematica 2.2 on iMac?
  • Previous by thread: Re: Some problems with complex functions like Sqrt[z]
  • Next by thread: Re: Some problems with complex functions like Sqrt[z]