joesingo.co.uk

Darboux sums visualisation

16th October 2016

This is an app to visualise the Darboux sums for different functions, which I made when learning about integrals in my undergraduate degree.

Currently you can choose from 6 functions, and you can set the domain to be any closed interval. You can also choose the number of sub-intervals in the partition - but note that at the moment the sub-intervals are always the same width. In general the sub-intervals can be different widths - I may implement this at some point in the future.

You can scroll the graph around by dragging, and zoom by scrolling.

The code is available on GitHub.

f(x) =
Domain: [ , ]
Partition size:

What are Darboux sums?

Darboux sums are part the definition of the Darboux integral, which is one of the ways of defining the integral of a function (i.e. the area under the graph of the function).

Suppose we have a function \(f\) defined on a closed interval \([a,b]\).

The first step to defining the integral is the concept of a partition. Given an interval \([a,b]\), a partition of \([a,b]\) is a finite sequence of values \(P=(x_0, \ldots, x_n)\) such that \(a=x_0 \lt x_1 \lt x_2 \lt \ldots \lt x_n=b\).

Next we come to upper and lower sums. For each sub-interval \([x_{i-1},x_{i}]\) in our partition \(P\), we let \[M_i=\sup_{y \in [x_{i-1},x_{i}]}f(y)\] and similarly \[m_i=\inf_{y \in [x_{i-1},x_{i}]}{f(y)}\] where \(i\) goes from \(1\) to \(n\).

The upper sum of \(f\) with respect to the partition \(P\) is defined as \[U_{f,P}=\sum_{i=1}^{n}{(x_{i}-x_{i-1})M_i}\] and similarly, the lower sum is defined as \[L_{f,P}=\sum_{i=1}^{n}{(x_{i}-x_{i-1})m_i}\]

Each term in the sum corresponds to the area of a rectangle in the diagram above, where the width is the width of the sub-interval \([x_{i-1},x_{i}]\) and the height is the supremum/infimum of the function over that interval.

From the diagram above, you can see that the lower sums are always smaller than the actual area under the graph, and the upper sums are always bigger. Also, by changing the number of sub-intervals in the partition, you can also see that as that number of sub-intervals increases the lower sum gets bigger and the upper sum gets smaller.

Therefore we might say that if \(\sup_\limits{P}{L_{f,P}} = \inf_\limits{P}{U_{f,P}}\), then this is the area under the graph. Indeed, if this supremum exists we call it the lower integral, and if the infimum exists we call it the upper integral. If both the upper and lower integrals exists and are equal we say \(f\) is integrable on \([a,b]\), and define the integral as \[\int_{a}^{b}{f(x)}dx = \sup_\limits{P}{L_{f,P}} = \inf_\limits{P}{U_{f,P}} \]

Clearly this definition is quite tricky to work with - thankfully we have the Fundemental Theorem of Calculus which provides a link between differentiation and integration, which makes computing these integrals much easier.

You can find out more about Darboux integrals on the Wikipedia page.

Visualisation Windows,Linux,Mac
Matrix transformations