# How to convince students of the integral identity $\int_0^af(x)dx=\int_0^af(a-x)dx$?

A common identity in integration is $\int_0^af(x)dx=\int_0^af(a-x)dx$.

The steps to prove it (algebraically, ignoring the geometric method) are as follows.

Let $u=a-x$ so $dx=-du$.

$\int_0^af(a-x)dx=-\int_a^0f(u)du=\int_0^af(u)du=\int_0^af(x)dx$

My students often aren't convinced as to how $\int_0^a f(u)du$ can just become $\int_0^a f(x)dx$ because of the relationship $u=a-x$.

My way of convincing them of this is to ask them to evaluate for me

$\int_0^a x^2 dx$

$\int_0^a y^2 dy$

$\int_0^a z^2 dz$

Sometimes this works but there have been times when they've said "Oh but that's because there's no relationship between $x$, $y$ and $z$!

Have you ever had this problem? Do you perhaps have any suggestions in this scenario?

Also, I'm not too sure what tags to attach to it, some help here would be appreciated.

• How would your students feel about making the transformation $x = u$ in the second integral, and observing that $\mathrm dx = \mathrm du$? (This seems silly to us, but I've had students seriously propose it as a possible simplifying substitution.) If they don't like re-using $x$, then trying it with $y$, $z$, $w$ (which, as calculus teachers know, is the letter after $z$), and so on may help to convince them that the variable name truly doesn't matter. (EDIT: Or you could practice making that transformation first, so the 'dummy'ness of the variable is familiar before its appearance here.) – LSpice Mar 28 '15 at 23:05
• The notation describes the area of a figure in the plane. This geometrical quantity is independent of the choice of coordinates used to describe the plane. – Ben Crowell Mar 29 '15 at 22:14
• @BenCrowell, Trogdor mentions at matheducators.stackexchange.com/questions/7694/… (and should maybe include in the body of the post …) that the students specifically ask for an algebraic justification of this fact, not just a geometric one. – LSpice Mar 30 '15 at 22:50

## Problem of sloppy notation

The notation is sloppy. Your students are justifiably confused. We've just gotten used to it.

In order to untangle this, we need the notion of free variables and bound variables. These have somewhat confusing, perhaps even counter-intuitive names. So, I will use "local" as synonymous with "bound" and "non-local" as synonymous with "free".

When we write the expression $\int_0^a f(x) dx$, the $x$ is a local (bound) variable. It does not refer to anything external to the expression. The meaning of $x$ is "bound" within the $\int$-operation. Local (bound) variables may be thought of as conveniences or placeholders. Their names do not matter. So, we could also write $\int_0^a f(v) dv$ and mean the exact same thing.

In the expression $\int_0^a f(x) dx$, the $f$ and $a$ are non-local (free). They refer to objects that need some external context. Another way to say this is that the expression is a function of $f$ and $a$, that is we could write $g(f,a) = \int_0^a f(x) dx$. It is not a function of $x$. We could write this function instead as $g(f,a) = \int_0^a f(v) dv$ and mean the same thing.

Now consider the expression put before your students.

$$\int_0^af(a-x)dx=-\int_a^0f(u)du=\int_0^af(u)du=\int_0^af(x)dx \qquad (1)$$

In equation (1) you've asked your students to consider $u$ as non-local variable and equal to $a-x$ in the exposition for the leftmost equality.On the right hand side that context has already been dropped. In the rightmost equality, students are confused that $u$ is treated as a local variable, that is not subject to the context of $u = a - x$.

Indeed, if we are allowed to let context come and go, then we could continue equation (1) as follows since $x = a - u$

$$\int_0^af(x)dx = -\int_0^af(a-u)du \qquad (2)$$

Combining (1) and (2) we have

$$\int_0^af(a-x)dx=-\int_0^af(a-u)du \qquad (3)$$

And dropping context once more to consider $u$ as local to the $\int$-expression only, we'd get

$$-\int_0^af(a-u)du=-\int_0^af(a-x)dx \qquad (4)$$

And putting our results together we have arrived at

$$\int_0^af(a-x)dx=-\int_0^af(a-x)dx \qquad (5)$$

Which of course implies that for any $f$ and $a$, $\int_0^af(a-x)dx=0$. Yikes! Your students are wise to be wary of applying and dropping context.

## Problem of missing the key transformation

Consider instead writing $u = \phi(x) = a - x$, in other words $u$ is a function. Then, develop purely with derivatives and algebraic substitution that

$$\int_0^af(a-x)dx=-\int_0^a f(\phi(x))\phi'(x) dx \qquad (6)$$

Now we often just write $u = \phi(x)$ and $du = u'(x) = \phi'(x)dx$, so we could also write (6) as

$$\int_0^af(a-x)dx=-\int_0^a f(u)du \qquad (7)$$

However, at this point we are yet to actually do integration by substitution. Going from (6) to (7) is just a change in notation! Continuing from (6), integration by substitution, which requires two applications of the fundamental theorem of calculus, allows the following

\begin{align} \int_0^af(a-x)dx &=-\int_0^a f(\phi(x))\phi'(x) dx \\ &=-\int_{\phi(0)}^{\phi(a)} f(v) dv \end{align}

where $v$ is a local variable! Writing this same development with $u$ notation instead, that is continuing equation (7), we'd have

\begin{align} \int_0^af(a-x)dx &=-\int_0^a f(u)du \\ &=-\int_{\phi(0)}^{\phi(a)} f(v)dv \end{align}

So, where it looks like we've simply swapped names for $u$ and $v$ and changed the limits, we actually applied the fundamental theorem of calculus twice! That is what justifies the apparent dropping of context, and it is no trivial result.

No since $x$ and $v$ are local variables (bound within their own $\int$-expressions), we can now rename those as we like, such as naming $v$ as $x$ to get

\begin{align} \int_0^af(a-x)dx &=-\int_0^a f(u)du \\ &=-\int_{\phi(0)}^{\phi(a)} f(v)dv \qquad \text{by integration by substitution} \\ &=\int_0^a f(v) dv =\int_0^a f(x) dx \end{align}

• +1 simply for the concept that your students having trouble with something may say more about you/the maths than your students – DavidButlerUofA Mar 25 '15 at 18:49
• I agree with the importance of explaining the local and non-local variables (I too like those terms better, they fit well with computer science classes student can have in parallel); but I also think that we should teach student to write change of variables in the usual, however sloppy way. They swill meet it everywhere, in physics notably, and it is very convenient for computations. – Benoît Kloeckner Mar 25 '15 at 21:38
• The notation is confusing, but not sloppy. Besides, I can't agree with your description of $(1)$, if $u$ was a non-local variable, then you could not use $\int \bullet\ \mathrm{d}u$. The fact that $u$ appears next to $\mathrm{d}$ means that it is a local variable, and it is not equal to $a-x$, it just happens to range over the same set of values. – dtldarek Mar 31 '15 at 10:10
• @dtldarek You are right. I should attempt a reword. I meant that $u = a -x$ was defined in the exposition for the leftmost equality, but yes that context is dropped already on the right hand side. This is the step we've all gotten used to, but confused students might be helped by doing two steps -- a change of variables, then integration by substitution with a unique variable name. – A. Webb Mar 31 '15 at 12:12

This answer attacks not only this problem, but a lot of all others. At the expense of going against the grain, however.

A much deeper issue is this permanent grip on the concept of 'function of a variable' which I've described in the past as pedagogical cancer. There's no such thing as the function $f(x)$ (unless $f$ is a functional, but that's a different matter), the function is $f$. If one wants to talk about $f$ evaluated at generic value, one takes a variable name, say $x$ (or $u$) and one writes $f(x)$ (or $f(u)$) and it doesn't matter what variable one chooses. Then some properties are proven and $\forall x(\text{something})$ is concluded, which is equivalent to $\forall u(\text{something})$, the variables are bound.

To avoid the present problem, the one linked above and many others, rid the students of this inadequate concept.

The symbol $\small{\displaystyle \int\limits_a^b f(x)\,\mathrm dx}$ is just another way of writing $\small{\displaystyle \int\limits_a^b f}$ and this is true for $\small{\displaystyle \int\limits_a^b f(u)\,\mathrm du, \int\limits_a^b f(z)\,\mathrm dz, \int\limits_a^b f(\text{cancer})\,\mathrm d\text{cancer}}$, etc.

And if certain requirements are met, integration by substitution says that $$\displaystyle \int\limits_a^b f=\int \limits_{u^{-1}(a)}^{u^{-1}(b)}\left(f\circ u\right) u'.$$

Where's your $x$ now? In doing this it's not so much that the students answer the question themselves, it's more that the question will not even arise.

• This is mathematically unassailable, but I have my doubts as to whether it would make sense to the students Trogdor describes in the OP. – mweiss Mar 25 '15 at 13:53
• @Aeryk No. One of the main points of GitGud's answer is that one doesn't need the $d$'s and one is better off without them. – Andreas Blass Mar 25 '15 at 17:43
• @mweiss I share the same concern. If they are high school students, I might abandon my idea. But beyond high school, I think it is a terrible idea to learn/teach maths without first introducing the students to informal logic, proof strategies, etc (How to Prove It, basically), including the concept of bound variable. Having this concept is enough to make sense of what I suggest, it's not necessary to go through all basic informal logic. – Git Gud Mar 25 '15 at 22:58
• I think you could just say that the notation $\int_a^b f$ is defined to be the same thing as $\int_a^b f(x) dx$ is defined to be without need to reference the technical details of either definition. In other words, we mean the same thing by $\int_a^b f$ because that's what we've agreed for it to mean, a notational convenience. – A. Webb Mar 26 '15 at 17:16
• @GitGud I really thought is was $\int_{a}^{b}f = \int_{u^{-1}(a)}^{u^{-1}(b)} (f\circ u)(u^{\prime})$ because, for a primitive $F$ of $f,$ the left-hand-side gives $F(b)-F(a)$ whereas the right-hand-side gives $F(u(u^{-1}(b))) - F(u(u^{-1}(a))).$ Am I not thinking straight? I find I get muddle with the substitution formula when proving/thinking about it formally. – Shai Apr 1 '15 at 21:04

I would ask students to consider what the graphs of $f(x)$ and $f(a-x)$ look like (and how they are related to each other) on the interval $[0,a]$.

Draw a sketch of some arbitrary-looking function on $[0,a]$ and label it $f(x)$. Now we want to figure out what $g(x)=f(a-x)$ looks like. By direct computation, $g(0)=f(a)$ and $g(a)=f(0)$. Once you have those, it is not hard to realize that the graph of $g(x)$ is just a mirror-reversal (left-to-right) of the graph of $f(x)$. Draw that sketch and label it $f(a-x)$. (At this point it probably wouldn't hurt to remind students of their prior experience with function transformations.)

Once they see that the graph of $f(a-x)$ on $[0,a]$ is simply a mirror-reversal of the graph of $f(x)$ on the same interval, it should be obvious why the areas under the two curves are equal.

• This is the way I teach it to them if I were to take a geometric approach. But many have asked me for a purely algebraic approach, in which I have the above problem. – Trogdor Mar 25 '15 at 2:55
• So is the issue purely the replacement of one dummy variable with another? – mweiss Mar 25 '15 at 2:58
• That is exactly the problem. The students keep thinking that because the two dummy variables have a relationship, then we cannot just turn one to the other like that. – Trogdor Mar 25 '15 at 2:59
• Okay, I think I have a clearer sense now of what you are asking. I think the issue has to do with a lack of understanding of just what "dummy variables" mean in a definite integral. I will give some thought to this and try to come up with another answer. – mweiss Mar 25 '15 at 3:02
• @Trogdor Symmetry is not constrained to geometry, it is a nice, intuitive explanation, but we are not obliged to use it. Even with an algebraic approach the symmetry works just as well. If you don't want to interpret the integral as the "area under a curve", then you can use just the definition, reflect all the points/sets/intervals or whatever you are using and get exact equality (i.e. for each element of converging sequence there is a reflected one with exactly same value). – dtldarek Mar 31 '15 at 9:59

Consider $\int f(a-x) dx$. Let $F(x)$ be an antiderivative of $f(x)$. Write $u=a-x$, which means $du = -dx$ and $-du = dx$. Then \begin{align} \int f(a-x) dx &= \int -f(u)du \\ &= -F(u)+C \\ &= -F(a-x) + C. \end{align} Thus $-F(a-x)$ is an antiderivative of $f(a-x)$.

So \begin{align} \int_0^a f(a-x)dx &= \big[-F(a-x)\big]_0^a \\ &= -F(a-a) - - F(a-0) \\ &= F(a)-F(0). \end{align} Also \begin{align} \int_0^a f(x)dx &= \big[F(x)\big]_0^a \\ &= F(a) - F(0). \end{align} So the two definite integrals are the same.

I think the point you're trying to make is that it doesn't matter what the variable is, even if you've mentioned it already, because it will eventually be replaced with proper numbers later. And therein lies the issue, I think: many students don't behave as if they realise that the definite integral is a number. To say that $\int_a^b f(x) dx = \int_a^b f(u)du$ is to say that these two numbers are equal. Actually performing the calculation in some way to have the numbers themselves may go some way to convincing them of that.

In $\int_0^af(x)\,dx$, the inputs to $f$ begin at $0$ and progress to $a$.

In $\int_0^af(a-x)\,dx$, the inputs to $f$ begin at $a$ and progress to $0$.

So when considering Riemann sums with uniform-width bases and using midpoints for test points, the two collections of heights of the rectangles in the expressions are the same.

• Just let Riemann out of this. Every time a student hears name of a mathematician he stops thinking in anticipation of complexities. Simply tell them that the road from $0$ to $a$ is the same as from $a$ to $0$ independent on where you start provided the $f$ is the same. – Thinkeye Mar 26 '15 at 16:30
• @Thinkeye You can leave out the name, but I'd never leave out the idea that an integral is a sum of rectangle bases ($dx$) with rectangle heights ($f(x)$). And here, nothing changes with the bases, and the only "change" with the heights is reordering. – alex.jordan Mar 26 '15 at 17:41
• You are absolutely right, it's the idea what counts. I only wanted to say that you are better off first explaining the idea and adding the name of the author to students later. After they have absorbed the concept, the name doesn't scare them anymore. – Thinkeye Mar 27 '15 at 11:31