Sine wave function as an input value?
Sure, why not. The # symbol in the input field tells blender that you are inserting scripted driver with no variables. Everything after # will be put into the driver's expression field.

You can get a list what functions are build-in by typing bpy.app.driver_namespace[' into the console and hitting CtrlSpace.

You can totally input #cos(frame*pi/20) to match the curve you provided in the question.