Examples of non-Riemann integrable functions that appear "in nature"? I am teaching an honours calculus class, and am looking for examples on non-integrable functions that occur somewhere real in mathematics. (The standard example of 1 on $\mathbb{Q}$ and 0 elsewhere always felt slightly manufactured to me. If you can give a context for it, I would be happy about that, too). 
 A: It's possible for a function with just 1 singularity to be non-integrable: think, for example, of $\int _{-1} ^1 x^{-2}dx$. Singularities such as that do appear often enough.
It's more difficult to come up with a function that would be nowhere integrable. The reason non-Riemann integrable functions seem rare is because most functions in physics are piecewise continuous, with only isolated discontinuities. 
For physical functions with more than a few isolated singularities I would suggest looking at some spectra and then write down a response function of a suitable parameter. 
For example, take the resonance frequencies of an ordinary string, compute the resonance function, and write it as a function of the wavelength rather then frequency. This function is going to have infinitely many poles clustering near 0, making it non-Riemann integrable there.
A more natural and well-studied physical model that behaves very badly locally: Navier-Stokes equations. Turbulent flows behave much worse on the small scale than on the large scale; a function that maps the location of the flow to the direction of the flow at that point is very unlikely to be Riemann-integrable.
A: *

*Brownian motion and other stochastic processes, and the way their integrals are related to physical concepts as well as other application areas like time-series forecasting.

*Signal processing; particularly image and audio processing. Natural image signals have badly behaved cusps, corners, and other kinds of discontinuities that create problems if trying to reconstruct them via an algorithm that may only utilize Riemann-integrable functions. Similarly for natural audio signals. Some classes of functions that may provide for useful illustrative examples are Sobolev spaces and Bounded Variation functions. You may find good visuals by looking for examples of Total Variation inpainting.
A: $$f(x)=\frac{\cos\frac{1}{x^2}}{x}$$ is more natural, although I don't know previsely in what context it arises (likewise, I believe all functions such that as $x\rightarrow 0$ $f(x)$ oscillates infinitely often and $f(x)\rightarrow\infty$ are not Riemann integrable but more natural).
