# Why are polynomials (sometimes?) contained in the domain of the generator for brownian motion?

If I uderstand things correctly: when we consider the generator of a Feller process $$A$$, we have a domain $$\mathcal{D}(A) \subseteq C_0$$. So, the domain of the generator is always a subset of the continuous functions with compact support, however, I have seen several places where the generator is applied to function without compact support, more specifically $$f(x) = x$$, $$f(x) = x^2$$, $$f(x) = x^3$$, etc. For example, applying Dynkin's formula to show that $$W_t$$, $$W_t^2 - t$$, $$W_t^3 - 3 \int_0^t W_s ds$$ are martingales where $$W_t$$ is brownian motion. How exactly is this justified?

One thing I see mentioned quite often, is the generalized generator, which is defined as the function $$g$$ such that $$f(X_t) - f(X_0) - \int_0^tg(X_s)ds$$ is a martingale. And then we define the extended infinitesimal generator as $$Af := g$$. However, it is not clear as to why we can conclude that $$f(x) = x^n$$ are such generalized generators.