Using a mathematical function in graph editor?

Yes, by using F-curve modifiers. Select your F-curve then press N on keyboard to open the properties panel:


This example shows the built-in sine function. The Generator option allows definition of a custom function like the damped sine.