Why does Arg'[1. + I] return -0.5?NDSolve with Piecewise gives the incorrect answer randomlyWhy is NHoldFirst...

Mistake in years of experience in resume?

Checks user level and limit the data before saving it to mongoDB

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

Dynamic SOQL query relationship with field visibility for Users

How do I reattach a shelf to the wall when it ripped out of the wall?

Can an Area of Effect spell cast outside a Prismatic Wall extend inside it?

555 timer FM transmitter

How to fry ground beef so it is well-browned

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Do I have an "anti-research" personality?

How can I practically buy stocks?

Why does Mind Blank stop the Feeblemind spell?

Why do games have consumables?

Was there a shared-world project before "Thieves World"?

How did Captain America manage to do this?

"The cow" OR "a cow" OR "cows" in this context

How much cash can I safely carry into the USA and avoid civil forfeiture?

Map of water taps to fill bottles

What is causing the white spot to appear in some of my pictures

How could Tony Stark make this in Endgame?

Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?

What happened to Captain America in Endgame?

Critique of timeline aesthetic



Why does Arg'[1. + I] return -0.5?


NDSolve with Piecewise gives the incorrect answer randomlyWhy is NHoldFirst not propagated to symbolic derivatives?Numerical errors/inaccuracies in ProductLogWhy does this integral have a complex component?Why is (-1.)^2. a complex numberWhy does FindMinimum return 'The function value Null is not a real number'?Funny behavior when integratingWhy am I getting RootSearch::numb:Magnitude is returning a complex number if I precede it with Complex Expand?How to take derivative of the argument of an interpolating function













9












$begingroup$


From the document we know that




Arg[z] gives the gives the argument of the complex number z.




Then how about Arg'[z]? This seems to be meaningless, but Mathematica returns something if z is a non-exact number, for example



Arg'[1. + I]
(* -0.5 *)


So my question is:




  1. How is the numeric value of Arg'[z] defined?


  2. Why does Arg' behave like this? What's the potential usage of this behavior?











share|improve this question











$endgroup$












  • $begingroup$
    This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
    $endgroup$
    – Zillinium
    yesterday
















9












$begingroup$


From the document we know that




Arg[z] gives the gives the argument of the complex number z.




Then how about Arg'[z]? This seems to be meaningless, but Mathematica returns something if z is a non-exact number, for example



Arg'[1. + I]
(* -0.5 *)


So my question is:




  1. How is the numeric value of Arg'[z] defined?


  2. Why does Arg' behave like this? What's the potential usage of this behavior?











share|improve this question











$endgroup$












  • $begingroup$
    This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
    $endgroup$
    – Zillinium
    yesterday














9












9








9


1



$begingroup$


From the document we know that




Arg[z] gives the gives the argument of the complex number z.




Then how about Arg'[z]? This seems to be meaningless, but Mathematica returns something if z is a non-exact number, for example



Arg'[1. + I]
(* -0.5 *)


So my question is:




  1. How is the numeric value of Arg'[z] defined?


  2. Why does Arg' behave like this? What's the potential usage of this behavior?











share|improve this question











$endgroup$




From the document we know that




Arg[z] gives the gives the argument of the complex number z.




Then how about Arg'[z]? This seems to be meaningless, but Mathematica returns something if z is a non-exact number, for example



Arg'[1. + I]
(* -0.5 *)


So my question is:




  1. How is the numeric value of Arg'[z] defined?


  2. Why does Arg' behave like this? What's the potential usage of this behavior?








calculus-and-analysis numerics complex implementation-details






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







xzczd

















asked yesterday









xzczdxzczd

28k577258




28k577258












  • $begingroup$
    This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
    $endgroup$
    – Zillinium
    yesterday


















  • $begingroup$
    This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
    $endgroup$
    – Kuba
    yesterday












  • $begingroup$
    Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
    $endgroup$
    – Zillinium
    yesterday
















$begingroup$
This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
$endgroup$
– Kuba
yesterday






