When teaching Calculus, one thing that many teachers emphasize is that the variable of integration is a `dummy variable' that is unimportant.

Around the same time, we introduce integrals with variables in the limits of integration. Students are told not to use the same variable as a limit and as a variable of integration, i.e.

$\int_0^x x^2 dx$.

What is a concrete way to show students that this is a bad idea, without contradicting the fact that the variable of integration is a dummy variable?

  • 13
    $\begingroup$ It is unfortunate that mathematics have not incorporated a no(ta)tion of "local variables" like that available for computer programming. Not only would it obsolete this question it will also make the writing of research monographs somewhat easier. $\endgroup$ Commented Mar 21, 2014 at 10:21
  • 3
    $\begingroup$ I believe this is not just a problem of notation, but a problem of understanding the concept of a "variable". There are many similar problems, like substitution or renaming. $\endgroup$
    – Anschewski
    Commented Mar 21, 2014 at 11:33
  • 3
    $\begingroup$ show students that this is a bad idea, without contradicting the fact that the variable of integration is a dummy variable – Well, do not forget to make clear that you are not trying to prove (in the mathematical sense) that such a notation is inherently wrong, but only want to show that it is bad idea or better: very bad practice. (After all, some programming languages work fine with something like integral(0, x, lambda x: x^2).) $\endgroup$
    – Wrzlprmft
    Commented Mar 21, 2014 at 22:40
  • 4
    $\begingroup$ @WillieWong, why do you think mathematics doesn't have this concept? This issue is fundamentally about the scope of a variable and is typically covered in any elementary math logic course. See mathoverflow.net/a/115581/1946. $\endgroup$
    – JDH
    Commented Mar 23, 2014 at 20:17
  • 2
    $\begingroup$ @JoelDavidHamkins: by incorporated I meant in the large and away from the few specialist disciplines, and also in the sense of mathematical writing and not just in individual formulae. It is common practice in many fields to see recycling/reusing variable names for multiple purposes in one paper as a sign of poor writing (think along the lines of $\eta$ defined and used only in Section 1 being different from the $\eta$ defined and used only in Section 3). $\endgroup$ Commented Mar 24, 2014 at 8:36

6 Answers 6


Elaborating my comment into a full answer. To me such an error is mostly a notational issue, where the students who instinctively know what they're doing and do get to the right answer, just write it poorly. This is an issue where students aren't use to the formal writing of math just yet.

Usually such a formulation would occur after they have seen the fundamental theorem of calculus in a Calc 1 course (as I have seen in my courses at least). If I noticed students doing this, I would provide the example $F(x) =\int_0^x x^2dx$ and evaluate $F(1)$ to show how their overuse of the variable x confuses things. Interpreting as a valuation of the area under a curve, this $F$ is a function on the width of the area under the curve, not the curve itself. Thus they should have differing variables, perhaps written as $F(x) = \int_0^x t^2 dt$, and compare this to the fundamental theorem of calculus's statement on this.

I don't think mathematics needs a "local variable" concept, the instructor just needs to make it more clear what each variable is of (i.e., x is of width of area (or limit of integration) and t is the integrand). Many students at this level are not use to several variables being used, so renaming them is not a first instinct (book might use x as integrand for example). I find that going to the geometric interpretation helps conceptually ground the multivariate issue here.


The way a calculus course is usually built, before integrals you do Riemann sums and before that you do sums. I try to stress from the beginning in the sums that the running index is a "dummy variable" that disappears when you evaluate the sum. So

$\displaystyle \sum_{i=1}^n a_i = \text{some formula in } n, \text{but not in } i$

for example

$\displaystyle\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6} \text{ (-- the } i \text{ has vanished, what matters is the upper bound $n$)}$

And when one is at the integrals, completely similarly the $t$ under the integral is a dummy variable, so

$\displaystyle \int_{0}^{x} f(t) dt = \text{some formula in } x, \text{but not in } t$.

for example

$\displaystyle \int_{0}^{x} t^2 dt = \frac{1}{3}x^3 + C \text{ (-- the } t \text{ has vanished, what matters is the upper integral limit $x$)}$

So regarding your specific example, I would say writing $\int_0^x x^2dx$ is like writing $\sum_{i=1}^n n^2$. (I know in a specific sense it is not, actually; but I think this perspective can help students see the issue.)


I would say that the x in the variable of integration helps define the shape of the fence, while those at the limit are the fenceposts. Using the same variable name confuses them.

  • 1
    $\begingroup$ Nice. If it only was that simple to translate into summations... $\endgroup$
    – vonbrand
    Commented Mar 21, 2014 at 16:32

I believe this problem is caused by this needless desire to abbreviate everything into confusion.

Let's face it : everybody writes an integral as: $\displaystyle \int_{0}^{1} f(x) dx$

But this is completely wrong: in fact it should be: $\displaystyle \int_{x=0}^{x=1} f(x) dx$

In the second case it is clear that the boundaries mean that those are the values, taken by $x$ (you start by $x$ being 0, and you let $x$ go to 1). Only when this is very clear to the students, you might get go further and introduce the short notation.

So let's get to the question, what about: $\displaystyle \int_{0}^{x} f(x) dx$?

You can simply get back to the definition: $\displaystyle \int_{x=0}^{x=x} f(x) dx$ : do you mean that you want $x$ to go from 0 to $x$? (Here the student will need to admit that the whole question makes no sense) :-)

  • 3
    $\begingroup$ How do you arrive at the conclusion that the question makes no sense once we write $\int_{x=0}^{x=x}f(x)dx$. Certainly $x=x$ is a valid and true equation. Should I not be allowed to write it? $\endgroup$ Commented May 2, 2018 at 17:03
  • 3
    $\begingroup$ this is completely wrong -- no, you are wrong. There is nothing wrong with the expression $\int_{0}^{1} f(x) dx$. $\endgroup$
    – user9798
    Commented Sep 7, 2019 at 4:49

I think the $F(x) =\int \limits_0^x x^2\mathrm dx, F(1)=?$ trick just shifts the problem . Once you do this you give the students the right to ask, "well, set $F(t)=\int \limits_0^xt^2\mathrm dt$, what is $F(1)=?$".

The problem is that integration is an operator that takes functions as inputs. Given an integrable function $f$ no one would have any problem with $\int \limits _0^xf$. When one writes $\int \limits_0^x t^2\mathrm dt$ you're in a sense saying that $t^2$ is a function, or that it is a function of $t$ or something like that. But $t^2$ isn't a function, $t\mapsto t^2$ or $\{(t,t^2)\colon t\in\text{somewhere}\}$ are. And you can happily abbreviate any of the notations above with a letter ($f,g,h, \varphi, \ldots$). It is also important to note that $x\mapsto x^2$ and $t\mapsto t^2$ are one and the same function. The concept 'function of $x$' isn't defined (of course you can define it, but that brings a whole set of unnecessary problems into the mix).

The question asks

How can you explain to students that they should not use the same variable in an integrand and in the limits of integration simultaneously?

while the above implies what I mean as answer: explain what is actually being done and there's no reason to think they would have any problems with the notation.


For an example, try the following, which must be nearly the simplest possible example. Ask them to calculate directly the area of the triangle with vertices $(0, 0)$, $(x, 0)$, and $(x, x)$ as a function of $x$. Then do the calculation using integrals (so calculate $\int_{0}^{x}y\,dy$). Compare the result with the also sensible integral $\int_{0}^{x}x\,dy$, and investigate with them how this second integral calculates something else and what it is that it calculates (the area of the unique rectangle with the aforementioned vertices). This should help with explaining that the formally similar expression $\int_{0}^{x}x\,dx$ is meaningless. It might be helpful to do all of the following with some other letter, e.g. $b$, in place of $x$. I suspect many students will find that less confusing - because the variable name $x$ has for them magical significance as the universal argument of generic functions.

I see various issues underlying student confusion in this context. Although I find it hard to articulate them well, I'll give it a try.

  1. Students generally have a shaky understanding of the function concept. They see $f(x)$ and $f(y)$ as different objects, so can't see how the integral of $f(x)$ could be written as $\int_{0}^{x}f(y)\,dy$. To the student, $f(x)$ and $f(y)$ are different functions rather than a single function taking differently labeled arguments. This confusion is sometimes reinforced by the common practice of writing $f(s)$ as an abbreviation of the composition $f(r(s))$ (or something similar). This is somehow the same difficulty students have in understanding the chain rule, or even something apparently simpler such as that the variable of the sine functions is measured in radians not degrees.

  2. Students don't think of the integral notation as a symbolic shorthand indicating what needs to be done. In general, they like to translate notation literally into operations, and the integral notation has to be interpreted before it is made operational. Although they tend to think formally, they don't think operationally. This difficulty is apparent when one writes something like $\int_{\Gamma}E\cdot dr$ for the line integral of a vector field $E$ along a curve $\Gamma$. To actually calculate such an integral one has to parameterize the curve as $\gamma(t)$ for some $t \in [a,b]$ and compute the one-dimensional integral $\int_{a}^{b}E(\gamma(t))\cdot \dot{\gamma}(t)\,dt$ (and that the result does not depend on the choice of parameterization). The notation $\int_{\Gamma}E\cdot dr$ is a symbolic shorthand for this recipe and not something that can be put into some sort of 1-1 correspondence with the operations involved. With ordinary integrals the same interpretative issues arise, but are somehow harder to see because of the apparent simplicity of the context. The student doesn't read $\int \dots \,dy$ as notation indicating an operation with two arguments, one functional and one geometric, and the student doesn't interpret $\int_{a}^{b}$ as the integral over the interval $[a, b]$, so much as indicating a certain formal substitution procedure. From this point of view, $b$ will always be substituted by a number, and allowing it to vary, and treating it as a variable, and calling it $x$ rather than $b$, are all unnatural acts. In the context of ordinary integrals, the difficulty in interpreting the notation is compounded by the circumstance that many students incorrectly regard the so-called fundamental theorem of calculus as a tautology. For them the integral is the antiderivative operator formally inverse to differentiation, that sends a function to the equivalence class of its primitives, rather than the limit of some complicated (to them) sums (they really don't see why the professor fusses so much about these sums since they apparently never get used to calculate anything ...) and so the putative theorem is a tautology, showing that something incomprehensible can be evaluated in the usual way. The limits of the integral are then just placeholders indicating what to do with the primitive so obtained. They are indeterminate numbers (operationally always given fixed values) rather than variables.

To my mind the solution to these difficulties requires a variety of approaches.

  1. One has to communicate that the integral is a limit of sums, motivated by the calculation of areas, and give examples/exercises that require it to be approximated.
  2. One has to communicate that actually calculating primitives is in general impossible except via integration. That is, one doesn't generally know an explicitly given function that is the primitive of a given function. Too many calculus courses give the impression that we know the primitives of most functions.
  3. One has to train them well in the function concept, usually before teaching integration. It makes an early problematic appearance with the chain rule for calculating the derivative of a change of variables. In general, students who don't understand composition of functions well will not deal well with integrals.
  4. The confusion mentioned in the question is related to the difficulties students have with change of variables in integration. Change of variables is often taught as a formal procedure with no reference to composition of functions or change of domain.
  5. An integral has two arguments, not one. One is functional (the integrand), the other is geometric (the interval of integration), and the integral is a pairing assigning a number to a function and an interval. This point of view makes it as natural to vary the interval as to vary the function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.