SimpleFunction: Order of factors matters for some reason?

I’m creating an activity on solving polynomials of higher degrees by factoring. I want them to enter and check their factoring before entering their solutions/roots.

Some of the teachers in my department teach factoring x^{2}+4 into (x+2i)(x-2i). I don’t do this, but I wanted it to be inclusive and usable by those teachers.

On Slide 1, which I’m currently working on, it will accept that factorization but only if (x+i\sqrt{2}) comes before (x-i\sqrt{2}).

I’m at a loss as to why it’s acting that way.

Thanks for any suggestions!

You are bumping into the limitations of finding exact values using the CL. The calculated values are really close, but not exactly the same depending on the order of the factors. My guess is the sqrt(2) is throwing it off.
Here is a quick but not really elegant solution using a set tolerance for the answer:

OK, that makes sense.

Thank you for the suggestion!