Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Given $n$ smooth real functions $f_1, f_2, \dots, f_n$, define a composite function like this:

$$f(x) = \max(f_1(x), f_2(x), \dots, f_n(x)) - \min(f_1(x), f_2(x), \dots, f_n(x))$$

Is it possible to say anything useful in general about the shape of this function?

Intuitively, it seems like $f$ will be at least $C^0$ continuous but $f^\prime$ may have arbitrarily many discontinuities. How much would we have to know about the individual $f_k$ to be more specific?

For example, if we know that each $f_k$ has $m_k$ extrema, it seems like we should be able to place bounds on both the number of extrema in $f$ and number of discontinuities in $f^\prime$, but I'm having trouble visualising all the possible interactions as $n$ increases.

(I've tried to put this in general terms, but for context my particular interest is somewhat related to my earlier optics question. A different but similar imaging process produces something like the above function with constituent $f_k$ of this form:

$$f_k(x) = \sum_i e_i \sin(x_i + \frac{2k\pi}{n}) P(x - x_i)$$

Once again, simulations suggest that this process can noticeably improve lateral resolution because of the corners introduced between maxima, but it would be nice to have a more formal characterisation.)

share|cite|improve this question
If I understand correctly, this is the range (in the statistical sense, the length of the smallest interval which contains all the data) of the set $\{f_1(x), f_2(x), \ldots, f_n(x)\}$, yes? – Rahul Oct 13 '10 at 14:25
Yes, that's exactly it. There's some physical rationale for that choice, but it's fairly dubious. – walkytalky Oct 13 '10 at 14:40
up vote 2 down vote accepted

Everything you need to know can be deduced from the identity $\text{max}(a, b) = \frac{a+b}{2} + \frac{|a-b|}{2}$ and similarly for $\text{min}$.

Edit: Okay, maybe this is less useful than I thought. You want to know about the extrema of $f$ and the discontinuities of $f'$. If each $f_k$ has finitely many extrema, it may still be the case that $f$ has infinitely many discontinuities; consider two functions which are increasing in a "race" in which the victor changes infinitely often. As a deleted answer says, you want in addition that $f_i - f_j$ has finitely many extrema for every pair $i, j$. Then outside a bounded range of values of $x$ the relative order of the $f_i$ won't change and everything will be hunky-dorky.

share|cite|improve this answer
Am I being thick or does this identity render the associativity of $\max$ far from obvious? I can't see how to generalize it to $n$ arguments. – Rahul Oct 13 '10 at 14:23
No, you're right. The point isn't to make associativity obvious; the point is to figure out where the discontinuities in the derivative and things like that are. Use max(a, b, c) = max(max(a, b), c) and so forth. It's messy, but the absolute values will tell you where you need to look. – Qiaochu Yuan Oct 13 '10 at 14:29
Doubtless you are correct, but this identity becomes rapidly less useful with more functions. I think that part of the problem is that at any particular x only two functions contribute to the result, but exactly which two varies. I'm starting to suspect that only relatively trivial general predictions can be made and everything else will depend very closely on the exact functions involved. – walkytalky Oct 13 '10 at 14:36
Wouldn't that falsely predict a discontinuity when $a = b < c$? It could get you a useful upper bound though. P.S. Very nice observation in the edit. – Rahul Oct 13 '10 at 14:56
@Rahul: I'm not sure what you mean. If a and b switch order there may in fact be such a discontinuity (in the minimum). In any case, I more or less agree with walkytalky; I don't think there's too much more to say in general without more information. – Qiaochu Yuan Oct 13 '10 at 15:06

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.