4

What is the definition of a variable as opposed to a constant? I was trying to figure it out the other day. First I thought that a constant must only take 1 value (e.g. if $x+1=0$, then $x$ must be a constant) and a variable can take any of several values (e.g. if $y=x+1$, then $x$ is a variable because $x$ can be any of $\{x \mid x \in \Bbb R\}$). But then I thought that when doing integrals we often get a constant $C$ in our equations, which could potentially take any value -- and thus makes our solution actually a class (or set or something) of solutions.

So what actually IS the definition of a constant vs. a variable?

4 Answers4

3

It is a matter of perspective really. If we look at the physics formula: $E=mgh$ we see three letters in this equation.

Suppose we are on earth and we are looking at an object of mass $2$kg. We would like to know the value of $E$ for different values of $h$ (height). So $h$ acts as the variable and $m$ and $g$ are constants. Because we are considering the hypothetical situation were $m$ and $g$ are known. In this particular case $E(h)=2\cdot9.81h$.

Now suppose we are on earth again, and consider dropping something from a height of $3$m. We would now like to know the value of $E$ for different values of $m$. Now $m$ acts as the variable and $h$ and $g$ are considered constants. Because we are considering the hypothetical situation were $h$ and $g$ are known. In this particular case $E(m)=3\cdot9.81m$.

Likewise we could make $E$ a function of $g$, with $m$ and $h$ constants.

So it all comes down to what you assume to be known information. Any thing that isn't known is unknown/variable, within the context.

Of course if you would like to, you could even see $E$ as a function of three variables: $E(m,g,h)$. It all depends on what qualities of $E$ you want to describe.


For your integral example: we say $\int 2x\,dx=x^2+C$, with $C$ a constant. That is because we say that $\int 2x\,dx$ is a function whose derivative is $2x$.

You can interpret the phrase $\int 2x\,dx=x^2+C$ in the above way, saying something like this:

Suppose we have the function $x^2+1$, then its derivative is $2x$.

gebruiker
  • 6,272
1

\begin{align} \frac{d}{dx} 2^x = \lim_{\Delta x\to0} \frac{2^{x+\Delta x}-2^x}{\Delta x} & = \lim_{\Delta x\to0} \left(2^x \frac{2^{\Delta x} - 1}{\Delta x} \right) \\[12pt] & = \underbrace{{}\quad 2^x\quad{}}_{\text{constant}} \lim_{\Delta x\to0} \frac{2^{\Delta x} - 1}{\Delta x} \tag 1 \\[12pt] & = \underbrace{{}\quad 2^x\quad{}}_{\text{NOT constant}}\ \underbrace{\lim_{\Delta x\to0} \frac{2^{\Delta x} - 1}{\Delta x}}_{\text{constant}} \tag 2 \\[12pt] & = (2^x\cdot\text{constant}). \end{align}

Step $(1)$ is justified because $2^x$ is a constant, i.e. it does not change as $\Delta x$ changes. In $(2)$, the limit is a "constant" because it does not change as $x$ changes.

\begin{align} \int_a^b\int_c^d f(x)g(y)\,dy\,dx & = \int_a^b\left(\int_c^d f(x)g(y)\,dy\right) \, dx \\[12pt] & = \int_a^b \left(\underbrace{{}\quad f(x)\quad{}}_{\text{constant}} \int_c^d g(y)\,dy \right) \, dx \tag 1 \\[12pt] & = \int_a^b \underbrace{{}\quad f(x)\quad{}}_{\text{NOT constant}} \,dx \cdot \underbrace{\int_c^d g(y) \, dy}_{\text{constant}} \tag 2 \end{align} Step $(1)$ is justified because $f(x)$ is a constant, i.e. it does not change as $y$ changes. Step $(2)$ is justified because the integral with respect to $y$ is constant, i.e. it does not change as $x$ changes.

0

It depends on the context.

For instance, in a formal language constants are special symbols that are labelled as such: what distinguish them from variables is the way they are treated in the interpretations of the language (i.e. when one builds models of the formal language). In physics a constant is a specific quantity whose value is considered to be independent of time, at least within a reasonable degree of confidence and a certain time scale (e.g. the elementary charge, the mass of a proton, the Newtonian gravitational constant etc.)

0

When we say

$$\int ax\;dx=\frac{1}{2}ax^2+C,$$

"where $C$ is a constant" we mean that $C$ does not depend on the variable of the function under consideration (however, we also are not saying that it's a specific constant).

The Dictionary of Analysis, Calculus, and Differential Equations (by Douglas N. Clark) brings the following definitions.

Constant: A quantity that does not vary. A symbol that represents the same quantity throughout a discussion.

Parameter: A variable, or one of several variables, used to characterize the elements of a family (e.g., a family of differential equations, or a family of curves).

Variable: A quantity, often denoted $x$, $y$, or $t$, taking values in a set, which is the domain of a function under consideration. When the function is $f : X \to Y$ , we write $y = f (x)$ when the function assigns the value $y \in Y$ to $x \in X$. In this case, $x$ is called the independent variable, or abscissa, and $y$ the dependent variable, or ordinate.

From this point of view, we can say that in the example above $C$ is a parameter (that characterize the family of integrals of $f(x)=ax$). Of course, $x$ represents the variable of the function under consideration. And $a$ can be seen as constant (because it's not depends on the variable $x$) or a parameter.

Pedro
  • 19,965
  • 9
  • 70
  • 138
  • Not that I'm disagreeing with you, but that definition of variable is inconsistent: if $y=f(x)$, then the values of $y$ are NOT necessarily in the domain of the function -- they are in the image (or codomain). –  Jul 07 '14 at 19:10
  • @Bye_World I'm not sure if it's your point, but notice that the symbol $y$ in the first sentence of the definition of variable and the symbol $y$ in the second sentence are not the same. – Pedro Jul 07 '14 at 19:16
  • No. But they're the same in the 2nd and 3rd sentences. The third sentence calls it a "dependent variable", thus the first sentence should apply too. –  Jul 07 '14 at 19:17
  • Unless, of course, a "dependent variable" is not a "variable" -- but that's just silly nomenclature, then. –  Jul 07 '14 at 19:19
  • @Bye_World I think you are right. In that definition, "independent variable" and "variable" are synonyms but "dependent variable" is not a variable. – Pedro Jul 07 '14 at 19:28