On infinitesimal generator when the volatility of Brownian motion is given as a function of time Consider standard Brownian motion.
$dS_t=\mu\space d_t+\sigma\space dB_t$
For the process, the operator are given below.
$Af(x)=\mu \frac{df}{ds}+\frac{\sigma^2}{2}\frac{d^2f}{ds^2}+\frac{df}{dt}$
I would like to consider the case where σ is a function of time,for example $\sigma(t)=cos(t)$
so,the brownian motion become,
$dS_t=\mu\space d_t+\sigma(t)\space dB_t$
In this case,Is it ok to think that the operator become the following?
$Af(x)=\mu \frac{df}{ds}+\frac{\sigma(t)^2}{2}\frac{d^2f}{ds^2}+\frac{df}{dt}$
 A: The answer to your question is yes (more or less). The short answer as to why is "because of Ito's lemma". A much more detailed explanation is given below, which I highly recommend taking the time to read and understand.
Assumption. $\sigma : [0, \infty) \rightarrow \mathbb{R}$ is a continuous function of time.
Let $f$ be any twice-continuously differentiable and compactly supported real-valued function.
The infinitesimal generator at time $t$ (as applied to $f$) is defined as
$$
\mathcal{A}_{t}f(x)=\lim_{h\downarrow0}\frac{\mathbb{E}\left[f(X_{t+h}^{t,x})\right]-f(x)}{h}
$$
where the process $X^{t,x}$ satisfies the SDE you wrote down:
$$
X_{s}=x+\int_{t}^{s}\mu dr+\int_{t}^{s}\sigma(r)dB_{r}\qquad\text{for }s \geq t.
$$
Use Ito's lemma on $f$ to get
$$
f(X_{t+h}^{t,x})-f(x)=\int_{t}^{t+h}\mu\frac{\partial f}{\partial x}(X_{s}^{t,x})+\frac{(\sigma(s))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(X_{s}^{t,x})ds+\int_{t}^{t+h}\sigma(s)\frac{\partial f}{\partial x}(X_{s}^{t,x})dB_{s}.
$$
Take expectations of both sides to get
$$
\mathbb{E}\left[f(X_{t+h}^{t,x})\right]-f(x)=\mathbb{E}\left[\int_{t}^{t+h}\mu\frac{\partial f}{\partial x}(X_{s}^{t,x})+\frac{(\sigma(s))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(X_{s}^{t,x})ds\right]
$$
where we have used the fact that the expectation of the Ito integral is zero.
Using the mean value theorem for integrals we get
$$
\int_{t}^{t+h}\mu\frac{\partial f}{\partial x}(X_{s}^{t,x})+\frac{(\sigma(s))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(X_{s}^{t,x})ds=h\left(\mu\frac{\partial f}{\partial x}(X_{c}^{t,x})+\frac{(\sigma(c))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(X_{c}^{t,x})\right)
$$
where $c\equiv c(\omega)$, which depends on the sample path $\omega$, is a point between $t$ and $t+h$.
Since $f$ is compactly supported, the dominated convergence theorem gives
$$
\lim_{h\downarrow0}\frac{\mathbb{E}\left[f(X_{t+h}^{t,x})\right]-f(x)}{h}=\mathbb{E}\left[\lim_{h\downarrow0}\left\{ \mu\frac{\partial f}{\partial x}(X_{c}^{t,x})+\frac{(\sigma(c))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(X_{c}^{t,x})\right\} \right].
$$
Using continuity and the facts that $\sigma(c)\rightarrow \sigma(t)$ and $X_{c}\rightarrow x$ as $h \downarrow 0$ we can take the limit to conclude
$$
\mathcal{A}_tf(x)=\mu\frac{\partial f}{\partial x}(x)+\frac{(\sigma(t))^{2}}{2}\frac{\partial^{2}f}{\partial x^{2}}(x).
$$
