Definition of an integral over a domain. In calculus we generally use this notion: $\int_D f(x)\,dx$. I understand that when $D$ is an interval from $a$ to $b$ the integral is equivalent to $\lim \limits_{\|\Delta x\| \to 0} \sum_{i} f(x_i) \, \Delta x_{i}$, but I haven't seen a definition of the integral when $D$ is anything other than an interval, in summation form. Is there a general form for the integral over $D$?
 A: There is the Lebesgue integral, named after Henri Lebesgue.
If $f$ is positive in some parts of its domain and negative in others, then the Lebesgue integral $\int f$ is defined by looking $\int_A f+\int_B f$ where $f(x)\ge 0$ for $x\in A$ and $f(x)<0$ for $x\in B$.  The integral $\int_B f$ is defined as $-\int_B(-f)$, so we're integrating a non-negative function.
So now the question is how to define the integral of a non-negative function.  It's defined as the smallest number that's not too small to be the integral (and $+\infty$ if all real numbers are too small), but of course we have to say what "too small" means.
Suppose the integral is $\int_A f$.  Partition $A$ into finitely many disjoint parts $A=A_1\cup\cdots\cup A_n$.  Suppose
$$
g(x) = \begin{cases} c_1 & \text{if }x\in A_1, \\ {}\,\vdots & {}\,\vdots \\[2pt]  c_n & \text{if }x\in A_n, \end{cases}
$$
and $0\le g(x)\le f(x)$ for every $x\in A$.  Then $\int_A g = c_1\mu(A_1)+\cdots+c_n\mu(A_n)$, where for sets $B$ we have $\mu(B)=\text{measure of }B$
Then every number less than $\int_A g$ is too small to be $\int_A f$.
This doesn't reduce the integral to a finite sum: the definition contemplates not just one finite sum like the integral of $g$, but rather EVERY partition and EVERY function $g$ about which the conditions above hold.
So how do you define the "measure" of a set?  For intervals, it's just the length of the interval.  For a disjoint union of intervals, it's the sum of their lengths.  Writing the definition of measure in general is unfortunately quite involved.
Example: Consider
$$
\int_{[0,1]} \frac{dx}{x}.
$$
Let
$$
g(x) = \begin{cases} 1 & \text{if }1/2< x\le 1, \\
2 & \text{if }1/3< x \le 1/2, \\
3 & \text{if }0\le x\le 1/3. \end{cases}
$$
Then $\int_{[0,1]} g = 1+\frac13+\frac14=\frac{19}{12}$, so every number $<19/12$ is too small to be the integral.  By looking at other partitions, with for more parts, one can show, for example that $1\text{ million}$ is also too small in this case.
Lebesgue's definition of the integral makes it easy to prove things like his convergence theorems, one of which says:
$$
\text{If }\int_A \sup_n |f_n|<\infty\text{ then }\lim_n\int_A f_n = \int\lim_n f_n.
$$
