Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.9K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Transform an expression to a certain form?

Attachments:
POSTED BY: J P
3 Replies

Many Thanks exactly what i was looking for!

POSTED BY: J P
e = (5 Sqrt[2/3] a^2 a[2] a[4])/(3 Sqrt[a^2 + g^2]) - (
   5 Sqrt[2/3] g^2 a[2] a[4])/(3 Sqrt[a^2 + g^2]) - (
   2 Sqrt[2/3] a g \[Pi] Sqrt[(a^2 + g^2) (4 g^2 + \[Pi]^2)]
     a[3] a[5])/((a^2 + g^2) (4 g^2 + \[Pi]^2)) - (a^2 a[6])/re - (
   g^2 a[6])/re - (\[Pi]^2 a[6])/(3 re) + (a a[1] a[7])/Sqrt[6] + (
   Sqrt[3/2] g \[Pi] a[1] a[8])/Sqrt[4 a^2 + 4 g^2 + \[Pi]^2] + (
   a a[7] a[9])/Sqrt[6] + (Sqrt[3/2] g \[Pi] a[8] a[9])/Sqrt[
   4 a^2 + 4 g^2 + \[Pi]^2];

Separate out the a variables (but not a itself) and use Collect:

avars = Cases[Variables[e], _a];
Collect[e, avars]

((5 Sqrt[2/3] a^2)/(3 Sqrt[a^2 + g^2]) - (5 Sqrt[2/3] g^2)/(
    3 Sqrt[a^2 + g^2])) a[2] a[4] - (
 2 Sqrt[2/3] a g \[Pi] Sqrt[(a^2 + g^2) (4 g^2 + \[Pi]^2)]
   a[3] a[5])/((a^2 + g^2) (4 g^2 + \[Pi]^2)) + (-(a^2/re) - g^2/
    re - \[Pi]^2/(3 re)) a[6] + 
 a[1] ((a a[7])/Sqrt[6] + (Sqrt[3/2] g \[Pi] a[8])/Sqrt[
    4 a^2 + 4 g^2 + \[Pi]^2]) + (a a[7] a[9])/Sqrt[6] + (
 Sqrt[3/2] g \[Pi] a[8] a[9])/Sqrt[4 a^2 + 4 g^2 + \[Pi]^2]
POSTED BY: Daniel Lichtblau

enter image description here

POSTED BY: S M Blinder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard