Re: Cyclic generator of a cyclic expression

• To: mathgroup at smc.vnet.net
• Subject: [mg131751] Re: Cyclic generator of a cyclic expression
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Fri, 27 Sep 2013 02:30:52 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-outx@smc.vnet.net
• Delivered-to: mathgroup-newsendx@smc.vnet.net
• References: <20130926074243.E82906A68@smc.vnet.net>

```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 at 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
>
>
>

```

• Prev by Date: Re: Aspect ratio of bounding box
• Next by Date: Re: Helping people on the internet -- was: Re: a simple question
• Previous by thread: Cyclic generator of a cyclic expression
• Next by thread: Re: Cyclic generator of a cyclic expression