import sympy x = sympy.symbols('x') f = x**2 + 1
from sympy import Function, Symbol x = Symbol('x') f = Function('f') g = Function('g')(x)