4
$\begingroup$

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.

$\endgroup$
1
  • 4
    $\begingroup$ 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] $\endgroup$ Commented Feb 19, 2013 at 12:39

1 Answer 1

2
$\begingroup$

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] 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.