I am trying to show that if $P$ is a pseudo-differential operator with symbol given by $p(x,\xi)$ i.e. the operator $$P:\mathcal S\rightarrow \mathcal S$$ defined by $$Pf(x)=\int_{\mathbb R^n}e^{ix\cdot \xi}p(x,\xi)\hat f(\xi )d\xi $$ then the formal adjoint of $P$ denoted by $P^*$ is also a pseudo-differential operator and I shall also calculate its asymptotic expansion.
Here's how I approached. Let $f,g\in \mathcal S$. Then we see that $$\langle Pf,g \rangle =\int _{\mathbb R^n} e^{ix\cdot \xi}p(x,\xi)\hat f (\xi)\bar g(x)d\xi dx = \int _{\mathbb R^n}\int _{\mathbb R^n}\int _{\mathbb R^n}e^{i(x-y)\cdot \xi}p(x,\xi)f(y)\bar g(x)dyd\xi dx$$ I want to write this last integral as $\displaystyle{\int_{\mathbb R^n}f(y)\left (\int _{\mathbb R^n}\int _{\mathbb R^n}e^{i(x-y)\cdot \xi}p(x,\xi)\bar g(x)dxd\xi \right )dy}$ but I cannot justify this step. Any help/hint would be appreciated.
Note: You may assume my symbols have compact $x$-support.
You cannot justify this for a general $p$. For example, if $p$ is a symbol of order 0, the quantity \begin{equation} \int _{\mathbb R^n}\int _{\mathbb R^n}\int _{\mathbb R^n}e^{i(x-y)\cdot \xi}p(x,\xi)f(y)\bar g(x)dyd\xi dx \end{equation} is not well defined. You can make your calculation work easily if (for example) $p \in \mathcal{S}(\mathbb{R}^d \times \mathbb{R}^d)$, and find the expression of $p^\ast$ in this case. For a more general $p$, you should read a course of microlocal analysis : you will be able to use the notion of oscillatory integral to justify properly those kinds of calculations.