Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16829
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: complex conjugation by star |
| Date | 2014-04-20 08:47 +0000 |
| Message-ID | <lj01j1$s5a$1@smc.vnet.net> (permalink) |
| References | <20140418054638.0964A6A15@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Mathematica already has a built-in Conjugate function used in the form Conjugate[z] as well as a suffix operator with a star that may be typed Esc co Esc or \[Conjugate].
You should not use ordinary lower-case i to denote the imaginary unit; type either I or Esc ii Esc. And it's best to avoid using upper-case letters A, B, G, etc., to avoid clashes with built-in Mathematica symbols.
Automatically, Mathematica will do some of what you want:
{a, b, g}\[Conjugate]
(* {Conjugate[a], Conjugate[b], Conjugate[g]} *)
Evaluating an expression such as Element[a, Complexes] by itself accomplishes nothing and is _not_ "remembered" in any way for further calculations. The way to indicate symbols are to be treated as reals when doing complex-algebra calculations is to use ComplexExpand. Thus:
(x + I y)\[Conjugate] // ComplexExpand
(* x - I y *)
With the built-in Conjugate function, for your example with BesselJ, you'd need to use:
On Apr 18, 2014, at 1:46 AM, Brambilla Roberto Luigi (RSE) <Roberto.Brambilla@rse-web.it> wrote:
> I have defined the following useful star complex-conjugation (common star exponent notation)
>
> f_*:=f/.Complex[u_,v_]->Complex[u,-v]
>
> and it works fine. For example BesselJ[2,x+I y]* gives BesselJ[2,x-I y] etc...(x,y defined/undefined).
> Also it is listable on number lists
>
> {1+i2, 5+i6}* gives {1-i2, 5-i6} .
>
> Unfortunately it does not work on symbols, i.e.
> A* gives A even if I have defined A as a complex number by means of Element[A, Complexes].
> Similarly if I define Element[{A,B,G}, Complexes]
>
> {A,B,G}* gives {A,B,G} and (A+B+G)* gives A+B+G.
>
> I'd like to obtain {A*,B*,G*} and A*+B*+G* ( ! )
>
> Is it possible to fix this deficiency, unpleasant in manipulating general expressions where is not known
> if symbols represent real or complex variables ?
>
> Many thanks!
> Rob
>
>
>
>
> RSE SpA ha adottato il Modello Organizzativo ai sensi del =
D.Lgs.231/2001, inforza del quale l'assunzione di obbligazioni da parte =
della Societ=E0 avviene con firma di un procuratore, munito di idonei =
poteri.
>
Murray Eisenberg murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 240 246-7240 (H)
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: complex conjugation by star Murray Eisenberg <murray@math.umass.edu> - 2014-04-20 08:47 +0000
csiph-web