Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5616 > unrolled thread
| Started by | Ben <bjgear@googlemail.com> |
|---|---|
| First post | 2011-10-12 07:50 +0000 |
| Last post | 2011-10-17 12:13 +0000 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Taking the Arg of a complex number Ben <bjgear@googlemail.com> - 2011-10-12 07:50 +0000
Re: Taking the Arg of a complex number Simon <simonjtyler@gmail.com> - 2011-10-13 07:49 +0000
Re: Taking the Arg of a complex number David Skulsky <edskulsky@gmail.com> - 2011-10-13 07:51 +0000
Re: Taking the Arg of a complex number "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-15 10:04 +0000
Re: Taking the Arg of a complex number Ben Gear <bjgear@googlemail.com> - 2011-10-17 12:13 +0000
| From | Ben <bjgear@googlemail.com> |
|---|---|
| Date | 2011-10-12 07:50 +0000 |
| Subject | Taking the Arg of a complex number |
| Message-ID | <j73grj$fvk$1@smc.vnet.net> |
Would appreciate any help here, endless Googling has not revealed the answer to me: If I define a complex number symbolically, such as x = A Exp[I phi], why does Arg[x] never return the answer I expect, phi? Using Refine with the as sumptions phi is real and between 0 and 2 pi, and that A is greater than 0 doesn't seem to help. All I get is Arg[Exp[I phi]]
[toc] | [next] | [standalone]
| From | Simon <simonjtyler@gmail.com> |
|---|---|
| Date | 2011-10-13 07:49 +0000 |
| Message-ID | <j76575$2bl$1@smc.vnet.net> |
| In reply to | #5616 |
If you put phi in the principle range, then it works: In[1]:= FullSimplify[Arg[A Exp[I phi]], A > 0 && -Pi < phi <= Pi] Out[1]= phi c.f. In[2]:= FullSimplify[Arg[A Exp[I phi]], A > 0 && 0 < phi < 2 Pi] Out[2]= Arg[E^(I phi)]
[toc] | [prev] | [next] | [standalone]
| From | David Skulsky <edskulsky@gmail.com> |
|---|---|
| Date | 2011-10-13 07:51 +0000 |
| Message-ID | <j765av$2ci$1@smc.vnet.net> |
| In reply to | #5616 |
According to the documentation, "Arg[z] is left unevaluated if z is not a numeric quantity. " NumericQ will show you that x is not a numeric quantity. David
[toc] | [prev] | [next] | [standalone]
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Date | 2011-10-15 10:04 +0000 |
| Message-ID | <j7blrb$346$1@smc.vnet.net> |
| In reply to | #5616 |
Along the lines of Alexei x = A*Exp[I*phi] A*E^(I*phi) (* the next step effectively removes A ; does not work with A < 0 *) FullSimplify[Arg[x], A > 0] Arg[E^(I*phi)] (* now ComplexExpand dos the rest *) y = ComplexExpand[%] ArcTan[Cos[phi], Sin[phi]] Wolfgang ------------ "Ben" <bjgear@googlemail.com> schrieb im Newsbeitrag news:j73grj$fvk$1@smc.vnet.net... > Would appreciate any help here, endless Googling has not revealed the > answer to me: > > If I define a complex number symbolically, such as x = A Exp[I phi], > why does Arg[x] never return the answer I expect, phi? Using Refine > with the as sumptions phi is real and between 0 and 2 pi, and that A > is greater than 0 doesn't seem to help. All I get is Arg[Exp[I phi]] >
[toc] | [prev] | [next] | [standalone]
| From | Ben Gear <bjgear@googlemail.com> |
|---|---|
| Date | 2011-10-17 12:13 +0000 |
| Message-ID | <j7h658$q99$1@smc.vnet.net> |
| In reply to | #5616 |
Thanks all for the replies. Simon's answer seems the most satisfying, interesting that a 'FullSimplify' is required. Refine and Simplify don't cut it (still not 100% how these three differ). I was also being a bit thick about the range of phi I was using. Getting an answer of ArcTan[Cos[phi], Sin[phi]] also makes sense when the range of phi is not defined. To those who have suggested that the issue was due to Arg[z] not being evaluated unless z is numeric, as stated in the documentation - this was my first thought, however I think this means that Arg['symbolic variable'] can't be evaluated (which makes sense), rather than Arg['symbolic expression'] can't be evaluated. Regards, Ben
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web