# Can I find an infinitely differentiable function of of bounded moments closest to triangle wave?

Based on this question regarding existance of closest function in Schwarz class, where answer was negative. What if we add a new constraint. Not only infinitely differentiable compact support but with simultaneously bounded moments: $$\left\| \frac{\partial^n}{\partial x^n}\left\{f\right\}(x) \right\|\leq A ,\forall n ,x$$ for some $$A\in \mathbb R^+$$. Would it now be possible to find some unique minimizer?

EDIT of course we need to edit triangle wave to have compact support. Say it has compact support on $$x \in [-1-2N,1+2N], N\in \mathbb Z_+$$ In other words, $$2N+1$$ whole periods and it goes down to $$0$$ just at both ends of support.

• The question is still ill-posed. The triangle wave is not in $L^2(\mathbb{R})$, so the $L^2$ distance to any Schwartz function on the entire real line is $\infty$. – Federico Nov 5 '18 at 16:52
• This is something we should have pointed out in the other question as well. – Federico Nov 5 '18 at 16:53
• @Federico I will fix so that it is truncated triangle wave for $2N+1$ periods close to $x=0$ and 0 outside, that should help it back into $L^2$, right? – mathreadler Nov 5 '18 at 17:12
• Yes this solves this issue – Federico Nov 5 '18 at 17:15

Let $$\lVert f\rVert_{\alpha,\beta} = \sup_{x} \lvert x^\alpha D^\beta f(x) \rvert$$ be the seminorms defining the Schwartz space $$\mathcal{S}(\mathbb{R})$$.
For fixed positive numbers $$A_{\alpha,\beta}$$, the set of functions $$K = \{f\in\mathcal{S}(\mathbb{R}) : \lVert f\rVert_{\alpha,\beta} \leq A_{\alpha,\beta}\}$$ is sequentially compact. In fact, given a sequence $$(f_k)_k\subset K$$, the functions $$(D^\beta f_k)_k$$ are equi-continuous (they are equi-Lipschitz), therefore by Ascoli-Arzelà and a diagonalization argument we can find a subsequence (which I will not rename) and a function $$f\in C^\infty(\mathbb{R})$$ such that for every compact set $$E\subset\mathbb{R}$$ we have $$D^\beta f_k \to D^\beta f$$ uniformly on $$E$$. This convergence is enough to guarantee that $$f\in K$$.
Given $$g\in L^2(\mathbb{R})$$, the functional $$J_g(f) = \lVert f-g\rVert_{L^2(\mathbb{R})}$$ is continuous with respect to the Schwartz topology, therefore it has a minimizer in $$K$$.
I suspect that the conditions you consider (constraining only the norms with $$\alpha=0$$) are not sufficient. For instance, the functions $$f_k=e^{-(x/k)^2}$$ satisfy your hypothesis, but they converge to $$1$$, which is not a Schwartz function.