$begingroup$
This can shed some light: Trace[ Arg'[1. + I], TraceInternal -> True ]
$endgroup$
– Kuba
yesterday














$begingroup$
It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
$endgroup$
– Nasser
yesterday






$begingroup$
It is impossible to understand what the output from Trace[ Arg'[1. + I], TraceInternal -> True ] mean. May be numerics gone mad or something :) so just change 1.0 to 1 in the example given and then Arg will no longer do what you show.
$endgroup$
– Nasser
yesterday














$begingroup$
@Kuba Oh blinding light…
$endgroup$
– xzczd
yesterday




$begingroup$
@Kuba Oh blinding light…
$endgroup$
– xzczd
yesterday












$begingroup$
@Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
$endgroup$
– Kuba
yesterday






$begingroup$
@Nasser and xzczd it looks like it calculates derivative value from set of points f or Arg, but I wasn't paying too much attention.
$endgroup$
– Kuba
yesterday














$begingroup$
Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
$endgroup$
– Zillinium
yesterday




$begingroup$
Funny Answer, Just ignore the method it uses to calculate and use your own method of calculation based on the result.. The reason for using this is to extended divided by two. Arg'[1./2]
$endgroup$
– Zillinium
yesterday










2 Answers
2






active

oldest

votes


















8












$begingroup$

The internal Trace[] Kuba advises shows calculations consistent with the numeric approximation of the partial derivative with respect to the real part:



D[ComplexExpand[Arg[x + I y], TargetFunctions -> {Re, Im}], x] /. 
x -> 1 /. y -> 1
(* -(1/2) *)


This is what Mathematica does with the derivative of a numeric function with approximate input.



Other examples:



ClearAll[f, g];
f[x_?NumericQ] := Re[x]^2;
g[x_?NumericQ] := Im[x]^2;

f'[1. + I]
g'[1. + I]
(*
1.999999999999995`
-2.7506672371246275`*^-15
*)


It seems like the wrong way to evaluate Derivative.






share|improve this answer











$endgroup$













  • $begingroup$
    Funny, Abs'[2. + I] returns the input.
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
    $endgroup$
    – Michael E2
    yesterday



















4












$begingroup$

The definition of the argument is $arg(z)=text{Im}(ln(z))$. Its partial derivative with respect to $z$ would then be



$$
frac{partial arg(z)}{partial z}=
frac{partial}{partial z}frac{ln(z)-ln(z^*)}{2i}
= -frac{i}{2z}.
$$



What you see looks like twice the real part of this expression:



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]

(* {-0.172414, -0.172414} *)


I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:



$$
frac{partial arg(z)}{partialtext{Re}(z)}
=frac{partial arg(z)}{partial z}frac{partial z}{partialtext{Re}(z)}
+frac{partial arg(z)}{partial z^*}frac{partial z^*}{partialtext{Re}(z)}\
=frac{partial arg(z)}{partial z}
+frac{partial arg(z)}{partial z^*}
= -frac{i}{2z}+frac{i}{2z^*}
= -frac{text{Im}(z)}{|z|^2}
$$



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]

(* {-0.172414, -0.172414, -0.172414} *)





share|improve this answer











$endgroup$













  • $begingroup$
    Er… how is derivative of $ln(z^*)$ defined here?
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
    $endgroup$
    – Roman
    yesterday










  • $begingroup$
    @Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
    $endgroup$
    – Roman
    yesterday












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f196998%2fwhy-does-arg1-i-return-0-5%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









8












$begingroup$

The internal Trace[] Kuba advises shows calculations consistent with the numeric approximation of the partial derivative with respect to the real part:



D[ComplexExpand[Arg[x + I y], TargetFunctions -> {Re, Im}], x] /. 
x -> 1 /. y -> 1
(* -(1/2) *)


This is what Mathematica does with the derivative of a numeric function with approximate input.



Other examples:



ClearAll[f, g];
f[x_?NumericQ] := Re[x]^2;
g[x_?NumericQ] := Im[x]^2;

f'[1. + I]
g'[1. + I]
(*
1.999999999999995`
-2.7506672371246275`*^-15
*)


It seems like the wrong way to evaluate Derivative.






share|improve this answer











$endgroup$













  • $begingroup$
    Funny, Abs'[2. + I] returns the input.
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
    $endgroup$
    – Michael E2
    yesterday
















8












$begingroup$

The internal Trace[] Kuba advises shows calculations consistent with the numeric approximation of the partial derivative with respect to the real part:



D[ComplexExpand[Arg[x + I y], TargetFunctions -> {Re, Im}], x] /. 
x -> 1 /. y -> 1
(* -(1/2) *)


This is what Mathematica does with the derivative of a numeric function with approximate input.



Other examples:



ClearAll[f, g];
f[x_?NumericQ] := Re[x]^2;
g[x_?NumericQ] := Im[x]^2;

f'[1. + I]
g'[1. + I]
(*
1.999999999999995`
-2.7506672371246275`*^-15
*)


