0
|
15750 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

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

Posted 9 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  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:
4 Replies
Sort By:
Posted 9 years ago
 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 9 years ago
 Thanks for your response David,That idea is working pretty well for that case but if I make my function more complicated, again it turns out "Arg' " . I do not understand that pretty well, I have a function which is always real, but its derivatives might be complex? Could you take a quick look at the attachment? I have a rather complicated function which is always real valued (I have plotted the function and its imaginary part for comparison) then I am taking Complex Expand and then the derivative of that. If I evaluate the function after derivative, the result is complex. Is it true answer or I am doing something wrong.Thanks, Sardar Attachments:
Posted 9 years ago
Posted 9 years ago
 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.htmland 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.