# Evaluating Riemann-Stieltjes Integrals with Step Functions as Integrators

Recall from the Riemann-Stieltjes Integrals with Multiple Discontinuity Step Functions as Integrators page that if $f$ is a function defined on $[a, b]$ and $\alpha$ is a step function with jump discontinuities at $x_1, x_2, ..., x_n \in [a, b]$, then if $f$ and $\alpha$ are NOT both left discontinuous and NOT both right discontinuous at each $x_k$ for $k \in \{ 1, 2, ..., n \}$ then $f$ is Riemann-Stieltjes integrable with respect to $\alpha$ on $[a, b]$ and:

(1)If for some $x_k$ we have that $x_k = a$ then we let:

(2)Furthermore, if for some $x_k$ we have that $x_k = b$ then we let:

(3)We will now look at some examples of evaluating Riemann-Stieltjes integrals with step functions as integrators.

## Example 1

**Evaluate $\displaystyle{\int_0^1 x^2 \: d \alpha (x)}$ where $\alpha(x)$ is a step function defined by $\displaystyle{\alpha(x) = \left\{\begin{matrix}1 & \mathrm{for} \: 0 \leq x < \frac{1}{3}\\ 2 & \mathrm{for} \: \frac{1}{3} \leq x \leq \frac{2}{3}\\ 3 & \mathrm{for} \: \frac{2}{3} \leq x \leq 1 \end{matrix}\right.}$.**

The discontinuities of $\alpha$ are at $x_1 = \frac{1}{3}$, $x_2 = \frac{2}{3}$. Note that $x^2$ is continuous on all of $[0, 1]$ and so $x^2$ and $\alpha$ are not both discontinuous at $x_1$ and $x_2$. Therefore:

(4)## Example 2

**Evaluate $\displaystyle{\int_0^{2\pi} \sin x \: d \alpha (x)}$ where $\alpha(x)$ is a step function defined by $\displaystyle{\alpha(x) = \left\{\begin{matrix} 4 & \mathrm{for} \: 0 \leq x < \frac{\pi}{2}\\ 2 & \mathrm{for} \: \frac{\pi}{2} \leq x \leq \frac{3\pi}{2}\\ 5 & \mathrm{for} \: \frac{3\pi}{2} \leq x \leq 2\pi \end{matrix}\right.}$.**

The discontinuities of $\alpha$ are at $x_1 = \frac{\pi}{2}$ and $x_2 = \frac{3\pi}{2}$. Notice that once again, the integrator, $\sin x$ is continuous on all of $[0, 2\pi]$ so $\sin x$ and $\alpha$ are not both discontinuous at $x_1$ and $x_2$. Therefore:

(5)