I want to ask a user to enter a function:
function = input('Input expression: ') # x**2 + 1 or cos(x)
I want to be able to evaluate this function, for example f(1). I want to compute the derivative f', such that again, i can do f'(0) for example. There are several ways to do this, but I also need to calculate the derivative f' and be able to evaluate it as well, e.g. f'(0). I do not know how to do so that from an expression (string) I can evaluate it, calculate its derivative and also be able to evaluate it.