Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16827
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: complex conjugation by star |
| Date | 2014-04-20 08:46 +0000 |
| Message-ID | <lj01ho$s4d$1@smc.vnet.net> (permalink) |
| References | <20140418054638.0964A6A15@smc.vnet.net> |
| Organization | Time-Warner Telecom |
See documentation for Conjugate.
To see traditional star notation, use TraditionalForm preference:
Traditional Form (Mathematica | Preferences... | Evaluation | Format type
of new output cells: | TraditionalForm)
Clear[conjugate]
conjugate[expr_, complexExpand_: False] :=
Module[{expr2 = Conjugate /@ expr},
If[complexExpand,
Simplify[expr2,
Element[Cases[expr, _Symbol, Infinity], Reals]],
expr2]]
BesselJ[2, x + I y] // Conjugate
Conjugate[BesselJ[2, x + I y]]
BesselJ[2, x + I y] // conjugate
BesselJ[2, Conjugate[x] - I Conjugate[y]]
BesselJ[2, x + I y] // conjugate[#, True] &
BesselJ[2, x - I y]
A B C // Conjugate
Conjugate[A B C]
A B C // conjugate
Conjugate[A] Conjugate[B] Conjugate[C]
A + B + C // Conjugate
Conjugate[A + B + C]
A + B + C // conjugate
Conjugate[A] + Conjugate[B] + Conjugate[C]
Bob Hanlon
On Fri, 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
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: complex conjugation by star Bob Hanlon <hanlonr357@gmail.com> - 2014-04-20 08:46 +0000
csiph-web