Calculus – What Do ‘Function of’ and ‘Differentiate with Respect to’ Mean?

calculusderivativesterminology

In maths and sciences, I see the phrases "function of" and "with respect to" used quite a lot. For example, one might say that $f$ is a function of $x$, and then differentiate $f$ "with respect to $x$". I am familiar with the definition of a function and of the derivative, but it's really not clear to me what a function of something is, or why we need to say "with respect to". I find all this a bit confusing, and it makes it hard for me to follow arguments sometimes.

In my research, I've found this, but the answers here aren't quite what I'm looking for. The answers seemed to discuss either what a function is, but I know what a function is. I am also unsatisfied with the suggestion that $f$ is a function of $x$ if we just label its argument as $x$, since labels are arbitrary. I could write $f(x)$ for some value in the domain of $f$, but couldn't I equally well write $f(t)$ or $f(w)$ instead?

To illustrate my confusion with a concrete example: consider the cumulative amount of wax burnt, $w$ as a candle burns. In a simple picture, we could say that $w$ depends on the amount of time for which the candle has been burning, and so we might say something like "$w$ is a function of time". In this simple picture, $w$ is a function of a single real variable.

My confusion is, why do we actually say that $w$ is a function of time? Surely $w$ is just a function on some subset of the real numbers (depending specifically on how we chose to define $w$), rather than a function of time? Sure, $w$ only has the interpretation we think it does (cumulative amount of wax burnt) when we provide a time as its argument, but why does that mean it is a function of time? There's nothing stopping me from putting any old argument (provided $w$ is defined at that point) in to $w$, like the distance I have walked since the candle was lit. Sure, we can't really interpret $w$ in the same way if I did this, but there is nothing in the definition of $w$ which stops me from doing this.

Also, what happens when I do some differentiation on $w$. If I differentiate $w$ "with respect to time", then I'd get the time rate at which the candle is burning. If I differentiate $w$ "with respect to" the distance I have walked since the candle was lit, I'd expect to get either zero (since $w$ is not a function of this), or something more complicated (since the distance I have walked is related to time). I just can't see mathematically what is happening here: ultimately, no matter what we're calling our variables, $w$ is a function of a single variable, not of multiple, and so shouldn't there be absolutely no ambiguity in how to differentiate $w$? Shouldn't there just be "the derivative of w", found by differentiating $w$ with respect to its argument (writing "with respect to its argument" is redundant!).

Can anyone help clarify what we mean by "function of" as opposed to function, and how this is important when we differentiate functions "with respect to" something? Thanks!

Best Answer

As a student of math and physics, this has been one of the biggest annoyances for me; I'll give my two cents on the matter. Throughout my entire answer, whenever I use the term "function", it will always mean in the usual math sense (a rule with a certain domain and codomain blablabla).

I generally find two ways in which people use the phrase "... is a function of ..." The first is as you say: "$f$ is a function of $x$" simply means that for the remainder of the discussion, we shall agree to denote the input of the function $f$ by the letter $x$. This is just a notational choice as you say, so there's no real math going on. We just make this choice of notation to in a sense "standardize everything". Of course, we usually allow for variants on the letter $x$. So, we may write things like $f(x), f(x_0), f(x_1), f(x'), f(\tilde{x}), f(\bar{x})$ etc. The way to interpret this is as usual: this is just the result obtained by evaluating the function $f$ on a specific element of its domain.

Also, you're right that the input label is completely arbitrary, so we can say $f(t), f(y), f(\ddot{\smile})$ whatever else we like. But again, often times it might just be convenient to use certain letters for certain purposes (this can allow for easier reading, and also reduce notational conflicts); and as much as possible it is a good idea to conform to the widely used notation, because at the end of the day, math is about communicating ideas, and one must find a balance between absolute precision and rigour and clarity/flow of thought.


btw as a side remark, I think I am a very very very nitpicky individual regarding issues like: $f$ vs $f(x)$ for a function, I'm also always careful to use my quantifiers properly etc. However, there have been a few textbooks I glossed over, which are also extremely picky and explicit and precise about everything; but while what they wrote was $100 \%$ correct, it was difficult to read (I had to pause often etc). This is as opposed to some other books/papers which leave certain issues implicit, but convey ideas more clearly. This is what I meant above regarding balance between precision and flow of thought.


Now, back to the issue at hand. In your third and fourth paragraphs, I think you have made a couple of true statements, but you're missing the point. (one of) the job(s) of any scientist is to quantitatively describe and explain observations made in real life. For example, you introduced the example of the amount of wax burnt, $w$. If all you wish to do is study properties of functions which map $\Bbb{R} \to \Bbb{R}$ (or subsets thereof), then there is clearly no point in calling $w$ the wax burnt or whatever.

