sympy define function of symbols code example
Example 1: sympy function definition
from sympy import Function, Symbol
x = Symbol('x')
f = Function('f')
g = Function('g')(x)
Example 2: sympy function definition
import sympy
x = sympy.symbols('x')
f = x**2 + 1