24
$\begingroup$

What are some particularly well-known functions that exhibit pathological behavior at or near at least one value and are particularly useful as examples?

For instance, if $f'(a) = b$, then $f(a)$ exists, $f$ is continuous at $a$, $f$ is differentiable at $a$, but $f'$ need not be continuous at $a$. A function for which this is true is $f(x) = x^2 \sin(1/x)$ at $x=0$.

  • 16
    Buy [this book](http://www.amazon.com/Counterexamples-Analysis-Dover-Books-Mathematics/dp/0486428753), it's only 10 bucks.2010-07-26
  • 0
    Nice! I can't believe I didn't know such a book existed.2010-07-26

15 Answers 15

0

Three examples suffice to show why some modes of convergence don't imply other modes of convergence: pointwise convergence, Lp norm convergence, convergence in measure, etc. See the counterexamples section here.

15

The Weierstrass function is continuous everywhere and differentiable nowhere.
The Dirichlet function (the indicator function for the rationals) is continuous nowhere.
A modification of the Dirichlet function is continuous at all irrational values and discontinuous at rational values.
The Devil's Staircase is uniformly continuous but not absolutely. It increases from 0 to 1, but the derivative is 0 almost everywhere.

  • 0
    I think you mean *"discontinuous at all **rational** functions"*2010-07-27
  • 0
    Should the modification of the Dirichlet function refer to rational/irrational numbers (not functions)?2010-07-27
  • 0
    @BlueRaja: @Isaac: You're both right. I copy/pasted that description from somewhere and didn't double-check it.2010-07-27
  • 0
    The devil's staircase has zero derivative almost everywhere, not at all but countably many points. Any continuous function with zero derivative at all but countably many points is constant.2010-08-25
9

Also: Conway base 13 function.

This function has the following properties.
1. On every closed interval $[a, b]$, it takes every real value.
2. It is continuous nowhere.

9

Here's an example of a strictly increasing function on ℝ which is continuous exactly at the irrationals.

Pick your favorite absolutely convergent series ∑an in which all the terms are positive (mine is ∑1/2n) and your favorite enumeration of the positive rationals: ℚ={q1,q2,...}. For a real number x, define f(x) to be the sum of all the an for which qn ≤ x.

6

Have also a look here:
https://mathoverflow.net/questions/22189/what-is-your-favorite-strange-function

  • 0
    Also related: http://mathoverflow.net/questions/16829/what-are-your-favorite-instructional-counterexamples2012-11-27
4

The Dirac delta "function." It's not a "function," strictly speaking, but rather a very simple example of a distribution that isn't a function.

4

The bump function $\psi\colon \mathbb{R} \to \mathbb{R}$ given by $\psi(x) = e^{-1/(1-x^2)}$ for $|x|\leq 1$ and $\psi(x) = 0$ for $|x| > 1$ is not exactly pathological per se, but it's very useful for (at least) two things:

  1. It's an example of a function that is smooth (all derivatives exist) but not analytic (not equal to its Taylor series in a neighbourhood of every point) -- look at the points $x=\pm 1$.
  2. You can use it to build partitions of unity on manifolds, which is important when you want to build a global object (like a Riemannian metric) out of local data (defined in each chart).
  • 0
    +1, and to add a more practical use for this function: this, as well as its integral, is sometimes used in conjunction with the trapezoidal rule as a variable substitution for handling badly-behaved improper integrals. Its "singularity-flattening" property at the points 1 and -1 works well in tandem with the Euler-Maclaurin error of the trapezoidal rule.2010-08-08
  • 0
    I find that the [Fabius function](http://en.wikipedia.org/wiki/Fabius_function) is a better example of how weird smooth functions can be. The only problem with it is that it makes for a terrible demonstration for starting students since sums of independent random variables is convolution which (a) they probably haven't seen, (b) can seem awfully unmotivated or at least completely unrelated to Taylor series which is probably what you're working on at that point, and (c) you're doing infinitely many convolutions so you have to talk about a limit of a sequence of functions...2010-10-25
3

$\displaystyle\frac{\sin(x)}{x}$ is useful; it has a singularity at $x=0$, but if you take the union of $\displaystyle y=\frac{\sin(x)}{x}$ with the point $(x=0,y=1)$ then you get $\text{sinc}(x/\pi)$. The $\text{sinc}$ function has a lot of applications in signal processing and diffraction.

3

I like $f(x,y) = \frac{xy}{x^{2}+y{2}}$ for $(x,y) \ne (0,0)$ and $f(x,y)=0$ for $(x,y)=(0,0)$. Here $f$ has partial derivatives at (0,0) but it is not differentiable at $(0,0)$

  • 3
    A less trivial exercise is to find a function with partial derivatives in every direction at a point but which is still not differentiable there.2010-08-07
3

The constant function $0$ is an extremely pathological function: it has all kinds of properties that almost none of the functions $\mathbb R\to\mathbb R$ have: it is everywhere continuous, differentiable, analytic, polynomial, constant (not all of those are independent of course...), you name it. By contrast many of the answers given here involve properties that almost all functions have, or that almost all functions with the mentioned pathologies (e.g., being everywhere continuous for the Weierstrass function) have.

In fact being a definable function is a pathology that all answers share, but this is admittedly hard to avoid in an answer.

2

The Cauchy distribution is another example. This distribution pops up frequently in statistical reasoning.

For example, the ratio of two independent standard normal random variables is a standard Cauchy variable. We calculate ratios all the time, but often forget to consider that their distribution does not follow a simple normal distribution.

This is interesting for several reasons:

  1. The mean and variance for the Cauchy distribution are undefined (--> infinity). If one is trying to estimate these parameters for the ratio of two normal variables, the results may blow up to rather large values that are hard to interpret.

  2. In such a situation, one would therefore prefer to use more robust estimators of the central tendency (such as the median) and scale (median absolute deviation). When designing and testing robust estimators (en.wikipedia.org/wiki/Robust_statistics), one way to test them is to try them out on a Cauchy distribution, and make sure that they don't blow up like the usual formulas for mean and variance.

  • 0
    Also used to justify the finite variance requirement of CLT, and to motivate a more general form.2010-07-27
2

When I was first learning calculus, the fact that $sin(1/x)$ is continuous on the set $(0,\infty)$ gave me a headache.

  • 3
    It will give you a much bigger headache when you study topology: http://en.wikipedia.org/wiki/Topologist's_sine_curve2010-08-07
2

The function f(x) = x over the rationals and 2x over the irrationals is locally increasing in 0 but it is neither increasing nor decreasing.

  • 0
    Increasing at x=0, but neither increasing nor decreasing for any interval?2010-07-29
2

The Cauchy functionals, which satisfy the very simple equation f(a+b) = f(a)+f(b) for all real a,b. These are either a line through the origin (the "nice" ones) or really "ugly" functions that are discontinuous and unbounded in every interval. The latter are possible because the Axiom of Choice implies (actually is equivalent to) that infinite dimensional vector spaces have bases; i.e. the reals over the rationals have a Hamel basis. A great explanation of all this (including the nice/ugly terminology) is in Horst Herrlich's monograph The Axiom of Choice.

0

$\left(\frac{1}{x}\right)^{\frac{1}{x}}$. Try graphing it if you dare (including over the negatives)

  • 0
    How to graph over the negatives? It's not real there for most x's.2010-07-27
  • 3
    @KennyTM: Exactly2010-07-27
  • 1
    I think, depending on how you define exponentiation of negative bases with rational exponents, it might be possible to interpret it to have real values on a dense subset of the negative reals.2010-07-27
  • 2
    GrafEq seems to be proud of how it handles a related function: http://www.peda.com/grafeq/gallery/rogue/xx_exponential.html2010-08-09