Re: Some problems with complex functions like Sqrt[z]
- To: mathgroup at smc.vnet.net
- Subject: [mg18210] Re: Some problems with complex functions like Sqrt[z]
- From: Mirek Gruszkiewicz <xuk at ornl.gov>
- Date: Tue, 22 Jun 1999 20:41:08 -0400
- Organization: Oak Ridge National Lab, Oak Ridge, TN
- References: <7kho0g$qmq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Robert Prus wrote:
>
>
> 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)
>
>
This seems to be the problem, the above are not true.
Mathematica's Abs'[x_+I y_] is *not* the derivative of the real function of two variables Sqrt[x^2+y^2] wth respect to
either x or y.
Similarly, Arg'[x_+I y_] does *not* mean the partial derivative of any real function of two variables with respect to one
of these variables (which one x or y would that be?)
Instead, they are derivatives of functions of one complex variable, Abs[z] and Arg[z].
Abs'[z] = Abs[z] / z (since z = Abs[z](cos phi + i sin phi) )
Then, Abs'[a+bi] = Sqrt[a^2+b^2]/(a+bi)
Arg'[z] = d phi/ d z = 1/(z i) (from z = Abs[z]*Exp[i phi])
so, Arg'[z] = 1/((a+bi)i)
Now we can try
f[z_]:=Sqrt[z]
re=Re[f[a+I b]]//ComplexExpand
im=Im[f[a+I b]]//ComplexExpand
Answer:
Sqrt[Abs[a + I*b]]*Cos[1/2*Arg[a + I*b]]
Sqrt[Abs[a + I*b]]*Sin[1/2*Arg[a + I*b]]
And
Simplify[D[{re, im}, a] . D[{re, im}, b]]
I*Abs'[a + I*b]^2 + Abs[a + I*b]^2*Arg'[a + I*b]^2)
----------------------------------------------------------
4*Abs[a + I*b]
which is same as your result.
But now use the above expressions,
%/. {Abs'[x_ + I*y_] -> Sqrt[x^2 + y^2]/(x + I*y),
Arg'[x_ + I*y_] -> 1/((x + I*y)*I)}
Answer:
(I*((a^2 + b^2)/(a + I*b)^2 - Abs[a + I*b]^2/
(a + I*b)^2))/(4*Abs[a + I*b])
now tell Mathematica what is Abs[x_ + I*y_]
%/.Abs[x_ + I*y_] -> Sqrt[x^2 + y^2]
and you get zero, cbdo.
***********************
To do everything as functions of real variables (as you probably intended), try this:
re = FunctionExpand[
ComplexExpand[Re[f[a + I*b]]] /.
{Abs[x_ + I*y_] -> Sqrt[x^2 + y^2],
Arg[x_ + I*y_] -> ArcCos[x/Sqrt[x^2 + y^2]]}
]
im = FunctionExpand[
ComplexExpand[Im[f[a + I*b]]] /.
{Abs[x_ + I*y_] -> Sqrt[x^2 + y^2],
Arg[x_ + I*y_] -> ArcCos[x/Sqrt[x^2 + y^2]]}
]
Simplify[D[{re, im}, a] . D[{re, im}, b]]
Answer:
((a^2 + b^2)^(1/4)*Sqrt[1 + a/Sqrt[a^2 + b^2]])/Sqrt[2]
((a^2 + b^2)^(1/4)*Sqrt[1 - a/Sqrt[a^2 + b^2]])/Sqrt[2]
0
, CND. :-)
Mirek Gruszkiewicz
ornl