Is it a factor of a polynomial?

Pyth - 39 bytes

This is a monstrous combination of regexp and eval. I like the approach, but will try to improve the implementation.

It uses the Polynomial Remainder Theorem.

K_sPe:z"-|\+"3!v.ssXPtw,\^\x,"**""*K"\*

Doesn't work online because of eval use.


Casio Basic, 19 bytes

judge(mod(b,a)=0

As it turns out, the fx-CP400 can do mod on algebraic expressions!

Polynomial and factor should be entered as expressions. 16 bytes for the code, 3 bytes to enter a,b into the parameter value box.