If you're checking for dependence in the calculus sense, you should always use free_symbols instead of has or atoms(Symbol) because it does the right thing if x is a dummy variable.