I want to allow a user to input a function like "5x^4-3x^2+12x-6" and I want to be able to use that function, i.e. input values and things like that.

Right now I have it set up piece wise, as in enter the first coefficient etc. and I can get the function to display but I don't know how to get it to work as a function.