       Re: Exploiting relationships in manipulations: example

• To: undisclosed-recipients:;
• Subject: [mg131329] Re: Exploiting relationships in manipulations: example
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Sat, 29 Jun 2013 04:54:10 -0400 (EDT)
• Approved: Steven M. Christensen <steve@smc.vnet.net>, Moderator
• 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
• Newsgroups: comp.soft-sys.math.mathematica
• References: <20130628081233.8C1D769C6@smc.vnet.net>

```tel = {2/15 Sqrt[
=CF=80] (5 ff + 2 Sqrt ff), -I Sqrt[(2 =CF=80)/15] (ff[-1] +
ff),
1/15 Sqrt[
=CF=80] (10 ff -
Sqrt (Sqrt ff[-2] + 2 ff + Sqrt ff)),
Sqrt[(2 =CF=80)/15] (ff[-1] - ff), -I Sqrt[(2 =CF=80)/15] (ff[-2] -
ff),
1/15 Sqrt[
=CF=80] (10 ff +
Sqrt (Sqrt ff[-2] - 2 ff + Sqrt ff))};

In your text you state ff[l][m] == ff[l][-m] (-1)^m

Simplify[tel,
Union[Cases[tel, ff[_][_], Infinity]] /.
ff[l_][m_] -> (ff[l][m] == ff[l][-m] (-1)^m)]

{(2/15)*Sqrt[Pi]*(5*ff +
2*Sqrt*ff), 0, (2/15)*Sqrt[Pi]*
(5*ff - Sqrt*(ff +
Sqrt*ff)), -2*Sqrt[(2*Pi)/15]*
ff, 0, (2/15)*Sqrt[Pi]*
(5*ff - Sqrt*ff +
Sqrt*ff)}

However, in your code you use ff[l][m] == Conjugate[ff[l][-m]]*(-1)^m)

Simplify[tel,
Union[Cases[tel, ff[_][_], Infinity]] /.
ff[l_][m_] -> (ff[l][m] == Conjugate[ff[l][-m]]*(-1)^m)]

{(2/15)*Sqrt[Pi]*(5*ff +
2*Sqrt*ff), (-I)*Sqrt[(2*Pi)/15]*
(ff[-1] + ff), (1/15)*Sqrt[Pi]*
(10*ff - Sqrt*(Sqrt*ff[-2] +
2*ff + Sqrt*ff)),
Sqrt[(2*Pi)/15]*(ff[-1] - ff),
(-I)*Sqrt[(2*Pi)/15]*(ff[-2] - ff),
(1/15)*Sqrt[Pi]*(10*ff +
Sqrt*(Sqrt*ff[-2] - 2*ff +
Sqrt*ff))}

% === tel

True

Bob Hanlon

On Fri, Jun 28, 2013 at 4:12 AM, Sune <sunenj at gmail.com> wrote:

> Hey all.
>
> I'm trying to get Mathematica to simplify a list of expressions involving
> complex symbolic variables with certain relations among them, and to take
> advantage of these relations while simplifying.
>
> To be more concrete, I could have a list such as
>
> tel={2/15 Sqrt[\[Pi]] (5 ff+2 Sqrt ff),-I Sqrt[(2
> \[Pi])/15] (ff[-1]+ff),1/15 Sqrt[\[Pi]] (10 ff-Sqrt
> (Sqrt ff[-2]+2 ff+Sqrt ff)),Sqrt[(2 \[Pi])/15]
> (ff[-1]-ff),-I Sqrt[(2 \[Pi])/15] (ff[-2]-ff),1/15
> Sqrt[\[Pi]] (10 ff+Sqrt (Sqrt ff[-2]-2 ff+Sqrt
> ff))}
>
> However, there's a conjugate symmetry among the variables ff[l][m] that
> would enable a simpler looking expression. Specifically, ff[l][m]=ff[l][-m]
> (-1)^m, and I would like to have Mathematica take advantage of that and
> reduce expressions such as
>
> I Sqrt[(2 \[Pi])/15] (ff[-1]+ff)
>
> to
>
> -Sqrt[(2 \[Pi])/15] 2*Im(ff)
>
>
> I've tried various combinations of ComplexExpand and FullSimplify;
>
> ComplexExpand[
>  FullSimplify[tel,
>   And @@ Flatten[
>     Table[ff[l][m] == Conjugate[ff[l][-m]]*(-1)^m, {l, 0, 4, 2}, {m,
>       0, l}]]], Flatten[Table[ff[l][m] , {l, 2, 4, 2}, {m, -l, l}]]]
>
> (And also version with the two outermost commands interchanged)
>  but it doesn't do what I want. Of course, it may be that the rules for
> simplify are such that my sought expression is not considered a simpler
> version of the same expression. Could that be the case? Otherwise, I'd
> appreciate any suggestions on how to implement relations such as these in
> manipulation of expressions.
>
> Thanks,
> Sune
>
>

```

• Prev by Date: Re: Integral Sum
• Next by Date: Russian Peasant Multiplication / was question on how to do this
• Previous by thread: Exploiting relationships in manipulations: example with conjugate relationship
• Next by thread: Re: Exploiting relationships in manipulations: example with conjugate relationship