But given that you have $w$ as the amount of wax burnt, the most naive model for describing how this changes is to assume that the flame which is burning the wax is kept constant and all other variables are kept constant etc. Then, clearly the amount of wax burnt will only depend on the time elapsed. From the moment you start your measurement/experiment process, at each time $t$, there will be a certain amount of wax burnt off, $w(t)$. In other words, we have a function $w: [0, \tau] \to \Bbb{R}$, where the physical interpretation is that for each $t \in [0, \tau]$, $w(t)$ is the amount of wax burnt off $t$ units of time after starting the process. Let's for the sake of definiteness say that $w(t) = t^3$ (with the above domain and codomain).


"Sure, $w$ only has the interpretation we think it does (cumulative amount of wax burnt) when we provide a (real number in the domain of definition, which we interpret as) time as its argument"

True.

"...Sure, we can't really interpret $w$ in the same way if I did this, but there is nothing in the definition of w which stops me from doing this."

Also true.

But here's where you're missing the point. If you didn't want to give a physical interpretation of what elements in the domain and target space of $w$ mean, why would you even talk about the example of burning wax? Why not just tell me the following:

Fix a number $\tau > 0$, and define $w: [0, \tau] \to \Bbb{R}$ by $w(t) = t^3$.

This is a perfectly self-contained mathematical statement. And now, I can tell you a bunch of properties of $w$. Such as:

  • $w$ is an increasing function
  • For all $t \in [0, \tau]$, $w'(t) = 3t^2$ (derivatives at end points of course are interpreted as one-sided limits)
  • $w$ has exactly one root (of multiplicity $3$) on this interval of definition.

(and many more other properties). So, if you want to completely forget about the physical context, and just focus on the function and its properties, then of course you can do so. Sometimes, such an abstraction is very useful as it removes any "clutter".

However, I really don't think it is (always) a good idea to completely disconnect mathematical ideas from their physical origins/interpretations. And the reason that in the sciences people often assign such interpretations is because their purpose is to use the powerful tool of mathematics to quantitatively model an actual physical observation.

So, while you have made a few technically true statements in your third and fourth paragraphs, I believe you've missed the point of why people assign physical meaning to certain quantities.


For your fifth paragraph however, I agree with the sentiment you're describing, and questions like this have tortured me. You're right that $w$ is a function of a single variable (where in this physical context, we interpret the arguments as time). If you now ask me how does $w$ change in relation to the distance I have started to walk, then I completely agree that there is no relation whatsoever.

But what is really going on is a terrible, annoying, confusing abuse of notation, where we use the same letter $w$ to have two differnent meanings. Physicists love such abuse of notation, and this has confused me for so long (and it still does from time to time). Of course, the intuitive idea of why the amount of wax burnt should depend on distance is clear: the further I walk, the more time has passed, and hence the more max has burnt. So, this is really a two step process.

To formalize this, we need to introduce a second function $\gamma$ (between certain subsets of $\Bbb{R}$), where the interpretation is that $\gamma(x)$ is the time taken to walk a distance $x$. Then when we (by abuse of language) say $w$ is a function of distance, what we really mean is that

The composite function $w \circ \gamma$ has the physical interpretation that for each $x \in \text{domain}(\gamma)$, $(w \circ \gamma)(x)$ is the amount of wax burnt when I walk a distance $x$.

Very often, this composition is not made explicit. In the Leibniz chain rule notation \begin{align} \dfrac{dw}{dx} &= \dfrac{dw}{dt} \dfrac{dt}{dx} \end{align} Where on the LHS $w$ is miraculously a function of distance, even though on the LHS (and initially) $w$ was a function of time, what is really going on is that the $w$ on the LHS is a complete abuse of notation. And of course, the precise way of writing it is $(w \circ \gamma)'(x) = w'(\gamma(x)) \cdot \gamma'(x)$.

In general, whenever you initially have a function $f$ "as a function of $x$" and then suddenly it becomes a "function of $t$", what is really meant is that we are given two functions $f$ and $\gamma$; and when we say "consider $f$ as a function of $x$", we really mean to just consider the function $f$, but when we say "consider $f$ as a function of time", we really mean to consider the (completely different) function $f \circ \gamma$.

Summary: if the arugments of a function suddenly change interpretations (eg from time to distance or really anything else) then you immediately know that the author is being sloppy/lazy in explicitly mentioning that there is a hidden composition.