# Using assumptions when calling Simplify from Collect

I am quite new to Mathematica, so please be patient ;)

I have a very long equation that I have to sort for powers of a variable called e and that I want to simplify. So I call

Collect[equation,e,Simplify]


But in the factors of e^k there are a lot of square roots and powers of variables, terms like $\frac{1}{\sqrt{g}} g^{\frac{1}{2}}$, that don't get simplified unless I pass the assumption g > 0 to Simplify. But how can I pass this assumption if Simplify is called from within Collect? Or is there a totally different way to achieve this?

Thx

Stefan

• Try: Simplify[Collect[equation, e], Assumptions -> g > 0] – David G. Stork Dec 21 '14 at 10:50
• You can replace Simplify with Simplify[#, Assumptions -> g > 0] & or use \$Assumptions. – Karsten 7. Dec 21 '14 at 10:54
• @Karsten7. I tried that out but aborted the evaluation after one hour. When I runned Collect with Simplify before it took around 10 minutes. I solved the problem now with Assuming[g>0,Collect[equation,e,Simplify]]. Thanks for the fast answers!!! – Stefan Dec 21 '14 at 13:38
• You could post a part of your equation together with your solution to this problem and a comparison with the other approaches suggested as a self answer. You can use AbsoluteTiming to quantify the computation time. – Karsten 7. Dec 22 '14 at 0:05