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

Should the Product Owner dictate what info the UI needs to display?

As an international instructor, should I openly talk about my accent?

Combinatorics problem, right solution?

Apply a different color ramp to subset of categorized symbols in QGIS?

My bank got bought out, am I now going to have to start filing tax returns in a different state?

Can I criticise the more senior developers around me for not writing clean code?

Retract an already submitted recommendation letter (written for an undergrad student)

How long after the last departure shall the airport stay open for an emergency return?

Multiple fireplaces in an apartment building?

How to have a sharp product image?

What does MLD stand for?

A Paper Record is What I Hamper

Negative Resistance

Unknown code in script

Which big number is bigger?

Why did C use the -> operator instead of reusing the . operator?

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

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

How can I practically buy stocks?

Crossed out red box fitting tightly around image

Magical attacks and overcoming damage resistance

All ASCII characters with a given bit count

Nails holding drywall

Why is the underscore command _ useful?



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













8












$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
    17 hours ago












  • $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
    17 hours ago












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    17 hours ago










  • $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
    17 hours ago












  • $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
    13 hours ago
















8












$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
    17 hours ago












  • $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
    17 hours ago












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    17 hours ago










  • $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
    17 hours ago












  • $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
    13 hours ago














8












8








8


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 17 hours ago







xzczd

















asked 18 hours ago









xzczdxzczd

28k577258




28k577258












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












  • $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
    17 hours ago












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    17 hours ago










  • $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
    17 hours ago












  • $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
    13 hours ago


















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












  • $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
    17 hours ago












  • $begingroup$
    @Kuba Oh blinding light…
    $endgroup$
    – xzczd
    17 hours ago










  • $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
    17 hours ago












  • $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
    13 hours ago
















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






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














$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
17 hours ago






$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
17 hours ago














$begingroup$
@Kuba Oh blinding light…
$endgroup$
– xzczd
17 hours ago




$begingroup$
@Kuba Oh blinding light…
$endgroup$
– xzczd
17 hours ago












$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
17 hours ago






$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
17 hours ago














$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
13 hours ago




$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
13 hours ago










2 Answers
2






active

oldest

votes


















7












$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 evalutate Derivative.






share|improve this answer









$endgroup$













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










  • $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
    11 hours ago



















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
    17 hours ago










  • $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
    17 hours ago












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










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












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









7












$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 evalutate Derivative.






share|improve this answer









$endgroup$













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










  • $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
    11 hours ago
















7












$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 evalutate Derivative.






share|improve this answer









$endgroup$













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










  • $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
    11 hours ago














7












7








7





$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 evalutate 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 evalutate Derivative.







share|improve this answer












share|improve this answer



share|improve this answer










answered 14 hours ago









Michael E2Michael E2

151k12203483




151k12203483












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










  • $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
    11 hours ago


















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










  • $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
    11 hours ago
















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




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












$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
11 hours ago




$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
11 hours ago











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
    17 hours ago










  • $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
    17 hours ago












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










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
















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
    17 hours ago










  • $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
    17 hours ago












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










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














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 13 hours ago

























answered 17 hours ago









RomanRoman

6,08611132




6,08611132












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










  • $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
    17 hours ago












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










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


















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










  • $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
    17 hours ago












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










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
















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




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












$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
17 hours ago






$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
17 hours ago














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




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












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




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


















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

Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...