Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm having a problem with polynomials. Let's say I have a polynomial "2x^2 - 5x + 6 - 3x^2" .. How can I check that this expression is not simplified ? Additionally, I would like to locate the uncombined terms (2x^2 and -3x^2) and print them. I tried a lot of polynomial built-in functions, all of them simplify the expression before output.. For example,

MonomialList[2 x^2 - 5 x + 6 - 3 x^2]
{-x^2, -5 x, 6}

Is there any command to suppress automatic simplification ? Thanks.

share|improve this question
4  
List @@@ HoldForm[2 x^2 - 5 x + 6 - 3 x^2] or Cases[List @@@ HoldForm[2 x^2 - 5 x + 6 - 3 x^2], _ x^2, Infinity] –  Artes Feb 19 '13 at 12:39
    
Great, thanks Artes. –  John Feb 20 '13 at 12:07

1 Answer 1

Answered by Artes in a comment to the question.

You can use

List @@@ HoldForm[2 x^2 - 5 x + 6 - 3 x^2]

or

Cases[List @@@ HoldForm[2 x^2 - 5 x + 6 - 3 x^2], _ x^2, Infinity]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.