Question: Test of Rational Roots in Maple?

I'm trying to create a routine to perform the test of rational roots , but I'm having some problems. Below is the routine I created :

But the program is only printing " aux = -24 " . I don't know what it can be .

I need to modify my code , but I don't know where. Can someone help me? Thank you!

Please Wait...