Group Abstract Group Abstract

Message Boards Message Boards

0
|
19.3K 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
POSTED BY: David Reiss
POSTED BY: Daniel Lichtblau
Posted 11 years ago
Attachments:
POSTED BY: Ali Mousavian

The reason why you are encountering this issue, I think, is that the derivative of the absolute value generally does not exist in the complex plane, though it does exist on the real line--or any other fixed curve in the complex plane since that determines explicitly the directions of the differentiation. See

http://mathworld.wolfram.com/AbsoluteValue.html

and see the discussion in the paragraphs surrounding equation 4. The return of Abs'[...] unevaluated is a sign of this. When you make use of ComplexExpand, it assumes all parameters are real, and so it Evaluates Abs'[z] assuming that z is real, which it isn't in your case.

Thus the correct way to go about your computation is to evaluate

ComplexExpand[Rho1]

before performing any differentiation. This then leads to your value of 2/5 as expected.

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