Group Abstract Group Abstract

Message Boards Message Boards

0
|
18.7K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Why I am getting Abs' when I am doing derivative over a complex function?

Posted 11 years ago

Hi all,

I am pretty new in Mathematica, so that might be a simple question!

I am defining a function in complex space, then I am trying to use its module and argument (Abs and arg). At the end of the day, I'd like to take derivative of that. The output seems pretty weird for me. I am getting Abs' and do not know how to deal with that. Here is the sample of my work:

T1[A_, B_, f] = (A + I*B)*f;
Rho1 = Log[Abs[T1[A, B, f]]] - Log[Abs[11 + I*22]]
D[Rho1, A]
(f Abs'[(A + I B) f])/Abs[(A + I B) f]

And even when I evaluate that after ComplexExpand at a simple point it gives me wrong answer:

ComplexExpand(f Abs'[(A + I B) f])/
 Abs[(A + I B) f] /. {A -> 2 , B -> 1 , f -> 100}
1/Sqrt[5]

But it should be 2/5!

I am wondering if any one has some idea in relate of that. I have attached the file as well.

Thanks, Sardar

Attachments:
POSTED BY: Ali Mousavian
4 Replies

As I mention above, the absolute value function is not complex differentiable. This is because it does not satisy the Cauchy Riemann Equations:

In[1]:= u = ComplexExpand[Re[Abs[x + I y]]]

Out[1]= Sqrt[x^2 + y^2]

In[2]:= v = Im[Abs[x + I y]]

Out[2]= 0

In[3]:= D[u, x]

Out[3]= x/Sqrt[x^2 + y^2]

<a href="http://en.wikipedia.org/wiki/Cauchy–Riemann_equations">http://en.wikipedia.org/wiki/Cauchy–Riemann_equations

http://mathworld.wolfram.com/Cauchy-RiemannEquations.html

Thus in your attached notebook (to avoid differentiating the Abs function via the chain rule) you need to do ComplexExpand before doing any differentiations.

Eg:

ComplexExpand[F[A, B, f]];
D[F[A, B, 1] , A] /. {A -> 1 , B -> 1}

should be replaced by

D[ComplexExpand [F[A, B, 1]] , A] /. {A -> 1 , B -> 1}

An additional bit of advice: you should define your functions using a delayed evaluation (:=) rather than an immediate evaluation (=).

(Also in your attached notebook Re1 and Im1 are not defined.)

You get a Abs'[...] in your result because of the chain rule, but Abs['[...] cannot be interpreted in an unambiguous manner. Therefore you need to avoid it.

POSTED BY: David Reiss

If it is a real-valued function f[z] of a complex-valued variable x=x+I*y, then you really have to consider separately D[f,x] and D[f,y]. You are, in effect, not distinguishing (I was tempted to say "differentiating") between these, and that is messing things up. It will also be necessary to write the function in such a way that dependencies on {x,y} are explicit.

POSTED BY: Daniel Lichtblau
Posted 11 years ago
Attachments:
POSTED BY: Ali Mousavian
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard