It is from Stein's Real Analysis, Chapter 5, Exercise 15.
Suppose $f\in L^2(\mathbb R^d)$. Prove that there exists $g\in L^2(\mathbb R^d)$ such that $$\left(\frac{\partial}{\partial x}\right)^\alpha f(x)=g(x)$$ in the weak sense, if and only if $$(2 \pi i\xi)^\alpha \hat{f}(\xi)=\hat{g}(\xi)\in L^2(\mathbb R^d).$$
In the book, $\left(\frac{\partial}{\partial x}\right)^\alpha f(x)=g(x)$ in the weak sense means $$(g,\phi)=(f,(-1)^{|\alpha|} \left(\frac{\partial}{\partial x}\right)^\alpha \phi),~~\phi \in C_0^\infty(\mathbb R^d),$$ where $C_0^\infty(\mathbb R^d)$ means smooth with compact support.
I think I have a solution after search some notes.
See Lemma 23,
See Lemma 2.16.
Let $L=\left(\frac{\partial}{\partial x}\right)^\alpha$ and $L^*=(-1)^{|\alpha|} \left(\frac{\partial}{\partial x}\right)^\alpha$.
(1) $(2 \pi i\xi)^\alpha \hat{f}(\xi)=\hat{g}(\xi)\in L^2(\mathbb R^d)\implies Lf=g$.
$$ \begin{align} &(g(x),\phi(x))\\ =&(\hat g(\xi),\hat \phi(\xi)) =((2 \pi i\xi)^\alpha \hat{f}(\xi),\hat \phi(\xi)) =( \hat{f}(\xi), (-2 \pi i\xi)^\alpha \hat \phi(\xi))\\ =&(f(x),L^* \phi(x)),\quad \forall \phi \in C_0^\infty(\mathbb R^d). \end{align}$$
(2) Assume $ Lf=g$.
From $Lf=g$, we know that $$(g(x),\phi(x))=(f(x),L^*\phi(x)),\quad \forall \phi \in C_0^\infty(\mathbb R^d).$$ Take fourier transform, we have $$(\hat g(\xi),\hat \phi(\xi))=(\hat f(\xi),\widehat{ L^*\phi}(\xi)).$$ With $\widehat{ L^*\phi}(\xi)=(-1)^{|\alpha|}(2\pi i\xi)^\alpha \hat \phi(\xi)$, we obtain $$\int_{\mathbb R^d} \hat g(\xi) \overline{\hat \phi(\xi) }d\xi=\int (2\pi \xi)^\alpha f(\xi) \overline{\hat \phi(\xi)}d \xi,$$ that is $$\int_{\mathbb R^d} h(\xi)\overline{ \hat \phi(\xi) } d\xi=0,\quad \forall \phi\in C_0^\infty(\mathbb R^d),$$ with $h(\xi)=g(\xi)-(2\pi \xi)^\alpha f(\xi)$.
Our goal is to show $h=0$.
(3) For any $\psi \in S(\mathbb R^d)$, there exist $\phi_n \in C_0^\infty(\mathbb R^d)$ such that $\phi_n\to \psi$ and $\left(\frac{\partial}{\partial x}\right)^\alpha \phi_n\to \left(\frac{\partial}{\partial x}\right)^\alpha\psi$ in $L^2(\mathbb R^d)$. (See Lemma 23 in the first note)
Let $\eta\in C_0^\infty (\mathbb R^d)$ with $\eta(x)=1$ near $0$. Take $\phi_n(x)=\psi(x)\eta(\frac{x}{n})\in C_0^\infty(\mathbb R^d)$. Then $$\frac{\partial}{\partial x_k} \phi_n(x)= \frac{\partial}{\partial x_k}\psi(x) \cdot \eta(\frac{x}{n})+ \frac{1}{n}\psi(x)\cdot \frac{\partial}{\partial x_k}\eta(\frac{x}{n}).$$ By dominated convergence theorem, with $M=\max \{ \frac{\partial}{\partial x_k}\eta(x),\eta(x)\}$, we have $$|\frac{\partial}{\partial x_k}\psi(x) \cdot \eta(\frac{x}{n})|\leq M |\frac{\partial}{\partial x_k}\psi(x)|,\quad \frac{\partial}{\partial x_k}\psi(x) \cdot \eta(\frac{x}{n})\to \frac{\partial}{\partial x_k}\psi(x) ~\text{pointwise},$$ which implies $$\frac{\partial}{\partial x_k}\psi(x) \cdot \eta(\frac{x}{n})\to \frac{\partial}{\partial x_k}\psi(x)\in L^2(\mathbb R^d).$$ For the same reason, $$\frac{1}{n}\psi(x)\cdot \frac{\partial}{\partial x_k}\eta(\frac{x}{n})\to 0\in L^2(\mathbb R^d).$$ This shows the first order partial derivative. And the higher order cases follow for the same reason.
(4) Use (3), we can have $(g(x),\psi(x))=(f(x),L^*\psi(x)),\quad \forall \psi \in S(\mathbb R^d).$
$$\begin{align} &(g(x),\psi(x))=\lim (g(x),\phi_n(x))\\ =&\lim (f(x), L^* \phi_n(x))=\lim(f(x), (-1)^{|\alpha|} \left(\frac{\partial}{\partial x}\right)^\alpha \phi_n(x))\\ =&(f(x), (-1)^{|\alpha|} \left(\frac{\partial}{\partial x}\right)^\alpha \psi(x)). \end{align}$$ The similar to (2), we have $$\int_{\mathbb R^d} h(\xi)\overline{ \hat \psi(\xi) } d\xi=0,\quad \forall \psi\in S(\mathbb R^d).$$ Note that the fourier transform is a bijection on $S(\mathbb R^d)$, we have $$\int_{\mathbb R^d} h(\xi)\overline{ \psi(\xi) } d\xi=0,\quad \forall \psi\in S(\mathbb R^d).$$
(5) $h=0$.
Take any bounded open set $O$. We have $C_0^\infty(O)\subseteq S(R^d)$ and $$\int_O h(\xi)\overline{ \phi(\xi) } d\xi=0 \quad \forall \phi\in C_0^\infty(O).$$ Note that $h(\xi)\chi_O(\xi)\in L^2(O)$ and $C_0^\infty(O)$ is dence in $L^2(O)$, we have $$(h(\xi),\psi(\xi))_{L^2(O)}=0,\quad \forall \psi \in L^2(O),$$ which implies $h(\xi)\chi_O(\xi)$ is zero almost everywhere.