Let $f\in \mathcal{S}(\mathbb{R}^2)$, space of Schwartz functions on $\mathbb{R}^2$ and define $$g(x)=\int_\mathbb{R} f(x,y) h(y) dy,$$ where $h$ is a compactly supported continuous function on $\mathbb{R}.$
Is it true that $g\in\mathcal{S}(\mathbb{R})$?
Sure $\sup_y |f(x,y)|$ is rapidly decreasing as $x\to \infty$ so $g$ is rapidly decreasing, and the same holds for $\partial_x^n g(x)=\int_\Bbb{R} \partial_x^n f(x,y) h(y)dy$ as $\partial_x^n f(x,y)$ is Schwartz.
The same is true whenever $h$ is a tempered distribution: $\lim_{x\to \infty} x^k \partial_x^n f(x,.)$ converges to $0$ in $S(\Bbb{R})$ so $\lim_{x\to \infty} x^k \partial_x^n g(x)=0$.