Problem 5
Medium Basic Definite Integrals

Find using the Riemann-sum definition: a) integral

Find using the Riemann-sum definition: a) $\int_a^b \frac{1}{x} \, dx$; b) $\int_a^b \cos x \, dx$.

Explanation of Method

This integral is evaluated directly from the definition: partition the interval into $n$ equal subintervals, form the Riemann sum $S_n=\sum f(\xi_i)\Delta x$, simplify the sum in closed form, and take the limit as $n\to\infty$.

Part a) $\int_a^b \frac{1}{x} \, dx$

Step 1: Partition the interval

Divide the interval $[a,b]$ into $n$ equal subintervals. The width of each subinterval is:

\[\Delta x = \frac{b-a}{n}\]

The partition points are:

\[x_i = a + i \cdot \Delta x = a + i \cdot \frac{b-a}{n}, \quad i = 0, 1, 2, \ldots, n\]

Step 2: Choose the sample points

We use the right endpoint of each subinterval:

\[\xi_i = x_i = a + i \cdot \frac{b-a}{n}\]

Step 3: Form the Riemann sum

The Riemann sum is:

\[S_n = \sum_{i=1}^{n} f(\xi_i) \Delta x = \sum_{i=1}^{n} \frac{1}{a + i \cdot \frac{b-a}{n}} \cdot \frac{b-a}{n}\]

\[= \frac{b-a}{n} \sum_{i=1}^{n} \frac{1}{a + i \cdot \frac{b-a}{n}} = \frac{b-a}{n} \sum_{i=1}^{n} \frac{n}{an + i(b-a)}\]

\[= (b-a) \sum_{i=1}^{n} \frac{1}{an + i(b-a)}\]

Step 4: Take the limit as $n \to \infty$

The Riemann sum converges to:

\[\lim_{n \to \infty} S_n = \lim_{n \to \infty} (b-a) \sum_{i=1}^{n} \frac{1}{an + i(b-a)}\]

This limit can be evaluated using the integral definition, but it's more direct to verify using the antiderivative.

Verification using antiderivative:

For $a, b > 0$:

\[\int_a^b \frac{1}{x} \, dx = \left[\ln|x|\right]_a^b = \ln b - \ln a = \ln\left(\frac{b}{a}\right)\]

Answer for part a):

\[\boxed{\int_a^b \frac{1}{x} \, dx = \ln\left(\frac{b}{a}\right) = \ln b - \ln a}\]

Part b) $\int_a^b \cos x \, dx$

Step 1: Partition the interval

Divide the interval $[a,b]$ into $n$ equal subintervals. The width of each subinterval is:

\[\Delta x = \frac{b-a}{n}\]

The partition points are:

\[x_i = a + i \cdot \Delta x = a + i \cdot \frac{b-a}{n}, \quad i = 0, 1, 2, \ldots, n\]

Step 2: Choose the sample points

We use the right endpoint of each subinterval:

\[\xi_i = x_i = a + i \cdot \frac{b-a}{n}\]

Step 3: Form the Riemann sum

The Riemann sum is:

\[S_n = \sum_{i=1}^{n} f(\xi_i) \Delta x = \sum_{i=1}^{n} \cos\left(a + i \cdot \frac{b-a}{n}\right) \cdot \frac{b-a}{n}\]

\[= \frac{b-a}{n} \sum_{i=1}^{n} \cos\left(a + i \cdot \frac{b-a}{n}\right)\]

Step 4: Simplify using trigonometric sum formula

Using the formula for the sum of cosines:

\[\sum_{i=1}^{n} \cos(\alpha + i\beta) = \frac{\sin\left(\frac{n\beta}{2}\right)}{\sin\left(\frac{\beta}{2}\right)} \cos\left(\alpha + \frac{(n+1)\beta}{2}\right)\]

With $\alpha = a$ and $\beta = \frac{b-a}{n}$:

\[\sum_{i=1}^{n} \cos\left(a + i \cdot \frac{b-a}{n}\right) = \frac{\sin\left(\frac{b-a}{2}\right)}{\sin\left(\frac{b-a}{2n}\right)} \cos\left(a + \frac{(n+1)(b-a)}{2n}\right)\]

Step 5: Take the limit as $n \to \infty$

As $n \to \infty$:

\[\lim_{n \to \infty} \frac{\frac{b-a}{2n}}{\sin\left(\frac{b-a}{2n}\right)} = 1\]

And:

\[\lim_{n \to \infty} \cos\left(a + \frac{(n+1)(b-a)}{2n}\right) = \cos\left(\frac{a+b}{2}\right)\]

Therefore:

\[\lim_{n \to \infty} S_n = \sin\left(\frac{b-a}{2}\right) \cdot 2\cos\left(\frac{a+b}{2}\right) = 2\sin\left(\frac{b-a}{2}\right)\cos\left(\frac{a+b}{2}\right)\]

Using the identity $2\sin A \cos B = \sin(A+B) + \sin(A-B)$:

\[= \sin b - \sin a\]

Verification using antiderivative:

\[\int_a^b \cos x \, dx = \left[\sin x\right]_a^b = \sin b - \sin a\]

Answer for part b):

\[\boxed{\int_a^b \cos x \, dx = \sin b - \sin a}\]


Result

Answer for part a):

\[\boxed{\int_a^b \frac{1}{x} \, dx = \ln\left(\frac{b}{a}\right) = \ln b - \ln a}\]

Answer for part b):

\[\boxed{\int_a^b \cos x \, dx = \sin b - \sin a}\]