Can I permanently add add a method to the driver namespace?
Put this code into a Python file and place it into ~/.config/blender/2.78/scrips/startup/my_driver_stuff.py (replace ~/config/blender with %APPDATA%/Blender Foundation/Blender on Windows, and something along those lines on MacOS).

import bpy

@bpy.app.handlers.persistent
def setup_driver(*args):
    bpy.app.driver_namespace["x"] = x
bpy.app.handlers.load_post.append(setup_driver)
setup_driver()