Tutorials › Real Analysis › Linearity of the Integral

Riemann Integration · Tutorial 478 of 1000

Linearity of the Integral

Learn how Darboux integral properties yield linearity of the Riemann integral and how to apply it without confusing sums with products.

Advanced 10 min read

What You'll Learn

  • Prove additivity of the Riemann integral from superadditivity and subadditivity of Darboux integrals
  • Handle positive, negative, and zero scalar multiples
  • Apply linearity to finite linear combinations of integrable functions
  • Calculate combinations of step functions using their interval contributions
  • Recognize why linearity does not allow products to be distributed across integrals

From Integral Properties to Linearity

The previous tutorial established that the integral preserves pointwise order, is additive across adjacent intervals, and satisfies an absolute-value inequality. A different kind of additivity is central to calculation: integrating a sum of functions gives the sum of their integrals. Together with the behavior under scalar multiplication, this is the linearity of the integral.

There are two related facts to keep distinct. The Linearity of Riemann Integrability Theorem, established earlier, says that sums and scalar multiples of integrable functions are themselves integrable. It does not by itself identify their integral values. We prove that identity here, using the earlier superadditivity and subadditivity properties of the Darboux lower and upper integrals, as well as the Scaling Upper and Lower Integrals Theorem.

The Linearity Theorem

Theorem (Linearity of the Riemann Integral): Let \(f,g:[a,b]\to\mathbb{R}\) be Riemann integrable, and let \(\alpha,\beta\in\mathbb{R}\). Then \(\alpha f+\beta g\) is Riemann integrable and $$ \int_a^b \bigl(\alpha f(x)+\beta g(x)\bigr)\,dx = \alpha\int_a^b f(x)\,dx+\beta\int_a^b g(x)\,dx. $$

Proof. By the Linearity of Riemann Integrability Theorem, \(\alpha f+\beta g\) is integrable. It remains to prove the identity for its integral. We first establish the two separate properties it uses.

Write \(I_f=\int_a^b f(x)\,dx\), \(I_g=\int_a^b g(x)\,dx\), and \(I_{f+g}=\int_a^b(f(x)+g(x))\,dx\). The earlier superadditivity result for lower integrals and subadditivity result for upper integrals give

$$ \underline{\int_a^b}(f+g) \geq \underline{\int_a^b}f+\underline{\int_a^b}g, \qquad \overline{\int_a^b}(f+g) \leq \overline{\int_a^b}f+\overline{\int_a^b}g. $$

Each function in these inequalities is integrable. Its lower and upper integrals therefore both equal its Riemann integral. Substitution gives \(I_{f+g}\geq I_f+I_g\) and \(I_{f+g}\leq I_f+I_g\). Hence

$$ \int_a^b(f+g)=\int_a^b f+\int_a^b g. $$

Now let \(c\in\mathbb{R}\). If \(c>0\), the Scaling Upper and Lower Integrals Theorem gives

$$ \underline{\int_a^b}cf=c\,\underline{\int_a^b}f, \qquad \overline{\int_a^b}cf=c\,\overline{\int_a^b}f. $$

Since \(f\) and \(cf\) are integrable, these equalities imply \(\int_a^b cf=c\int_a^b f\). If \(c<0\), the same scaling theorem gives

$$ \underline{\int_a^b}cf=c\,\overline{\int_a^b}f, \qquad \overline{\int_a^b}cf=c\,\underline{\int_a^b}f. $$

The lower and upper integrals of \(f\) are equal, so both expressions on the right equal \(c\int_a^b f\). Thus the scalar identity also holds when \(c<0\). When \(c=0\), the function \(cf\) is the zero function, whose integral is \(0\), so the identity holds in this case as well.

Finally, apply scalar multiplication and additivity to \(\alpha f+\beta g\):

$$ \int_a^b(\alpha f+\beta g) = \int_a^b\alpha f+\int_a^b\beta g = \alpha\int_a^b f+\beta\int_a^b g. $$

This proves the theorem. \(\square\)

The proof highlights why negative scalars deserve attention. Multiplying by a negative number reverses the order of function values, so it exchanges the roles of lower and upper integrals. The integral identity still holds because an integrable function has equal lower and upper integrals.

Worked Applications

Worked Example: Integrating a Sum of Step Functions

Define \(f,g:[0,3]\to\mathbb{R}\) by

$$ f(x)= \begin{cases} 2,&0\leq x<1,\\ -1,&1\leq x\leq3, \end{cases} \qquad g(x)= \begin{cases} -3,&0\leq x<2,\\ 4,&2\leq x\leq3. \end{cases} $$

Both are step functions, hence Riemann integrable. From the formula for the integral of a step function,

$$ \int_0^3 f(x)\,dx=2(1-0)+(-1)(3-1)=2-2=0, \qquad \int_0^3 g(x)\,dx=(-3)(2-0)+4(3-2)=-6+4=-2. $$

Linearity therefore gives \(\int_0^3(f+g)=-2\). To check the result directly, use the common subdivision at \(1\) and \(2\). On \([0,1)\), \(f+g=2+(-3)=-1\); on \([1,2)\), \(f+g=-1+(-3)=-4\); and on \([2,3]\), \(f+g=-1+4=3\). Thus

$$ \int_0^3(f(x)+g(x))\,dx =(-1)(1-0)+(-4)(2-1)+3(3-2) =-1-4+3=-2. $$

The direct computation agrees with the theorem. Values at the finitely many subdivision points do not alter these step-function integral calculations.

Worked Example: A Negative Scalar Multiple

