You can use symbolic evaluation and the factor keyword to factor a polynomial.
You can set variable x to a numeric value and then use symbolic evaluation to evaluate the polynomial.
Factoring a different polynomial now also returns a numeric result because variable x is no longer an unknown.
You can use the clear function to free up variable x by clearing its assigned numerical value.
As an alternative to using the clear function, you can add the explicit modifier after the expand keyword to temporarily suppress the numerical value of variables for the current symbolic evaluation.