TITLE: Formula for computing integrals
QUESTION [10 upvotes]: For computing derivative of a function, we can use the definition of a derivative, i.e. $$\lim\limits_{h \to 0}\frac{f(x+h)-f(x)}{h}.$$
Is there some for computing integrals too?

REPLY [2 votes]: More generally, a Riemann Sum can be defined as follows  $$\int_a^bf(x)\,\mathrm dx=\lim\limits_{\|P\|\to0}\sum_{i=1}^{n}f(x_i^*)(\Delta x)_i$$ where: $$(\Delta x)_i=x_i-x_{i-1}$$
$$x_{i-1}\le x_i^*\le x_i$$
$P=\{a=x_0\lt x_1\lt x_2\lt ...\lt x_n=b\}$ is called a partition on [a,b]
$$\|P\|=\max((\Delta x)_1,(\Delta x)_2,(\Delta x)_3,...,(\Delta x)_n)$$
Setting $(\Delta x)_i=(\Delta x)_j=\frac{b-a}{n}$ is one way of partitioning the interval [a,b], but it's not the only way.
Consider
$$\int_a^b\sqrt{x}\,\mathrm dx$$
It may make more sense to partition [a,b] such that $\sqrt{x_i}-\sqrt{x_{i-1}}$ is a constant.