Let \(f:[0,2]\to\mathbb{R}\) equal \(-2\) for \(0\leq x<1\) and \(5\) for \(1\leq x\leq2\). Its integral is

$$ \int_0^2 f(x)\,dx=(-2)(1-0)+5(2-1)=-2+5=3. $$

Multiplication by \(-2\) changes the values of \(f\) to \(4\) and \(-10\) on the same respective intervals. Consequently,

$$ \int_0^2 -2f(x)\,dx=4(1-0)+(-10)(2-1)=4-10=-6. $$

This equals \(-2\int_0^2 f(x)\,dx=-2(3)=-6\). The calculation illustrates that a negative coefficient changes the sign and size of the integral exactly as linearity predicts.

Worked Example: Combining Several Terms

On \([0,3]\), let \(f\) equal \(1\) on \([0,1)\) and \(2\) on \([1,3]\). Let \(g\) equal \(-2\) on \([0,2)\) and \(3\) on \([2,3]\). Their integrals are

$$ \int_0^3 f(x)\,dx=1(1-0)+2(3-1)=1+4=5, \qquad \int_0^3 g(x)\,dx=(-2)(2-0)+3(3-2)=-4+3=-1. $$

For \(h=3f-2g\), linearity gives

$$ \int_0^3 h(x)\,dx =3\int_0^3 f(x)\,dx-2\int_0^3 g(x)\,dx =3(5)-2(-1)=17. $$

The common subdivision at \(1\) and \(2\) verifies the result: the values of \(h\) on the three intervals are \(3(1)-2(-2)=7\), \(3(2)-2(-2)=10\), and \(3(2)-2(3)=0\). Hence

$$ \int_0^3 h(x)\,dx=7(1-0)+10(2-1)+0(3-2)=7+10+0=17. $$

Writing the function as a linear combination lets us calculate its integral from the two simpler integrals.

Finite Linear Combinations

The two-function theorem can be applied repeatedly. This gives a convenient rule for any finite collection of integrable functions, with no need to construct a new Darboux-sum argument for every term.

Corollary (Linearity for Finite Sums): Let \(n\geq1\), let \(f_1,\ldots,f_n:[a,b]\to\mathbb{R}\) be Riemann integrable, and let \(c_1,\ldots,c_n\in\mathbb{R}\). Then $$ \int_a^b\left(\sum_{k=1}^{n}c_k f_k(x)\right)\,dx = \sum_{k=1}^{n}c_k\int_a^b f_k(x)\,dx. $$

Proof. Each \(c_kf_k\) is integrable by the Linearity of Riemann Integrability Theorem. For \(n=1\), the statement is the scalar-multiple part of the Linearity of the Riemann Integral Theorem. Suppose the formula holds for \(n\) functions. The sum of the first \(n\) terms is integrable, and adding \(c_{n+1}f_{n+1}\) preserves integrability. Applying the two-function additivity theorem and then the induction hypothesis gives

$$ \begin{aligned} \int_a^b\left(\sum_{k=1}^{n+1}c_kf_k(x)\right)\,dx &= \int_a^b\left(\sum_{k=1}^{n}c_kf_k(x)\right)\,dx +\int_a^b c_{n+1}f_{n+1}(x)\,dx\\ &= \sum_{k=1}^{n}c_k\int_a^b f_k(x)\,dx +c_{n+1}\int_a^b f_{n+1}(x)\,dx. \end{aligned} $$

This is the asserted formula for \(n+1\), completing the induction. \(\square\)

What Linearity Does Not Allow

Linearity applies to addition and scalar multiplication of functions. It does not say that integration preserves multiplication. In general, one cannot replace the integral of a product by the product of the integrals.

For a concrete example, define \(q:[0,1]\to\mathbb{R}\) to equal \(1\) on \([0,1/2)\) and \(-1\) on \([1/2,1]\). This step function has integral

$$ \int_0^1 q(x)\,dx=1\left(\frac12\right)-1\left(\frac12\right)=0. $$

But \(q(x)^2=1\) everywhere, so

$$ \int_0^1 q(x)^2\,dx=1, \qquad \left(\int_0^1 q(x)\,dx\right)^2=0^2=0. $$

Thus \(\int_0^1 q(x)^2\,dx\ne\left(\int_0^1 q(x)\,dx\right)^2\). The integral of a sum can be split into a sum of integrals; the integral of a product generally cannot be split in this way.

A useful way to apply linearity is to identify the exact form of the function before manipulating its integral. If it is a finite sum of constant multiples of integrable functions, the finite-sum corollary applies. If it is a product or another nonlinear expression, a separate theorem or argument is needed.

1
Check integrability.
Use the earlier linearity of Riemann integrability to ensure the sum or scalar multiple is integrable.
2
Separate sums and coefficients.
Apply additivity to sums and pull real scalar coefficients outside the integral.
3
Check the operation.
Do not distribute an integral over a product; linearity concerns sums and scalar multiples.

Check Your Understanding

Use the linearity theorem and the earlier properties of Darboux integrals to answer the following questions.

  1. Which two Darboux integral inequalities are used to prove that the integral of a sum equals the sum of the integrals?
  2. Why does multiplication by a negative scalar exchange the lower and upper integrals?
  3. If \(\int_a^b f(x)\,dx=4\), what is \(\int_a^b -3f(x)\,dx\), provided \(f\) is integrable?
  4. State the finite-sum formula for the integral of \(\sum_{k=1}^n c_k f_k\), where every \(f_k\) is integrable.
  5. Why does the step function \(q\) show that the integral of a product cannot generally be replaced by the product of the integrals?