That is, the function is on an interval $f:[a,b]\rightarrow\mathbb{R}$ and smooth; and at the boundaries of the interval $(a,b) \in\mathbb{R}$, all $f^{(m)}(a)$ and $f^{(m)}(b)$ are known for $0<m<n$.
I would like a function that uniformly approximates $f$ on the interval $[a,b]$ and obeys the above boundary conditions.
I imagine this can be done with a polynomial if I require that $f$ is not "rapidly oscillating", but am otherwise not clear on how to construct one explicitly in general.
In the most generic framework, let your constraints be $f(a) = a_0, f'(a) = a_1, \ldots f^{(m)}(a) = a_m$ and similarly for $b_0, \ldots, b_m$. You have $2m+2$ constraints, so you need a polynomial of order $2m+1$. Consider
$$\begin{split} p(x) &= \sum_{k=0}^{2m+1} c_k x^k\\ p'(x) &= \sum_{k=1}^{2m+1} k c_k x^{k-1}\\ \ldots\\ p^{(m)}(x) &= \sum_{k=1}^{2m+1} \frac{k!}{(k-m)!} c_k x^{k-m+1} \end{split} $$
and now enforcing $p(a) = a_0, p(b) = b_0, \ldots$ gives you a system of $2m+2$ equations in $2m+2$ variables $\{c_k\}_{k=0}^{2m+1}$.
Example
Take something simple, like $m=1$ with $a_0,a_1,b_0,b_1$. We will fit it with a 3rd degree polynomial $p(x) = c_3 x^3 +c_2 x^2 + c_1 x + c_0$.
Now $p'(x) = 3c_3 x^2 + 2c_2 x + c_1$ and we have 4 equations: $p(a) = a_0, p'(a) = a_1, p(b) = b_0, p'(b)=b_1$ which can be solved for the correct values of $\{c_k\}_{k=0}^3$.
Here is the actual system: $$ \left[ \begin{matrix} a^3 & a^2 & a & 1 \\ b^3 & b^2 & b & 1 \\ 3a^2 & 2a & 1 & 0 \\ 3b^2 & 2b & 1 & 0 \end{matrix} \right] \left[ \begin{matrix} c_3\\ c_2 \\ c_1 \\ c_0 \end{matrix} \right] = \left[ \begin{matrix} a_0 \\ b_0 \\ a_1 \\ b_1 \end{matrix} \right] . $$