A function to calculate simple functions derivatives. Polynomials only.