

# Riemann integration: definition and properties

Riemann integration is a fundamental concept in calculus. It is a method for finding the area under a curve by approximating it with rectangles. The key idea behind Riemann integration is to divide the region under the curve into small rectangles, sum up their areas, and take the limit as the width of the rectangles approaches zero.

The main definition of Riemann integration is as follows:

A function $f(x)$ is Riemann integrable on an interval $[a, b]$ if for any $\epsilon > 0$, there exists a partition $P = \{x_0, x_1, \dots, x_n\}$ of $[a, b]$ such that the maximum difference between the upper and lower sums is less than $\epsilon$.

$$\int_{a}^{b} f(x) dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(c_i) \Delta x_i$$

where $c_i$ is any point in the $i$-th subinterval, and $\Delta x_i = x_{i} - x_{i-1}$.

Consider the function $f(x) = x^2$ on the interval $[0, 1]$. We can approximate the area under the curve using the following partition and corresponding upper and lower sums:

$$P = \{0, \frac{1}{2}, 1\}$$

Upper sum:

$$U(f, P) = (0.5)^2 + (1)^2 = 0.75$$

Lower sum:

$$L(f, P) = (0)^2 + (0.5)^2 = 0.25$$

The maximum difference between the upper and lower sums is $0.75 - 0.25 = 0.5$.

## Exercise
Find the Riemann integral of the function $f(x) = x^2$ on the interval $[0, 1]$.

### Solution
The Riemann integral of $f(x) = x^2$ on the interval $[0, 1]$ is given by:

$$\int_{0}^{1} x^2 dx = \lim_{n \to \infty} \sum_{i=1}^{n} (c_i)^2 \Delta x_i$$

where $c_i$ is any point in the $i$-th subinterval, and $\Delta x_i = x_{i} - x_{i-1}$.

# Examples of Riemann integration

Riemann integration can be used to find the area under various curves. Here are a few examples:

1. The area under the curve $y = x^2$ on the interval $[0, 1]$:

$$\int_{0}^{1} x^2 dx = \frac{1}{3}$$

2. The area under the curve $y = \sin(x)$ on the interval $[0, \pi]$:

$$\int_{0}^{\pi} \sin(x) dx = 2$$

3. The area under the curve $y = e^x$ on the interval $[0, 1]$:

$$\int_{0}^{1} e^x dx = e - 1$$

## Exercise
Find the Riemann integral of the function $f(x) = x^3$ on the interval $[-1, 1]$.

### Solution
The Riemann integral of $f(x) = x^3$ on the interval $[-1, 1]$ is given by:

$$\int_{-1}^{1} x^3 dx = \frac{1}{4}$$

# Improper integrals and their integration techniques

Improper integrals are integrals where the interval of integration is infinite or undefined at one or both endpoints. These integrals require special techniques to evaluate.

1. Integrals of the form $\int_{-\infty}^{\infty} f(x) dx$ are called even improper integrals. To evaluate these integrals, we can split the integral into two parts:

$$\int_{-\infty}^{\infty} f(x) dx = \int_{-\infty}^{0} f(x) dx + \int_{0}^{\infty} f(x) dx$$

2. Integrals of the form $\int_{a}^{\infty} f(x) dx$ or $\int_{-\infty}^{a} f(x) dx$ are called one-sided improper integrals. To evaluate these integrals, we can use the substitution method or the limit comparison method.

3. Integrals of the form $\int_{-\infty}^{a} f(x) dx + \int_{a}^{\infty} g(x) dx$ are called mixed improper integrals. To evaluate these integrals, we can use the substitution method or the limit comparison method.

## Exercise
Evaluate the improper integral $\int_{-\infty}^{\infty} \frac{1}{1 + x^2} dx$.

### Solution
The improper integral $\int_{-\infty}^{\infty} \frac{1}{1 + x^2} dx$ can be evaluated using the substitution method. Let $u = 1 + x^2$, then $du = 2x dx$.

$$\int_{-\infty}^{\infty} \frac{1}{1 + x^2} dx = \int_{-\infty}^{\infty} \frac{1}{u} \frac{du}{2\sqrt{u - 1}}$$

Let $t = \sqrt{u - 1}$, then $dt = \frac{1}{2\sqrt{u - 1}} du$.

