Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Exploiting relationships in manipulations: example
Replies: 4   Last Post: Jun 29, 2013 4:51 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 906
Registered: 10/29/11
Re: Exploiting relationships in manipulations: example
Posted: Jun 29, 2013 4:46 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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


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[0][0] +
2*Sqrt[5]*ff[2][0]), 0, (2/15)*Sqrt[Pi]*
(5*ff[0][0] - Sqrt[5]*(ff[2][0] +
Sqrt[6]*ff[2][2])), -2*Sqrt[(2*Pi)/15]*
ff[2][1], 0, (2/15)*Sqrt[Pi]*
(5*ff[0][0] - Sqrt[5]*ff[2][0] +
Sqrt[30]*ff[2][2])}


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[0][0] +
2*Sqrt[5]*ff[2][0]), (-I)*Sqrt[(2*Pi)/15]*
(ff[2][-1] + ff[2][1]), (1/15)*Sqrt[Pi]*
(10*ff[0][0] - Sqrt[5]*(Sqrt[6]*ff[2][-2] +
2*ff[2][0] + Sqrt[6]*ff[2][2])),
Sqrt[(2*Pi)/15]*(ff[2][-1] - ff[2][1]),
(-I)*Sqrt[(2*Pi)/15]*(ff[2][-2] - ff[2][2]),
(1/15)*Sqrt[Pi]*(10*ff[0][0] +
Sqrt[5]*(Sqrt[6]*ff[2][-2] - 2*ff[2][0] +
Sqrt[6]*ff[2][2]))}


% === tel


True



Bob Hanlon




On Fri, Jun 28, 2013 at 4:12 AM, Sune <sunenj@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[0][0]+2 Sqrt[5] ff[2][0]),-I Sqrt[(2
> \[Pi])/15] (ff[2][-1]+ff[2][1]),1/15 Sqrt[\[Pi]] (10 ff[0][0]-Sqrt[5]
> (Sqrt[6] ff[2][-2]+2 ff[2][0]+Sqrt[6] ff[2][2])),Sqrt[(2 \[Pi])/15]
> (ff[2][-1]-ff[2][1]),-I Sqrt[(2 \[Pi])/15] (ff[2][-2]-ff[2][2]),1/15
> Sqrt[\[Pi]] (10 ff[0][0]+Sqrt[5] (Sqrt[6] ff[2][-2]-2 ff[2][0]+Sqrt[6]
> ff[2][2]))}
>
> 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[2][-1]+ff[2][1])
>
> to
>
> -Sqrt[(2 \[Pi])/15] 2*Im(ff[2][1])
>
>
> 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
>
>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.