Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15552
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Cyclic generator of a cyclic expression |
| Date | 2013-09-27 06:31 +0000 |
| Message-ID | <l238nu$h60$1@smc.vnet.net> (permalink) |
| References | <20130926074243.E82906A68@smc.vnet.net> |
| Organization | Time-Warner Telecom |
I'm uncertain as to what you are asking. This may or may not help.
expr1 = x^4 + y^4 + z^4 - y^2 z^2 - z^2 x^2 - x^2 y^2;
expr2 = x^4 - y^2 z^2;
f1[elem_List] := ExpandAll[Total[
Subtract @@ (#^2)^2 & /@
Subsets[elem, {2}]]] /.
(a_?NumericQ*
x_^n_) :> Sign[a]*x^n;
Two examples:
f1 /@ {{x, y, z}, {t, x, y, z}}
{x^4 - x^2*y^2 + y^4 - x^2*z^2 - y^2*z^2 + z^4,
t^4 - t^2*x^2 + x^4 - t^2*y^2 - x^2*y^2 + y^4 -
t^2*z^2 - x^2*z^2 - y^2*z^2 + z^4}
f2[elem_List] :=
First[elem]^4 - Times @@ Rest[elem]^2
Two examples:
f2 /@ {{x, y, z}, {t, x, y, z}}
{x^4 - y^2*z^2, t^4 - x^2*y^2*z^2}
f1[Variables[expr2]] == expr1
True
f2[Variables[expr1]] == expr2
True
Bob Hanlon
On Thu, Sep 26, 2013 at 3:42 AM, Francisco Javier Garc=EDa Capit=E1n <
garciacapitan@gmail.com> wrote:
> Dear friends,
>
> Given a cyclic expression say in x,y,z like
>
> x^4 + y^4 + z^4 - y^2 z^2 - z^2 x^2 - x^2 y^2
>
> what is your more or less elegant way to get a cyclic generator, like
>
> x^4 - y^2 z^2 ?
>
> Thank you very much.
>
> --
> ---
> Francisco Javier Garc=EDa Capit=E1n
> http://garciacapitan.99on.com
>
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Cyclic generator of a cyclic expression Bob Hanlon <hanlonr357@gmail.com> - 2013-09-27 06:31 +0000
csiph-web