Program to derive and simplify a function f(x).