Is it possible that L depends on x, y, and t and two funcs are given, one for x and t and the other for y and t? If so, a set of all f.free_symbols should be built to test against the vars rather than testing each function separately: func_vars = reduce(set.union, [f.free_symbols for f in funcs], set()) or code to that effect. Then check vars against func_vars.  (Sorry if this is well known by those in the know -- I'm not one of them.)