It seems like the wrong way to evaluate Derivative.






share|improve this answer











$endgroup$













  • $begingroup$
    Funny, Abs'[2. + I] returns the input.
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
    $endgroup$
    – Michael E2
    yesterday














8












8








8





$begingroup$

The internal Trace[] Kuba advises shows calculations consistent with the numeric approximation of the partial derivative with respect to the real part:



D[ComplexExpand[Arg[x + I y], TargetFunctions -> {Re, Im}], x] /. 
x -> 1 /. y -> 1
(* -(1/2) *)


This is what Mathematica does with the derivative of a numeric function with approximate input.



Other examples:



ClearAll[f, g];
f[x_?NumericQ] := Re[x]^2;
g[x_?NumericQ] := Im[x]^2;

f'[1. + I]
g'[1. + I]
(*
1.999999999999995`
-2.7506672371246275`*^-15
*)


It seems like the wrong way to evaluate Derivative.






share|improve this answer











$endgroup$



The internal Trace[] Kuba advises shows calculations consistent with the numeric approximation of the partial derivative with respect to the real part:



D[ComplexExpand[Arg[x + I y], TargetFunctions -> {Re, Im}], x] /. 
x -> 1 /. y -> 1
(* -(1/2) *)


This is what Mathematica does with the derivative of a numeric function with approximate input.



Other examples:



ClearAll[f, g];
f[x_?NumericQ] := Re[x]^2;
g[x_?NumericQ] := Im[x]^2;

f'[1. + I]
g'[1. + I]
(*
1.999999999999995`
-2.7506672371246275`*^-15
*)


It seems like the wrong way to evaluate Derivative.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday









xzczd

28k577258




28k577258










answered yesterday









Michael E2Michael E2

151k12203483




151k12203483












  • $begingroup$
    Funny, Abs'[2. + I] returns the input.
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
    $endgroup$
    – Michael E2
    yesterday


















  • $begingroup$
    Funny, Abs'[2. + I] returns the input.
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    @xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
    $endgroup$
    – Michael E2
    yesterday
















$begingroup$
Funny, Abs'[2. + I] returns the input.
$endgroup$
– xzczd
yesterday




$begingroup$
Funny, Abs'[2. + I] returns the input.
$endgroup$
– xzczd
yesterday












$begingroup$
@xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
$endgroup$
– Michael E2
yesterday




$begingroup$
@xzczd I guess they protected Abs'[] from being evaluated in this way. Re'[] and Im'[] do not evaluate, also. Maybe they overlooked Arg'[]?
$endgroup$
– Michael E2
yesterday











4












$begingroup$

The definition of the argument is $arg(z)=text{Im}(ln(z))$. Its partial derivative with respect to $z$ would then be



$$
frac{partial arg(z)}{partial z}=
frac{partial}{partial z}frac{ln(z)-ln(z^*)}{2i}
= -frac{i}{2z}.
$$



What you see looks like twice the real part of this expression:



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]

(* {-0.172414, -0.172414} *)


I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:



$$
frac{partial arg(z)}{partialtext{Re}(z)}
=frac{partial arg(z)}{partial z}frac{partial z}{partialtext{Re}(z)}
+frac{partial arg(z)}{partial z^*}frac{partial z^*}{partialtext{Re}(z)}\
=frac{partial arg(z)}{partial z}
+frac{partial arg(z)}{partial z^*}
= -frac{i}{2z}+frac{i}{2z^*}
= -frac{text{Im}(z)}{|z|^2}
$$



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]

(* {-0.172414, -0.172414, -0.172414} *)





share|improve this answer











$endgroup$













  • $begingroup$
    Er… how is derivative of $ln(z^*)$ defined here?
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
    $endgroup$
    – Roman
    yesterday










  • $begingroup$
    @Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
    $endgroup$
    – Roman
    yesterday
















4












$begingroup$

The definition of the argument is $arg(z)=text{Im}(ln(z))$. Its partial derivative with respect to $z$ would then be



$$
frac{partial arg(z)}{partial z}=
frac{partial}{partial z}frac{ln(z)-ln(z^*)}{2i}
= -frac{i}{2z}.
$$



What you see looks like twice the real part of this expression:



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]

(* {-0.172414, -0.172414} *)


I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:



