I have a very long expression which can be reduced down quite a lot if I define the following functions
F[x_] := Sqrt[π] x Exp[x^2] Erfc[x]
G[x_] := Sqrt[π] x Exp[x^2] Erf[x]
where the arguments $x$ that will appear are different (let's say $x1$, $x2$, $x3$...). The result is not a polynomial so I can't get Collect
to work. I know other people have asked about this but I tried what was suggested in the posts and I couldn't get it to work.
I thought that defining a rule like
Erfc[x] -> F[x]/(Sqrt[π] x Exp[x])
Erf[x] -> G[x]/(Sqrt[π] x Exp[x^2])
could help, but I didn't get it to work.
Blank
likeErf[x_] -> G[x]/(Sqrt[\[Pi]] x Exp[x^2])
, so e.g.a^2/Erf[a] /. Erf[x_] -> G[x]/(Sqrt[\[Pi]] x Exp[x^2])
will give(a^3 E^a^2 Sqrt[\[Pi]])/G[a]
. $\endgroup$