$$\int_{-\infty}^{\infty} \frac{1}{1 + x^2} dx = \int_{-\infty}^{\infty} \frac{1}{u} \frac{du}{2\sqrt{u - 1}} = \int_{-\infty}^{\infty} \frac{dt}{\sqrt{u - 1}}$$

The integral is now indefinite, and can be evaluated using the fundamental theorem of calculus.

# Darboux integration and its connection to Riemann integration

Darboux integration is a more general concept than Riemann integration. It allows for the integration of functions that are not necessarily continuous or bounded. The main definition of Darboux integration is as follows:

A function $f(x)$ is Darboux integrable on an interval $[a, b]$ if for any $\epsilon > 0$, there exists a partition $P = \{x_0, x_1, \dots, x_n\}$ of $[a, b]$ such that the maximum difference between the upper and lower sums is less than $\epsilon$.

$$\int_{a}^{b} f(x) dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(c_i) \Delta x_i$$

where $c_i$ is any point in the $i$-th subinterval, and $\Delta x_i = x_{i} - x_{i-1}$.

## Exercise
Find the Darboux integral of the function $f(x) = \begin{cases} 1, & x \in \mathbb{Q} \\ -1, & x \in \mathbb{R} \setminus \mathbb{Q} \end{cases}$ on the interval $[0, 1]$.

### Solution
The Darboux integral of $f(x)$ on the interval $[0, 1]$ is given by:

$$\int_{0}^{1} f(x) dx = \int_{0}^{1} \begin{cases} 1, & x \in \mathbb{Q} \\ -1, & x \in \mathbb{R} \setminus \mathbb{Q} \end{cases} dx = 0$$

# Lebesgue integral: definition and properties

The Lebesgue integral is a more general concept than Riemann integration. It allows for the integration of functions that are not necessarily continuous or bounded. The main definition of Lebesgue integration is as follows:

A function $f(x)$ is Lebesgue integrable on an interval $[a, b]$ if the Lebesgue measure of the set of discontinuities of $f(x)$ is zero.

The Lebesgue integral of $f(x)$ on the interval $[a, b]$ is given by:

$$\int_{a}^{b} f(x) dx = \int_{[a, b]} f(x) d\mu$$

where $d\mu$ is the Lebesgue measure.

## Exercise
Find the Lebesgue integral of the function $f(x) = \begin{cases} 1, & x \in \mathbb{Q} \\ -1, & x \in \mathbb{R} \setminus \mathbb{Q} \end{cases}$ on the interval $[0, 1]$.

### Solution
The Lebesgue integral of $f(x)$ on the interval $[0, 1]$ is given by:

$$\int_{0}^{1} f(x) dx = \int_{[0, 1]} f(x) d\mu = \int_{[0, 1]} \begin{cases} 1, & x \in \mathbb{Q} \\ -1, & x \in \mathbb{R} \setminus \mathbb{Q} \end{cases} d\mu = 0$$

# Lebesgue measure and its properties

Lebesgue measure is a generalization of the concept of length to more abstract spaces. It is defined for subsets of the real line and has several important properties:

1. Non-negativity: $\mu(A) \geq 0$ for all subsets $A$ of the real line.

2. Countable additivity: $\mu(\cup_{i=1}^{\infty} A_i) = \sum_{i=1}^{\infty} \mu(A_i)$ for disjoint subsets $A_i$ of the real line.

3. Continuity from above: $\mu(\cap_{i=1}^{\infty} A_i) = \lim_{i \to \infty} \mu(A_i)$ for nested subsets $A_i$ of the real line.

4. Continuity from below: $\mu(\cup_{i=1}^{\infty} A_i) = \lim_{i \to \infty} \mu(A_i)$ for nested subsets $A_i$ of the real line.

## Exercise
Find the Lebesgue measure of the set $A = \{x \in \mathbb{Q}: 0 \leq x \leq 1\}$.

### Solution
The Lebesgue measure of the set $A = \{x \in \mathbb{Q}: 0 \leq x \leq 1\}$ is given by:

$$\mu(A) = \mu(\{x \in \mathbb{Q}: 0 \leq x \leq 1\}) = 0$$

# Lebesgue integration techniques

Lebesgue integration techniques include the following:

1. Simple functions: These are functions that can be written as the sum of a finite or countable number of indicator functions.

2. Non-negative functions: These are functions that take non-negative values.

3. Increment functions: These are functions that take integer values.

