# Some Conceptual Difficulties in the Roles of Variables and Constants

**Estimated Read Time:**5 minute(s)

**Common Topics:**variables, variable, padding, function, constant

Table of Contents

### 1. Variables and Constants

When is a constant not a constant? When it varies.

In the standard equation ##y=ax+b##, we are used to thinking of *x* and *y* as variables, *a* and *b* as constants. But it is just an algebraic relationship between four unknowns. What is it that makes two of the variables and the other two constants?

Suppose *x* and *y* are the coordinates of an object that can be anywhere on a ramp of the slope *a*. If the ramp has a fixed slope and fixed location, then it makes sense to consider *a* and *b* as constants. But if we switch attention to another ramp, *a* and *b* will be different, so we discover these are variables too.

Ultimately, it is a matter of scope. If in analyzing a problem we say that some unknowns are constants, we just mean they will not change during the scope of this analysis.

For example, suppose we differentiate the equation with respect to *x*. We are accustomed to writing

##\frac {dy}{dx} = a##

But it would be more circumspect to consider *y* as depending on *x*, *a,* and *b*, so a completely pedantic form of differentiation would specify that *a* and *b* are held constant:

##\left.\frac{\partial y}{\partial x}\right|_{a, b}\;=a##

But having declared that *a* and *b* are constants at the start, this is unnecessary.

### 2. Functions, Variables, and Puns

The expression

##y = f(x)##

tells you that *x* and *y* are variables, and the value of *y* depends on the value of *x* according to the function *f*. Thus if *f* is the function “square the input”, then when *x*=2, *y* will be 4.

If the function is invertible then in principle we can turn this around to

##x = f^{-1}(y)##

making *x* depends on *y*. But for many purposes, it is convenient to think of *x*, say, as a driving variable – the **independent,** or** free,** variable – and *y* as the **dependent** variable. (This may reflect physical reality.)

Sometimes we read:

##y=y(x)##

This still says that the value of *y* depends on the value of *x, *but without specifying a distinct name for the functional relationship. This confuses many students because it is a **pun** – two distinct things, a variable, and a function, with the same name.

The potential for confusion can be illustrated by considering two dependent variables each having the same functional relationship to two independent variables.

##y = f(x)##

##z = f(t)##

This connection cannot be expressed in the punning notation.

It may also happen that *y* is a function of *x*, which is, in turn, a function of *t*:

##y = y(x)##, ##x=x(t)##

But in that case, *y* is indirectly a function of *t*, and it may be confusing to write

##y = y(t)##

So it is best to treat ##y=y(x)## as merely a shorthand for “*y* depends on *x*“, and not treat it as a regular algebraic statement.

### 3. Dummy variables

Dummy variables arise in summations, products and integrals. They act as an agent inside the sum or product but have no existence beyond it:

##F(x, n) = \Sigma_{i=1}^ni^2\sin(ix)##

The value of *F* does not depend on *i*. *i* is a dummy variable in the sense that any other variable name, not otherwise yet employed, could be substituted:

##\Sigma_{i=1}^ni^2\sin(ix)= \Sigma_{j=1}^nj^2\sin(jx)##

The completely accurate form of an indefinite integral is similar:

##\sin(\theta) = \int_{\phi=0}^{\theta}\cos(\phi).d\phi##

but it is common to read the shorthand version:

##\sin(\theta) = \int_0\cos(\theta).d\theta##

This is another **pun**. The ##\theta## on the right, in both places, is a dummy variable, unconnected with the ##\theta## on the left.

*Example*: Evaluating ##\int_{x=-\infty}^{+\infty}e^{-\frac{x^2}2}.dx##Let ##I=\int_{x=-\infty}^{+\infty}e^{-\frac{x^2}2}.dx##This is the clever bit:

##I^2 =\int_{x=-\infty}^{+\infty}e^{-\frac{x^2}2}.dx\int_{x=-\infty}^{+\infty}e^{-\frac{x^2}2}.dx##

Changing the dummy variable in one copy of the integral…

## =\int_{x=-\infty}^{+\infty}e^{-\frac{x^2}2}.dx\int_{y=-\infty}^{+\infty}e^{-\frac{y^2}2}.dy##

allows us to merge the integrals:

## =\int\int_{x=-\infty, y=-\infty}^{+\infty+\infty}e^{-\frac{x^2+y^2}2}.dxdy##

A switch to polar handles that awkward quadratic exponent:

## =\int\int_{r=0, \theta=0}^{+\infty,2\pi}e^{-\frac{r^2}2}r.drd\theta##

and after a little work:

##=2\pi##

### 4. Implicit relationships

In partial derivatives we may read:

##\frac{\partial f(x, y)}{\partial x}##

This refers to the rate of change of *f* as *x* changes but *y* stays constant. That it’s *y* that’s to be held constant is implicit in the fact that *f* is only a function of *x* and *y*, and the partial derivative notation means “only changing this free variable”.

There is an explicit notation available, but it’s rarely used in this general form:

##\left.\frac{\partial f}{\partial x}\right|_{y}\;##

[It is used more when the partial derivative is wanted at some specified value of the fixed variable: ##\left.\frac{\partial f}{\partial x}\right|_{y=y_0}\;##]

Since there’s an implicit holding constant of the other free variable, why do we need a partial differentiation notation at all? Consider an arc in the plane given by ##y=x^2##. We may wish to study how *f* changes along that arc. We can write

##\frac{df}{dx} = \frac{\partial f}{\partial x}\frac{dx}{dx}+\frac{\partial f}{\partial y}\frac{dy}{dx} = \frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}2x##

So we see that ##\frac{df}{dx}## has a meaning distinct from ## \frac{\partial f}{\partial x}##.

It gets trickier when there are other sets of free variables. E.g. we could have *f* as a function of position in a plane, and invoke both Cartesian and polar coordinates. Thus, ##\frac{\partial f}{\partial r}## means holding ##\theta## constant, but letting *x* and *y* vary as they must.

Masters in Mathematics. Interests: climate change & renewable energy; travel; cycling, bushwalking; mathematical puzzles and paradoxes, Azed crosswords, bridge

Nice article, though I can't follow the section on derivatives as I haven't reached calculus yet. At a much simpler level (which is where I'm at as an older adult/amateur learner revisiting high school math), I sometimes invent "temporary variables" just for purposes of calculating; e.g. there was a homework question recently about a word problem in basic algebra that stated, among other things, "##d## is ##k## percent less than ##c##". Solving it myself for fun, rather than work directly with ##d = (1-k)c##, I made a temporary variable ##k' = 1-k## so I could get rid of the parens and just say ##d = k'c##, postponing the subtraction until after everything else was done. But that's just me working on my own; I have no idea if "temporary variables" are used by other people.

haruspex submitted a new PF Insights post

Conceptual Difficulties in the Roles of Variables

View attachment 178528

Continue reading the Original PF Insights Post.I think there are still important pitfalls that might deserve deeper explanations and details:

Consider ## (x, y) ## and ## (x, u) ## two coordinate systems with the common coordinate ##x## and a smooth function ##f##. I can then compute ## (frac{partial f}{partial x}, frac{partial f}{partial y}) ## and ## (frac{partial f}{partial x}, frac{partial f}{partial u}) ##. But the two objects ## frac{partial f}{partial x} ## are in fact entirely different functions : ## left. frac{partial f}{partial x}right|_y ## and ## left. frac{partial f}{partial x}right|_u ##. The fact that derivation along a

singlecoordinate depends on theentirecoordinate system would really deserve to be insisted upon.Nice work! Love the first statement!