$$
frac{partial arg(z)}{partialtext{Re}(z)}
=frac{partial arg(z)}{partial z}frac{partial z}{partialtext{Re}(z)}
+frac{partial arg(z)}{partial z^*}frac{partial z^*}{partialtext{Re}(z)}\
=frac{partial arg(z)}{partial z}
+frac{partial arg(z)}{partial z^*}
= -frac{i}{2z}+frac{i}{2z^*}
= -frac{text{Im}(z)}{|z|^2}
$$



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]

(* {-0.172414, -0.172414, -0.172414} *)





share|improve this answer











$endgroup$













  • $begingroup$
    Er… how is derivative of $ln(z^*)$ defined here?
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
    $endgroup$
    – Roman
    yesterday










  • $begingroup$
    @Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
    $endgroup$
    – Roman
    yesterday














4












4








4





$begingroup$

The definition of the argument is $arg(z)=text{Im}(ln(z))$. Its partial derivative with respect to $z$ would then be



$$
frac{partial arg(z)}{partial z}=
frac{partial}{partial z}frac{ln(z)-ln(z^*)}{2i}
= -frac{i}{2z}.
$$



What you see looks like twice the real part of this expression:



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]

(* {-0.172414, -0.172414} *)


I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:



$$
frac{partial arg(z)}{partialtext{Re}(z)}
=frac{partial arg(z)}{partial z}frac{partial z}{partialtext{Re}(z)}
+frac{partial arg(z)}{partial z^*}frac{partial z^*}{partialtext{Re}(z)}\
=frac{partial arg(z)}{partial z}
+frac{partial arg(z)}{partial z^*}
= -frac{i}{2z}+frac{i}{2z^*}
= -frac{text{Im}(z)}{|z|^2}
$$



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]

(* {-0.172414, -0.172414, -0.172414} *)





share|improve this answer











$endgroup$



The definition of the argument is $arg(z)=text{Im}(ln(z))$. Its partial derivative with respect to $z$ would then be



$$
frac{partial arg(z)}{partial z}=
frac{partial}{partial z}frac{ln(z)-ln(z^*)}{2i}
= -frac{i}{2z}.
$$



What you see looks like twice the real part of this expression:



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]

(* {-0.172414, -0.172414} *)


I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:



$$
frac{partial arg(z)}{partialtext{Re}(z)}
=frac{partial arg(z)}{partial z}frac{partial z}{partialtext{Re}(z)}
+frac{partial arg(z)}{partial z^*}frac{partial z^*}{partialtext{Re}(z)}\
=frac{partial arg(z)}{partial z}
+frac{partial arg(z)}{partial z^*}
= -frac{i}{2z}+frac{i}{2z^*}
= -frac{text{Im}(z)}{|z|^2}
$$



With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]

(* {-0.172414, -0.172414, -0.172414} *)






share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









RomanRoman

6,29611132




6,29611132












  • $begingroup$
    Er… how is derivative of $ln(z^*)$ defined here?
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
    $endgroup$
    – Roman
    yesterday










  • $begingroup$
    @Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
    $endgroup$
    – Roman
    yesterday


















  • $begingroup$
    Er… how is derivative of $ln(z^*)$ defined here?
    $endgroup$
    – xzczd
    yesterday










  • $begingroup$
    Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
    $endgroup$
    – Nasser
    yesterday












  • $begingroup$
    @xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
    $endgroup$
    – Roman
    yesterday










  • $begingroup$
    @Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
    $endgroup$
    – Roman
    yesterday
















$begingroup$
Er… how is derivative of $ln(z^*)$ defined here?
$endgroup$
– xzczd
yesterday




$begingroup$
Er… how is derivative of $ln(z^*)$ defined here?
$endgroup$
– xzczd
yesterday












$begingroup$
Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
$endgroup$
– Nasser
yesterday






$begingroup$
Any idea why then With[{z = 1.0 + I}, Arg'[z]] not same as With[{z = 1 + I}, Arg'[z]]? Should not these give same result?
$endgroup$
– Nasser
yesterday














$begingroup$
@xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
$endgroup$
– Roman
yesterday




$begingroup$
@xzczd $z$ and $z^*$ are independent variables in complex analysis, so $partial z^*/partial z=0$ etc.
$endgroup$
– Roman
yesterday












$begingroup$
@Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
$endgroup$
– Roman
yesterday




$begingroup$
@Nasser they do give the same result when you apply N: Arg'[1 + I] // N also gives -0.5.
$endgroup$
– Roman
yesterday


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematica Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f196998%2fwhy-does-arg1-i-return-0-5%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...