Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 7
    $\begingroup$ You're not looking for Factor, but for Collect[expr, {a, b, c}]. $\endgroup$ Commented Mar 18, 2025 at 12:18
  • $\begingroup$ thank you so much @Domen $\endgroup$ Commented Mar 18, 2025 at 12:29
  • 1
    $\begingroup$ It seems you oversimplified your actual problem to the point of being trivial. Maybe it is better to update your question with the example in comments? $\endgroup$ Commented Mar 18, 2025 at 14:54
  • $\begingroup$ Personally, I like the question in its present form. As a question, it is not easy to find the answer in the docs, until someone points out, "Look up Collect[]", which to me is the purpose of this Q&A. Unless it's a duplicate, it seems to me a helpful Q&A to leave open. If the OP has a localized problem with a particular expression, it's probably better to ask separately, "How to use Collect[] to gather specific terms?" $\endgroup$ Commented Mar 18, 2025 at 15:38