0

I am looking for a function $f\colon \mathbb{R}\to\mathbb{R}$ such that $$g(x)=\begin{cases} f(x), &\text{if }| x|<k \\ | x|, &\text{otherwise}\end{cases}$$ is $C^2$ or $C^\infty$ (at least twice continuously differenciable).

I also wish that the deviations between $| x|$ and $g(x)$ tends to $0$ as $k\to0$, possibly uniformly, as well as the deviations of the first two derivatives.

If possible, I am looking for a parametric class of symetric functions f for which computations are explicit and do not require heavy numerical procedure. I guess a polynomial class would do it, requiring only a linear solver, but there may be other solutions.

Thank you for your ideas.

vv33d
  • 46

1 Answers1

0

It suffices to take $f(x) = a + bx^2 + cx^4$ (with unknown coefficients $a$, $b$, and $c$ depending on $k$ to be determined). The function $g$ is of class $C^2$ if and only if $f(k) = k$, $f'(k) = 1$, and $f''(k) = 0$, and this system is easy to solve. (Evenness of $f$ guarantees the necessary boundary conditions at $-k$.)

Alternatively, the (real-analytic) function $g(x) = \sqrt{x^2 + k^2}$ might be suitable if you don't need $g(x)$ to agree exactly with $|x|$.

  • Thank you Andrew! I actually need g(0)=0 as well. I currently use ax^2 +bx^4+cx^6. I am still wondering if some other non polynomial class may be preferable. Does a solution without inflexion points exist ? – vv33d Jul 26 '13 at 15:40
  • @vv33d: If you require $f(0) = 0$ (i.e., $g(0) = 0$), then $f$ must have an inflection point. Loosely, if $f(0) = f'(0) = 0$, then by the Mean Value Theorem, $f'$ must exceed $1$ in order to have $f(k) = k$. But this forces $f''$ to become negative, since $f'(k) = 1$. – Andrew D. Hwang Jul 26 '13 at 16:07
  • Very true. I was also thinking about a C\infty non analytic solution e.g of the form P(x)*exp(-1/x), but I have serious doubts on the numerical resolution of such a system – vv33d Jul 26 '13 at 16:53