-1

I've gone through many math courses thinking that a function $f(x)=x^2$ could mean $f(anything) = anything^2$, however I realized that that isn't always true.

For example, suppose we have a function $f(x) = kx$ where $f$ represents the opposing force. We can't just substitute $t$ for time into that equation, as that isn't physically true. It could be the case that $x=2t$. In that case, $f(t) = 2kt$.

But suppose that $t$ is actually a function of another variable $p$. Let $t(p)= p^2$. If I were to naively try to do function composition to get $f(t(p))$, I would get $f(t(p)) = kp^2$, ignoring the relationship between $x$ and $t$. The correct answer would be $f(t(p)) = 2kp^2$.

What is really going on when I do the above function composition? Is there something more complex going on?


Update:

Even after reading @peek-a-boo's post, I am still confused about a couple of points. I guess my original question might not have been as clear as I wanted it to be.

Say we have a spring that follows Hooke's law $F_s(x) = -kx$, where F is the spring's force in newtons, and x is spring's compression in meters. It seems to me (I might be wrong) that it is incorrect to say that $F_s(t) = -kt$, where $t$ is time. My reasoning for that is that it isn't necessarily the case that the force at a certain compression is equal to the force at the same time.

Question 1: Is my reasoning correct? Is it wrong to "plug in" $t$ into $F_s(x) = -kx$?

My understanding that you could "plug in" $t$ in the sense that it is a dummy variable, but you can't in the sense of time. You would have to account for the fact that $x$ is a function of $t$.`

Question 2: If my reasoning is correct (you can ignore this question if it is not), why is it not correct to plug in $t$ here?


Now let us define a new function F:R→R as F(x)=kx (I’m explicitly using a different letter than f because the f above is different from this F). If you now fix a number t and decide to consider the number x=2t, then F(x)=F(2t)=k(2t)=2kt.

As for this, I see that "plugging in" $2t$ into $F(x)$ leads to the physically correct functions: $F(x)=F(2t)=k(2t)=2kt$, but what if I wanted $F(t)$ to be a function where I could get the force from just inputting a time $t$? What would $F(t)$ be?

  • "In that case, ()=2". No, in that case (2)=2 – user58697 Mar 12 '24 at 00:02
  • What you are saying in the 3rd paragraph doesn't make sense to me. If $f(x)=kx$ and $t(p)=p^2$, then $f(t(p))$ is certainly $kt(p)=kp^2$. You are surely mixing something up but I am not sure what or where. – ShyamalSayak Mar 12 '24 at 00:06
  • If $f(x)=kx$ then $f(t)=kt$ and $f(2t)=2kt$. If $t(p)=p^2$ then $f(t(p))= kt(p)=kp^2$ (nothing "naive" about that) and $f(2t(p))= 2kt(p)=2kp^2$. There's nothing wrong with anything I can see. – fleablood Mar 12 '24 at 00:22
  • "We can't just substitute t for time into that equation, as that isn't physically true. " Explain this more please. If $x=t$ what's wrong with $f(t)=kt$. If $x = 2t$ what's wrong with $f(x)=f(2t) = 2kt$. Somehow you seem to be confusing $f(x)$ with $f(t)$ despite $x \ne t$ and it's cascading. – fleablood Mar 12 '24 at 00:30
  • Let’s say $x=2t$ and we want to find the force at $t = 5$. So $x = 10$. If $f(t) = kt$, $f(5) = 5k$. However. that is not equal to $f(x) = kx$ where $x = 10$ so force is $10k$. What am I missing? – Omar Aboutaleb Mar 12 '24 at 00:38
  • If $x = 2t$ then $f(x)$ is not the force at $t$. It is the force at $2t$. – fleablood Mar 12 '24 at 00:53
  • Somehow you seem to be assuming that $x$ has a fundamental relation to the force and that $x$ is in some unit that gives the force based on $x$ and not based on $t$. If that is so then the force at time $t$ would NOT be $f(t)$..... But if $f$ IS the force at whatever and $f(t)$ is the force at time $t$ then it doesn't matter that $x=2t$ because we don't give an ats rass what $f(x)$ is. We only care what $f(t)$ is. Which is it? Why don't you actually tell us what $f$ is supposed to be. "force" without units or context is meaningless. – fleablood Mar 12 '24 at 01:02
  • All of this is under certain contexts, generally a function describes the relationship of variables – Masd Mar 12 '24 at 01:08
  • Does this help at all $x=2t; t =\frac x2$. $f(t) =f(\frac x2)=k\frac x2 = kt$ and $f(x)=f(2t)=2kt = k(2t)=kx$. And if $f(x)=k\text{feet}$ and $t=5\text{seconds}$ and $x = 2t = 10\text{seconds}$ then $f(t)=f(5\text{sec})=5\text{feet sec}$ and $f(x)=f(10\text{sec}) =10\text{feet sec}$. Does that help? – fleablood Mar 12 '24 at 03:07

1 Answers1

2

however I realized that that isn't always true.

Wrong! Whoever/whatever made you change your mind about your previous sentence, ignore them/that (for now).

