Let $N$ be a large integer and $I = [aN, bN]$ for some $0 < a < b < 1$. Denote by $\chi_I(x) = 1$ if $x \in I$, $0$ otherwise. I was wondering if there exists a smooth function $w$ with the property that $w (x) = \chi_I(x)$ if $x \in I$ or $\operatorname{dist}(x,I)>1/2$ and
$$
\int_{\mathbb{R}} |w^{(n)}(x)| dx \leq C_n
$$
for all $n \geq 1$, $C_n$ is a positive constant that depends only on $n$.
$w^{(n)}$ is the $n$th derivative of $w$.
I am not sure if such function exists, but any comments are appreciated
I have a sum of the form $\sum_{m \in I} f(m)$ for some $f$ and was hoping to replace the sum with $\sum_{m \in \mathbb{Z}} w(m) f(m)$.