dido's writeup is not entirely correct. The

Lebesgue integral is not defined for

*every* extended real function. The

function must be

measurable. For

bounded continuous real valued

functions over a

set of

finite measure, the

Riemann integral and

Lebesgue integral coincide.
The

Lebesgue integral of a

measurable function may be defined as follows.
(Throughout this I shall be concerned only with the

Lebesgue measure on

**R**, the real line, which will be denoted by

*m*. If the set over which an integral is taken is not specified, it is assumed to be all of

**R**.)

First we need some definitions.

Let *m*^{*} denote the Lebesgue outer measure. A subset *E* of **R** is measurable, with respect to the Lebesgue measure iff for any subset *A* of **R**

*m*^{*}(*A*) = *m*^{*}(*A* ∩ *E*) + *m*^{*}(*A* ∩ **R**\*E*)

This is the so-called Carathéodory criterion. Since the Lebesgue outer measure is countably sub-additive, we need only require that

*m*^{*}(*A*) ≥ *m*^{*}(*A* ∩ *E*) + *m*^{*}(*A* ∩ **R**\*E*)

An extended real function ƒ:**R** → **R** is measurable iff for every extended real number α, the set {*x* | ƒ(*x*) > α } is measurable. (This condition is equivalent to the condition that the sets where ƒ(*x*) ≥ α, ƒ(*x*) < α, ƒ(*x*) ≤ α are each measurable.)

Let *E* be a subset of **R**, then the characteristic function of *E*, denoted Χ_{E} is defined by

Χ_{E}(*x*) = 1 if *x* is in *E*, 0 otherwise.

An extended real function φ(*x*) is a simple function iff it assumes only a finite number of values and is measurable (Note: some authors only require that a function assume only a finite number of values in order to be simple; however, for the sake of brevity, I shall only consider so-called measurable simple functions).

If φ(*x*) is a simple function, then it has a canonical (but not unique) representation

φ(*x*) = Σ *a*_{i}Χ_{Ai}(*x*) 1 ≤ *i* ≤ *N*

where *A*_{i} = { *x* | φ(*x*) = *a*_{i}}. Note that these are disjoint measurable sets.

For any nonnegative simple function φ(*x*), with the above canonical representation, and measurable set *E* we define the Lebesgue integral of φ(*x*) over *E* to be

∫_{E} φ *dm* = Σ *a*_{i}m(*A*_{i} ∩ *E*) 1 ≤ *i* ≤ *N*

For any nonnegative extended real-valued measurable function ƒ we define the Lebesgue integral of ƒ to be the supremum of all ∫ φ *dm*, where φ is a simple function such that 0 ≤ φ ≤ ƒ

For a nonnegative extended real-valued measurable function ƒ and a measurable set *E*, we define the Lebesgue integral of ƒ over *E*, denoted ∫_{E} ƒ *dm*, to be
∫ ƒ*Χ_{E} *dm*

A nonnegative extended real-valued measurable function ƒ is (Lebesgue) integrable over a measurable set *E* iff ∫_{E} ƒ *dm* < ∞

If ƒ is an aribitrary extended real-valued function we defined the postive part, denoted ƒ^{+}, of ƒ to be

ƒ^{+}(*x*) = max{ƒ(*x*),0}

Similarly the negative part of ƒ, denoted ƒ^{-}, is defined as

ƒ^{-}(*x*) = max{-ƒ(*x*),0}

Note that the postive and negative parts of ƒ are both nonnegative extended real-valued functions, and if ƒ is measurable then so are ƒ^{+} and ƒ^{-}.

An arbitrary measurable function ƒ is integrable over a measurable set *E* iff ƒ^{+} and ƒ^{-} are integrable over *E*, in which case we define the Lebesgue integral of ƒ over *E* to be

∫_{E} ƒ *dm* = ∫_{E} ƒ^{+} *dm* - ∫_{E} ƒ^{-} *dm*

Note that ƒ = ƒ^{+} - ƒ^{-} and |ƒ| = ƒ^{+} + ƒ^{-} so that ƒ is Lebesgue integrable iff |ƒ| is Lebesgue integrable, which is not the case for Riemann integrable functions.