4. Absolute continuous functions: These are functions that have a non-zero derivative almost everywhere.

## Exercise
Find the Lebesgue integral of the function $f(x) = x^2$ on the interval $[0, 1]$.

### Solution
The Lebesgue integral of $f(x) = x^2$ on the interval $[0, 1]$ is given by:

$$\int_{0}^{1} x^2 dx = \int_{[0, 1]} x^2 d\mu = \frac{1}{3}$$

# Comparison of Riemann and Lebesgue integration

Riemann integration and Lebesgue integration are both powerful tools for finding the area under curves. However, there are some key differences between the two:

1. Riemann integration is based on the concept of Riemann sums, while Lebesgue integration is based on the concept of Lebesgue measure.

2. Riemann integration is limited to functions that are continuous and bounded on the interval of integration, while Lebesgue integration is more general and can be applied to a wider class of functions.

3. Riemann integration requires the existence of upper and lower Darboux sums, while Lebesgue integration only requires the existence of the Lebesgue integral.

## Exercise
Compare the Riemann and Lebesgue integrals of the function $f(x) = x^2$ on the interval $[0, 1]$.

### Solution
The Riemann integral of $f(x) = x^2$ on the interval $[0, 1]$ is given by:

$$\int_{0}^{1} x^2 dx = \frac{1}{3}$$

The Lebesgue integral of $f(x) = x^2$ on the interval $[0, 1]$ is also given by:

$$\int_{0}^{1} x^2 dx = \frac{1}{3}$$

Therefore, the Riemann and Lebesgue integrals of $f(x) = x^2$ on the interval $[0, 1]$ are equal.

# Riemann-Stieltjes integration: definition and properties

Riemann-Stieltjes integration is a generalization of Riemann integration that allows for the integration of functions that are not necessarily continuous or bounded. The main definition of Riemann-Stieltjes integration is as follows:

A function $f(x)$ is Riemann-Stieltjes integrable on an interval $[a, b]$ with respect to a function $g(x)$ if for any $\epsilon > 0$, there exists a partition $P = \{x_0, x_1, \dots, x_n\}$ of $[a, b]$ such that the maximum difference between the upper and lower sums is less than $\epsilon$.

$$\int_{a}^{b} f(x) dg(x) = \lim_{n \to \infty} \sum_{i=1}^{n} f(c_i) [g(x_{i}) - g(x_{i-1})]$$

where $c_i$ is any point in the $i$-th subinterval, and $\Delta x_i = x_{i} - x_{i-1}$.

## Exercise
Find the Riemann-Stieltjes integral of the function $f(x) = x^2$ on the interval $[0, 1]$ with respect to the function $g(x) = x$.

### Solution
The Riemann-Stieltjes integral of $f(x) = x^2$ on the interval $[0, 1]$ with respect to the function $g(x) = x$ is given by:

$$\int_{0}^{1} x^2 dg(x) = \lim_{n \to \infty} \sum_{i=1}^{n} x_i^2 [g(x_{i}) - g(x_{i-1})] = \frac{1}{3}$$

# Applications of different types of integration in calculus

Different types of integration have various applications in calculus. Some of these applications include:

1. Calculating the area under a curve: Riemann integration can be used to find the area under a curve. For example, the area under the curve $y = x^2$ on the interval $[0, 1]$ is given by the Riemann integral $\int_{0}^{1} x^2 dx = \frac{1}{3}$.

2. Calculating the length of a curve: Riemann-Stieltjes integration can be used to find the length of a curve. For example, the length of the curve $y = x^2$ on the interval $[0, 1]$ is given by the Riemann-Stieltjes integral $\int_{0}^{1} \sqrt{1 + (y')^2} dx = \int_{0}^{1} \sqrt{1 + 2x} dx$.

3. Calculating the center of mass: Lebesgue integration can be used to find the center of mass of a body. For example, the center of mass of a uniform disk is given by the Lebesgue integral $\int_{0}^{1} x \cdot \pi r^2 dx = \frac{\pi}{4}$.

4. Calculating the moment of inertia: Lebesgue integration can also be used to find the moment of inertia of a body. For example, the moment of inertia of a uniform disk is given by the Lebesgue integral $\int_{0}^{1} x^2 \cdot \pi r^2 dx = \frac{\pi}{3}$.

These are just a few examples of the many applications of different types of integration in calculus.