Skip to main content
added 1393 characters in body
Source Link
Morgan
  • 595
  • 2
  • 11

Here is my issue. I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Edit: My original product which I want to expand and group is as follows:

Exprpos[x_] = (-(1/2)*Cos[a]*Cos[x^2/2] + (1/2)*Sin[a]*
      Sin[x^2/2])*(Sqrt[b]*x*Cos[a]*FresnelC[x/Sqrt[b]] - (1/2)*
       Sqrt[b]*Cos[a]*x - 
      Sqrt[b]*Sin[a]*x*FresnelS[x/Sqrt[b]] + (1/2)*Sqrt[b]*Sin[a]*x - 
      Cos[a]*Sin[x^2/2] - Sin[a]*Cos[x^2/2] + Sin[a])^2 - (Cos[a]*
      Sin[x^2/2] + 
     Sin[a]*Cos[x^2/2])*((1/2)*b*Cos[a]*Cos[a]*FresnelC[x/Sqrt[b]]*
      FresnelC[x/Sqrt[b]] - (1/2)*b*Cos[a]*Cos[a]*
      FresnelC[x/Sqrt[b]] + (b/8)*Cos[a]*Cos[a] + (1/2)*b*Sin[a]*
      Sin[a]*FresnelS[x/Sqrt[b]]*FresnelS[x/Sqrt[b]] - (1/2)*b*Sin[a]*
      Sin[a]*FresnelS[x/Sqrt[b]] + (b/8)*Sin[a]*Sin[a] - 
     Sqrt[b]*Sin[a]*Sin[a]*x*FresnelC[x/Sqrt[b]] - 
     b*Sin[a]*
      Cos[a] (FresnelS[x/Sqrt[b]]*FresnelC[x/Sqrt[b]] - (1/2)*
         FresnelS[x/Sqrt[b]] - (1/2)*
         FresnelC[x/Sqrt[b]] + (1/4)) + (1/2)*Sqrt[b]*Sin[a]*Sin[a]*
      x - Sin[a]*Cos[2 a]*Cos[x^2/2] + Sin[a]*Sin[2 a]*Sin[x^2/2] + 
     Sin[a]*Cos[2 a] - 
     Sqrt[b]*Sin[a]*Cos[a]*x*FresnelS[x/Sqrt[b]] + (1/2)*Sqrt[b]*
      Sin[a]*Cos[a]*x + (1/2)*Cos[2*a] Sin[x^2] + (1/2)*
      Sin[2*a] Cos[x^2] - (1/2)*Sin[2*a] - 
     Sqrt[b/2]*Cos[2*a]*x*FresnelC[Sqrt[2/b] x] + (1/2)*Sqrt[b/2]*
      Cos[2 a]*x + 
     Sqrt[b/2]*Sin[2*a]*x*FresnelS[Sqrt[2/b] x] - (1/2)*Sqrt[b/2]*
      Sin[2 a]*x)

Here is my issue. I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Here is my issue. I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Edit: My original product which I want to expand and group is as follows:

Exprpos[x_] = (-(1/2)*Cos[a]*Cos[x^2/2] + (1/2)*Sin[a]*
      Sin[x^2/2])*(Sqrt[b]*x*Cos[a]*FresnelC[x/Sqrt[b]] - (1/2)*
       Sqrt[b]*Cos[a]*x - 
      Sqrt[b]*Sin[a]*x*FresnelS[x/Sqrt[b]] + (1/2)*Sqrt[b]*Sin[a]*x - 
      Cos[a]*Sin[x^2/2] - Sin[a]*Cos[x^2/2] + Sin[a])^2 - (Cos[a]*
      Sin[x^2/2] + 
     Sin[a]*Cos[x^2/2])*((1/2)*b*Cos[a]*Cos[a]*FresnelC[x/Sqrt[b]]*
      FresnelC[x/Sqrt[b]] - (1/2)*b*Cos[a]*Cos[a]*
      FresnelC[x/Sqrt[b]] + (b/8)*Cos[a]*Cos[a] + (1/2)*b*Sin[a]*
      Sin[a]*FresnelS[x/Sqrt[b]]*FresnelS[x/Sqrt[b]] - (1/2)*b*Sin[a]*
      Sin[a]*FresnelS[x/Sqrt[b]] + (b/8)*Sin[a]*Sin[a] - 
     Sqrt[b]*Sin[a]*Sin[a]*x*FresnelC[x/Sqrt[b]] - 
     b*Sin[a]*
      Cos[a] (FresnelS[x/Sqrt[b]]*FresnelC[x/Sqrt[b]] - (1/2)*
         FresnelS[x/Sqrt[b]] - (1/2)*
         FresnelC[x/Sqrt[b]] + (1/4)) + (1/2)*Sqrt[b]*Sin[a]*Sin[a]*
      x - Sin[a]*Cos[2 a]*Cos[x^2/2] + Sin[a]*Sin[2 a]*Sin[x^2/2] + 
     Sin[a]*Cos[2 a] - 
     Sqrt[b]*Sin[a]*Cos[a]*x*FresnelS[x/Sqrt[b]] + (1/2)*Sqrt[b]*
      Sin[a]*Cos[a]*x + (1/2)*Cos[2*a] Sin[x^2] + (1/2)*
      Sin[2*a] Cos[x^2] - (1/2)*Sin[2*a] - 
     Sqrt[b/2]*Cos[2*a]*x*FresnelC[Sqrt[2/b] x] + (1/2)*Sqrt[b/2]*
      Cos[2 a]*x + 
     Sqrt[b/2]*Sin[2*a]*x*FresnelS[Sqrt[2/b] x] - (1/2)*Sqrt[b/2]*
      Sin[2 a]*x)
Tweeted twitter.com/StackMma/status/791251763886223360
Grammar, tags
Source Link
Michael E2
  • 262.2k
  • 21
  • 371
  • 838

hereHere is my issue,. I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (aa, bb are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Regards!

here is my issue, I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Regards!

Here is my issue. I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

added 30 characters in body
Source Link
Feyre
  • 8.7k
  • 2
  • 30
  • 48

here is my issue, I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[]Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[]Group[] only works for polynomials. Any help is appreciated.

Regards!

here is my issue, I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Regards!

here is my issue, I am posting because I did not find a direct answer anywhere. I have a bunch of terms which I obtain by Expand[] of a product. The result contains terms like (a, b are const):

0.5 b x^2 Cos[a]^3 Cos[x^2/2] FresnelC[x/Sqrt[b]]

Sqrt[b] x Cos[a]^2 Cos[x^2/2]^2 FresnelC[x/Sqrt[b]] Sin[a]

0.5 Cos[a] Cos[x^2/2]^3 Sin[a]^2

Cos[a]^2 Sin[a] Sin[x^2/2]

and so on - you get the idea (hopefully). For each of these (and the rest - there are ~200 terms altogether) there are a few of them with different coefficients. I want to gather terms with identical x-dependence together, but Group[] only works for polynomials. Any help is appreciated.

Regards!

Source Link
Morgan
  • 595
  • 2
  • 11
Loading