Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Some problems with complex functions like Sqrt[z]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18168] Some problems with complex functions like Sqrt[z]
  • From: Robert Prus <robert at fuw.edu.pl>
  • Date: Sat, 19 Jun 1999 23:54:29 -0400
  • Organization: Warsaw University, Physics Department, Institute of Theoretical Physics
  • Sender: owner-wri-mathgroup at wolfram.com

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) *)
Plot3D[Chop[z],{x,-10,10},{y,-10,10}]
Plot3D[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: Re: Scoping and named patterns
  • Next by Date: Re: How to plot more curves on one graph
  • Previous by thread: Re: Automatic numbered captions for figures (plots)
  • Next by thread: Re: Some problems with complex functions like Sqrt[z]