In analytic number theory we like to weigh our counting functions with a smooth function $f$, so that we may apply Poisson's summation formula and take advantage of Fourier transforms. Typically the weight function $f$ will be a Schwartz type function with the following properties: 


1) $f(x) \geq 0 $ for all $x \in \mathbb{R}$; 


2) $f(x) = 1$ for $x \in [-X,X]$ say; 


3) $f(x) = 0$ for $|x| > X + Y$; and


4) $f^{(j)}(x) \ll\_j Y^{-j}$ for $j \geq 0$. 


In most applications the dependence on $j$ in the last condition does not matter, since $j$ would be bounded. However, in a problem I am considering it might be worthwhile to make $j$ a (slow growing) function of $X$ so it then becomes relevant to know how the bound depends on $j$. Is it possible to give an explicit example of a function $f$ satisfying the above properties for which the dependence can be made explicit?



A question about Schwartz-type functions used in analytic number theory
The answer to your question is yes, and it is a pretty well-understood topic.


First of all $X$ is more or less irrelevant for the bounds in 4) so let us take $X = Y$, say, for convenience.


Second, we can always scale everything down by $Y$. So without loss of generality $Y = 1$.


Put $g = f'$. Let us also for simplicity assume that $f$ is symmetric so it is enough to study $g$ on $[1, 2]$. The problem therefore is reduced to the following: for which sequences $t\_j$ we can find a function $g$ such that $g = 0, x\notin [1, 2]$, $\int g = 1$ and $|g^{j}(x)|\le C t\_j$ for some constant $C$.


The answer to this question in more or less full generality is given by the [Denjoy-Carleman Theorem](https://en.wikipedia.org/wiki/Quasi-analytic_function): if the sequence $M\_j = \frac{t\_j}{j!}$ is logarithmically convex (i.e. $\frac{M\_{j+1}}{M\_j}$ is increasing in $j$) then such a function exists if and only if $\sum\_j \frac{1}{jM\_j^{1/j}} < \infty$. For example there exists a function $f$ such that 
\begin{equation}\label{bound}
|f^{(j)}(x)| \le CY^{-j}j^{(1+\varepsilon)j}
\end{equation}
for any fixed $\varepsilon > 0$ (this is related to the so-called Gevrey classes).


Actually, since you mentioned Fourier transform, let me write about a different result which is more directly applicable to this type of problems: Beurling-Malliavin multiplier theorem. It reads as follows:


Let $w:\mathbb{R}\to \mathbb{R}$ be a nonnegative Lipshitz function (this is a small technical condition). Then there exists a nonzero compactly supported function $f$ with $|\hat{f}(\xi)| \le e^{-w(x)}$ if and only if integral


$$\int\_\mathbb{R} \frac{w(x)}{x^2 + 1}dx$$


is convergent. Moreover, support of the function can be arbitrary small.


Lastly, if you want an explicit function $g$ (and therefore $f$), satisfying the above bound, you can take


$$g(x) = e^{-(1-x)^{-m}}e^{-(x+1)^{-m}}\chi\_{(-1, 1)},$$


see e.g. [this](https://arxiv.org/abs/1502.04404) paper, section 3.1.