If $f:\Bbb{R}\to\Bbb{R}$ is the function defined for each $x\in\Bbb{R}$ as $f(x)=x^2$, then $f(@)=@^2$, and $f(t)=t^2$ and $f(\ddot{\smile})=\ddot{\smile}^2$. Anyone telling you otherwise is just trying to skip a whole bunch of steps because they’re impatient/lazy. If $t$ is a real number and you consider the real number $x=2t$, then $f(x)=f(2t)=(2t)^2=4t^2$. I have said this before (e.g here and here) and I’ll say it again: math does not care what your favourite letter is.

Now let us define a new function $F:\Bbb{R}\to\Bbb{R}$ as $F(x)=kx$ (I’m explicitly using a different letter than $f$ because the $f$ above is different from this $F$). If you now fix a number $t$ and decide to consider the number $x=2t$, then $F(x)=F(2t)=k(2t)=2kt$.

Now, let us introduce three new functions

  • $X:\Bbb{R}\to\Bbb{R}$, defined as $X(t)=2t$.
  • $T:\Bbb{R}\to\Bbb{R}$ defined as $T(p):= p^2$.

Then, you can consider all sorts of compositions: $F$ alone, or $F\circ X$ or $F\circ T$ or $F\circ X\circ T$. These will all give us different functions (if $k\neq 0$): for each $x,t,p\in\Bbb{R}$, we have \begin{align} F(x)&=kx,\quad\text{and}\quad (F\circ X)(t)=2kt,\quad\text{and}\quad (F\circ X\circ T)(p)=2kp^2. \end{align} And just to really drive home my point, we also have for each $x,t,p\in\Bbb{R}$ that \begin{align} F(t)&=kt,\quad\text{and}\quad (F\circ X)(p)=2kp,\quad\text{and}\quad (F\circ X\circ T)(x)=2kx^2, \end{align} and we also have that for each $\zeta\in\Bbb{R}$, \begin{align} F(\zeta)&=k\zeta,\quad\text{and}\quad (F\circ X)(\zeta)=2k\zeta,\quad\text{and}\quad (F\circ X\circ T)(\zeta)=2k\zeta^2. \end{align}

I strongly suggest you appreciate and keep this distinction between the functions (conceptually, and also notationally… atleast until you know for sure how to translate back and forth between a precise and imprecise statement). In Physics books they will often blur the distinction in the notation of the functions, and require the reader to do more mental gymnastics*, where they place emphasis on the ‘variables’ and the choice of letters, and instead will speak of

  • force as a function of position
  • force as a function of time
  • force as a function of momentum,

or whatever else the context might necessitate, and write these respectively as $F(x)$ or $F(t)$ or $F(p)$ even though they’re not talking about the function $F$ alone! They’re talking about $F$ followed by various compositions.


*: Of course I understand why one does use such notation, because after a while it does indeed get a little tiring to keep having to introduce new notation for functions related by ‘obvious’ compositions. But note that as a student you always have to be strict for yourself, and not rely on the ‘sloppiness’ of the teachers. It’s kind of like how in school we learn grammar, and in essays we’re teachers will penalize improper grammar, but in everyday communication, we don’t adhere to these rules strictly.

peek-a-boo
  • 55,725
  • 2
  • 45
  • 89
  • Thank you for your detailed explanation. I guess the thing that is confusing me is going back and forth between physics and math definitions. Unfortunately, even after reading your answer twice, I'm still a bit confused. I'll try to outline my points of confusion as clearly as I can in an edit to the post. – Omar Aboutaleb Mar 12 '24 at 04:25
  • @OmarAboutaleb ok, but before you edit, did you read the two links I posted as well? – peek-a-boo Mar 12 '24 at 04:26
  • I read the second link about multivariable functions / multivariable calculus, but haven't read the first. I'll do that first. – Omar Aboutaleb Mar 12 '24 at 04:28
  • Update: I read the first link, and it changes (quite significantly) how I view differentiation with respect to variables now. However, my main questions still stand. – Omar Aboutaleb Mar 12 '24 at 04:42
  • @OmarAboutaleb ok, I can try to answer your question after the update (depending on time) but I suspect a large part of my answer will still essentially say “ignore what the physicists say, and do it properly step-by-step”. So, unless you have a specific paragraph from a physics book you’d like to see ‘translated’, I’m afraid my answer wouldn’t really change much (but ok… I’ll wait for your update). – peek-a-boo Mar 12 '24 at 04:52
  • My problem is that I'm not sure what doing it properly step by step looks like while maintaining the physics of the situation. But I'm probably missing something very obvious. Thank you so much for you detailed replies. – Omar Aboutaleb Mar 12 '24 at 05:18
  • @OmarAboutaleb for question 1, you should really note that math doesn’t care about units. This function goes from real numbers to real numbers. We deal with numbers. Having said that, if you want to plug in a time $t$ into the Hooke’s law, then physically that doesn’t make sense. You first need some ‘velocity’ to multiply that time into a distance, e.g if you measure time in seconds, then consider $t\cdot \frac{1\text{meter}}{1 \text{second}}$ if you don’t want to change numerical values, but only the units. (which is why you’ll often hear the speed of light as the ‘conversion factor’) – peek-a-boo Mar 12 '24 at 05:27