Polynomial Term Rate of Change - Coding problem | OneNoughtOne