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