Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does there exist an analytic everywhere, piecewise-defined function $f$ such that:

$f(x) = g(x)$ for $x < k$
$f(x) = h(x)$ for $x>k$
$f(x) = r$ for $x=k$

With $g \ne h $ ($g$ not the same function as $h$)

If it exists, what is such an example?

share|cite|improve this question
What do you mean with "everywhere piecewise-defined"? – Listing Jan 20 '11 at 12:38
I mean "analytic everywhere" and "picewise-defined" – TROLLKILLER Jan 20 '11 at 12:39
I'm assuming that the first block should read f(x)=g(h) for x<k – PearsonArtPhoto Jan 20 '11 at 12:59
Well then: f(x) = g(x) = r; h(x) = r if x > k, and 0 if x <= k. Or did you want g and h to be continuous? I can do that too :-) – TonyK Jan 20 '11 at 13:29
OK, then we're done, aren't we? – TonyK Jan 20 '11 at 16:59
up vote 5 down vote accepted

If $g$ and $h$ are not necessarily analytic, then just take an arbitrary analytic function $f$ with $f(k) = r$. Define $g$ and $h$ to be

$$ g(x) := f(x) \chi(k-x) \qquad h(x) := f(x) \chi(x-k) $$

where $\chi$ is a cut-off function, that is: $\chi(x) = 1$ for $x \geq 0$, $\chi(x) = 0$ for $x \leq -1$ and $0 < \chi(x) < 1$ for $-1 < x < 0$. Then you have all your desired properties. You can choose $\chi$ to be continuous, or even smooth.

If $g$ and $h$ are analytic, then the answer is no. Real analytic functions have the unique continuation property. That is, if a real analytic function is zero on an open set, it must be zero everywhere. Then since $f$ is everywhere analytic, and $g$ is everywhere analytic, their difference $f-g$ is also analytic, and vanishes for $x < k$. This implies that $f=g$ everywhere. Similarly $f =h$ everywhere and $g$ and $h$ must coincide.

share|cite|improve this answer
I am almost completely sure (eg. Rudin) that the property you describe with respect to real analytic functions, actually applies ONLY to holomorphic functions? Which are generally more 'rigid' than real analytic functions, i.e. they adhere to more rules. – user71551 May 19 '13 at 14:10

Such a function will be trivially impossible unless you relax the requirement that an analytic function be equal to its taylor series in a neighborhood of any point. Once that restriction is relaxed, the following is an example of a piecewise function with all derivatives continuous:

$f(0) = 0$

$f(x) = g(x) = e^{(\tfrac{-1}{x^2})}$ for $x < 0$

$f(x) = 2*g(x)$ for $x > 0$

All derivatives are continuous, passing through (0, 0). You can create other examples using the strange function $e^{(\tfrac{-1}{x^2})}$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.