Let $\{U_i\}_{i\in I}$ be a locally finite collection of open subsets of $\mathbb{R}^n$, $K_i\subseteq U_i$ compact subsets, $\epsilon_i>0$ positive real numbers and a nonnegative natural number $k$.
Let now $K$ be another compact subset of $\mathbb{R}^n$. Since the collection is locally finite, $K$ intersects only finitely many of the $U_i$ nontrivially, let's say these are $U_1,...,U_n$.
Let $f\colon\mathbb{R}^n\rightarrow\mathbb{R}$ be a smooth function (all partial derivatives of all order exists and are differntiable) such that $\frac{\partial^{|\alpha|}}{\partial x^\alpha}f(x)<\epsilon_i$ for all $x\in K_i$, $i\in\{1,...,n\}$ and all multiindices $\alpha$ of order $|\alpha|\le k$, e.g. all partial derivatives of $f$ up to order $k$ are $\epsilon_i$-bounded in the compact subsets, which might intersect $K$.
Is there a smooth function $f'\colon\mathbb{R}^n\rightarrow\mathbb{R}$ for which the condition above does hold for all $i\in I$ and which agrees with $f$ on $K$?
My attempt was the following:
Choose a bump function $\delta\colon \mathbb{R}^n\rightarrow (0,\infty)$ which is $1$ on a neighborhood of $K$ and $0$ outside a small compact subset $L$ which includes $K$ and try $f'=\delta f$, but that seemed not to work out since a couldn't control the partial derivatives of the bump function in the area where it goes from $1$ to $0$.
No, this doesn't work in the stated generality. Let's take $n=1$ (one dimension) for simplicity, $k=2$, and $f(x)=x$. Consider these compact sets and corresponding $\epsilon$s:
Let $K=[0,0.98]$. This set intersects only $U_1$. Clearly, $f$, $f'$ and $f''$ are bounded by $\epsilon_1$ on $K_1$.
For the extension to satisfy the condition on $K_2$, it needs to have very small first derivative, among other things. But for the first derivative to drop from $1$ to $0.01$ within the interval $[0.98,1]$, the second derivative must be large, $\approx 50$. This would violate the restriction imposed by $\epsilon_1$ on $K_1$.