The usage of chain rule in physics - Physics Stack Exchange most recent 30 from physics.stackexchange.com 2024-07-16T11:54:27Z https://physics.stackexchange.com/feeds/question/572956?session=129f153ea946a3b6eff7d4c60450b057 https://creativecommons.org/licenses/by-sa/4.0/rdf https://physics.stackexchange.com/q/572956 34 The usage of chain rule in physics Cathartic Encephalopathy https://physics.stackexchange.com/users/236734 2020-08-13T07:39:45Z 2022-03-15T15:16:45Z <p>I often see in physics that, we say that we can multiply infinitesimals to use chain rule. For example,</p> <p><span class="math-container">$$ \frac{dv}{dt} = \frac{dv}{dx} \cdot v(t)$$</span></p> <p>But, what bothers me about this is that it raises some serious existence questions for me; when we say that we take the derivative of <span class="math-container">$v$</span> velocity with respect to distance, that means we can write velocity as a function of distance. But, how do we know that this is always possible? As in, when we do these multiplications of differentials we are implicitly assuming that <span class="math-container">$v$</span> can be changed from a function of time into a function of displacement.</p> <p>I see this used ubiquitously, and there are some crazier variations I've seen of literally swapping differentials like <span class="math-container">$ dv \frac{dm}{dt} = dm \frac{dv}{dt}$</span> , as shown by the answer of user &quot;Fakemod&quot; in <a href="https://physics.stackexchange.com/q/558463/">this stack post</a>.</p> https://physics.stackexchange.com/questions/572956/-/572959#572959 15 Answer by Vid for The usage of chain rule in physics Vid https://physics.stackexchange.com/users/256041 2020-08-13T07:56:23Z 2020-08-15T03:47:11Z <p>Well, this is the most common thing for which mathematicians make fun of physicists. Because we don't bother to cancel out derivatives, and we &quot;NEVER&quot; check if we can imply some rule on our equations. The thing is, that almost all functions, which can appear in nature or real life systems are, in most times, continuous and differentiable. There are, for sure, some special cases. But for most simple tasks, eg. mechanic, this is quite valid.</p> <p>So in the case of <span class="math-container">$v$</span>. In order to define velocity, the object has to change its position in some amount of time. And furthermore, we don't have infinite speed in real life. This implys, that <span class="math-container">$dx/dt$</span> has allways that some non infinite value. From this it follows, that <span class="math-container">$v$</span> can be rewritten as function of either <span class="math-container">$t$</span> or <span class="math-container">$x$</span>.</p> <p>I am not sure if there is a special case or not, but for physicists it is not important, because in 99.9% this will be true. If there are special cases, they could be &quot;obviously strange&quot;. You should have in mind, that at least in theory, we always check our calculations with experiment, so we have an experimental proof instead of a mathematical one (generally).</p> https://physics.stackexchange.com/questions/572956/-/573016#573016 8 Answer by John Alexiou for The usage of chain rule in physics John Alexiou https://physics.stackexchange.com/users/392 2020-08-13T12:48:03Z 2020-08-13T12:48:03Z <p>It is true, that in nature there is only <em>one</em> true independent variable, time. All others are &quot;pseudo-independent&quot;. They are variables humans bless as independent in order to answer what-if scenarios and to establish mathematical models of systems byways of separation of variables. The common term for these &quot;pseudo-independent&quot; quantities is <strong>generalized coordinates</strong>.</p> <p>Looking at a complex mechanical system, like a human launching a ball while riding on a skateboard. First, we decide what the degrees of freedom are and assign generalized coordinates to them. These are simple measurable quantities of distance, angle or something else geometrical forming a generalized coordinate vector <span class="math-container">$$\boldsymbol{q} = \pmatrix{x_1 \\ \theta_2 \\ \vdots \\ q_j \\ \vdots} \tag{1}$$</span> In this example there are <span class="math-container">$n$</span> degrees of freedom. All the positions of important points on our mechanisms can be found from these <span class="math-container">$n$</span> quantities. If there are <span class="math-container">$k$</span> kinematic hardpoints (such as joints, geometric centers, etc) then the <span class="math-container">$i=1 \ldots k$</span> cartesian position vector is some function of the generalized coordinates and time <span class="math-container">$$ \boldsymbol{r}_i = \boldsymbol{\mathrm{pos}}_i(t,\, \boldsymbol{q}) \tag{2}$$</span></p> <p>Here comes the chain rule part. With the assumption that (2) is differentiable with respect to the generalized coordinates, and that contact conditions do not change due to separation, or loss of traction, the velocity vectors of each of the hardpoints is found by the chain rule</p> <p><span class="math-container">$$ \boldsymbol{v}_i = \boldsymbol{\mathrm{vel}}_i(t,\,\boldsymbol{q},\,\boldsymbol{\dot{q}}) = \frac{\partial \boldsymbol{r}_i}{\partial t} + \frac{\partial \boldsymbol{r}_i }{\partial x_1} \dot{x}_1 + \frac{\partial \boldsymbol{r}_i }{\partial \theta_2} \dot{\theta}_2 + \ldots + \frac{\partial \boldsymbol{r}_i }{\partial q_j} \dot{q}_j + \ldots \tag{3} $$</span> where <span class="math-container">$q_j$</span> is the <em>j</em>-th element of <span class="math-container">$\boldsymbol{q}$</span>, and <span class="math-container">$\dot{q}_j$</span> its speed (being linear or angular).</p> <blockquote> <p>The above is not a division of infinitesimals, but the multiplication of a partial derivative <span class="math-container">$\tfrac{\partial \boldsymbol{r}_i }{\partial q_j}$</span> with the particular coordinate degree of freedom speed <span class="math-container">$\dot{q}_j$</span>.</p> </blockquote> <p>Maybe you are more comfortable with this more rigorous notation using partial derivatives that what you have seen so far. The term partial derivative means, take the derivative by varying only one quantity and holding all others constant. This is what allows us to use pseudo-independent quantities <span class="math-container">$q_j$</span> for the evaluation of the <em>true</em> derivative with time (the one actual independent quantity).</p> <p>The same logic is applied to higher derivatives as well</p> <p><span class="math-container">$$ \boldsymbol{a}_i = \boldsymbol{\rm acc}_i(t,\boldsymbol{q},\boldsymbol{\dot q}) = \frac{\partial \boldsymbol{v}_i}{\partial t} + \ldots + \frac{ \partial \boldsymbol{v}_i}{\partial q_j}\, \dot{q}_j + \ldots + \frac{ \partial \boldsymbol{v}_i}{\partial \dot{q}_j} \,\ddot{q}_j \tag{4} $$</span></p> <p>The last part might be a bit confusing, but when you express it in terms of actual degrees of freedom it might be clear. Consider the degree of freedom <span class="math-container">$\theta_2$</span> and its time derivatives <span class="math-container">$\omega_2$</span> and <span class="math-container">$\alpha_2$</span>. Then the terms <span class="math-container">$\frac{ \partial \boldsymbol{v}_i}{\partial \theta_2} \omega_2 $</span> and <span class="math-container">$\frac{ \partial \boldsymbol{v}_i}{\partial \omega_2} \alpha_2 $</span> are more clear I hope, as <span class="math-container">$\boldsymbol{v}_i$</span> depends on both the position <span class="math-container">$\theta_2$</span> and the speed <span class="math-container">$\omega_2$</span>.</p> https://physics.stackexchange.com/questions/572956/-/573055#573055 20 Answer by WillO for The usage of chain rule in physics WillO https://physics.stackexchange.com/users/4993 2020-08-13T16:54:34Z 2020-08-13T17:10:19Z <p>You are correct that you cannot (globally) write velocity as a function of distance. For example, as one commenter has already mentioned, throw a ball directly up in the air and wait for it to come down. When the ball is at height <span class="math-container">$h$</span> on the way up, it has a positive (upward directed) velocity. When it is at the same height <span class="math-container">$h$</span> on the way down, it has a negative (downward directed) velocity. So velocity is definitely not a (global) function of distance.</p> <p>But this much is true: For any height <span class="math-container">$h$</span> <b>except</b> for the maximum height the ball ever reaches, there is some open interval around <span class="math-container">$h$</span> --- some range of heights from <span class="math-container">$h-\epsilon$</span> to <span class="math-container">$h+\epsilon$</span> --- in which you can treat velocity as a well-defined function of height while the ball is on its way up, and another well-defined function of height while the ball is on its way back down. And moreover that function is differentiable and obeys the chain rule. All of this is part of the content of the <b>implicit function theorem</b>, which you can google for.</p> <p>If you just write velocity as a function of height, you do have to be careful to make it clear from context which of the two functions --- the &quot;on the way up&quot; function and the &quot;on the way down&quot; function --- you're referring to. You also have to make sure you don't try to pull this stunt when the ball is at the very top of its trajectory (or more generally, at points where its velocity is zero). Many books take it for granted that you're being careful about this, so they don't have to worry about it on your behalf.</p> https://physics.stackexchange.com/questions/572956/-/573232#573232 4 Answer by Brick for The usage of chain rule in physics Brick https://physics.stackexchange.com/users/89784 2020-08-14T14:17:48Z 2020-08-14T14:25:31Z <p>I like this question and there already some good answers. I'm not going to repeat those, but I wanted to add a couple of points focused on the second part of your question regarding &quot;swapping&quot; differentials.</p> <p>The first is that the presence of a differential quantity is an abstraction that is usually only useful as an intermediate step in calculating something else. By that, I mean you never <em>measure</em> something like <span class="math-container">$\rho\ dV$</span> directly. You can only hope to measure:</p> <ol> <li>The integral of that quantity <span class="math-container">$\int \rho\ dV$</span> over some volume (equivalently, you back off of the abstraction and measure <span class="math-container">$\rho \Delta V$</span> for some finite volume <span class="math-container">$\Delta V$</span>) --OR--</li> <li>The &quot;ratio of differentials&quot; (being deliberately loose for the moment), which in the limit is a derivative. So an expression like <span class="math-container">$f(t) dt = g(x) dx$</span> gets &quot;divided through&quot; to be <span class="math-container">$f(t) = g(x) (dx/dt) = g(x)v(t)$</span>. We believe we know how to measure changes in quantities and gradients.</li> </ol> <p>That's relevant to the second part of your question about &quot;swapping&quot; differentials because when that's done legitimately, it typically works because you're ultimately going to put that expression under an integral sign, and the notation conveniently reflects (some might prefer to say the notation is easily abused when applying) the integration-by-substitution rule <span class="math-container">$$ \int_a^b f(g(x)) g'(x) dx = \int_{g(a)}^{g(b)} f(u) du$$</span> which you could rewrite in Leibnitz notation for <span class="math-container">$u = g(x)$</span> and get the appearance that you are swapping or canceling differentials.</p> <p>Since the integration-by-substitution rule is basically the chain rule in reverse, however, all of this begs your initial question of why the chain rule is valid in physics. For that, I refer back to the other already-good answers.</p> https://physics.stackexchange.com/questions/572956/-/573298#573298 2 Answer by user541686 for The usage of chain rule in physics user541686 https://physics.stackexchange.com/users/853 2020-08-14T19:16:41Z 2020-08-14T19:16:41Z <blockquote> <p>that means we can write velocity as a function of distance</p> </blockquote> <p>That's not <em>quite</em> the intended meaning. Rather, the intended meaning is:</p> <p><strong>If</strong> you could write velocity as a function of distance in the domain of interest, <strong>then</strong> the equation would hold.</p> <p>It's up to you to deduce whether that assumption can be met satisfactorily in the problem, but usually it's quite obvious that it can.</p> <p>One way to see this is that you can artificially restrict the domain to the portion of space and time that is of interest and disregard the rest of the domain, and then argue that this assumption would hold there.<br /> (Notice I basically just rephrased the continuity notion of a <strong>limit</strong> here.)</p> <p>The only way for this to be false in your particular example is to have <em>multiple</em> velocities at a given point in time (or no velocity at all), which generally wouldn't make sense in the (continuous) everyday world we're familiar with.</p> <p>And if the discussion is about some unusual <em>boundary</em> condition where you can't take a limit on all sides and show the problem is continuous, then you <strong>wouldn't</strong> read such a claim about that situation without some kind of other (implicit or explicit) indication as to why it's true.</p> https://physics.stackexchange.com/questions/572956/-/594549#594549 2 Answer by AccidentalTaylorExpansion for The usage of chain rule in physics AccidentalTaylorExpansion https://physics.stackexchange.com/users/93729 2020-11-17T19:52:32Z 2020-11-17T19:52:32Z <p>In situations like these it might be good to take a step back and consider <em>what we are actually looking at</em>. In this case we are looking at some function <span class="math-container">$x$</span> as a function of time. So starting from this the only functions that are well-defined are <span class="math-container">\begin{align} x:\quad t\rightarrow &amp;x(t)\\ v:\quad t\rightarrow &amp;v(t)=x'(t) \end{align}</span> We can rewrite our culprit <span class="math-container">$\frac{dv}{dx}$</span> in terms of these functions. <span class="math-container">\begin{align} \frac{dv}{dx}=\frac{dv}{dt}\frac{dt}{dx}=v'(t)\left[x'(t)\right]^{-1} \end{align}</span> Here we used the chain rule and the fact that the derivative of an inverse is the reciprocal of the original function i.e. <span class="math-container">$dy/dx=(dx/dy)^{-1}$</span>. Immediately we can see two illuminating things: firstly we can define the derivative <span class="math-container">$\frac{dv}{dx}$</span> because we can write <span class="math-container">$v$</span> as a function of <span class="math-container">$t$</span> and we can also write <span class="math-container">$t$</span> as a function of <span class="math-container">$x$</span>. Secondly this derivative is only defined if <span class="math-container">$x'(t)\neq 0$</span> so there are some constraints in doing this.</p> <p>Now let's take as an example <span class="math-container">$x(t)=bt^2$</span>. We can calculate this in two ways. The first way is to first substitute <span class="math-container">$t(x)$</span> and then differentiate with respect to <span class="math-container">$x$</span>: <span class="math-container">\begin{align} t&amp;=\pm\sqrt{\frac x b}\\ \implies v(x)&amp;=v(t(x))=\pm 2\sqrt{bx}\\ \implies \frac{dv}{dx}&amp;=\pm\sqrt{\frac b x} \end{align}</span> The second way is to use the chain rule. From the second equation <span class="math-container">\begin{align} \frac{dv}{dx}&amp;=v'(t)\left[x'(t)\right]^{-1}\\ &amp;=2b[2bt]^{-1}\\ &amp;=\frac 1 t\\ &amp;=\pm\sqrt{\frac b x} \end{align}</span> Perhaps unsurprisingly these methods are equal. The second method makes it really explicit which functions are used but the first method can be obscured sometimes when <span class="math-container">$t$</span> is not mentioned like in your question.</p> <p>The main takeaway of this answer is that these tricks have a formal proof behind them but often the author leaves this out for brevity. This way we can do more physics more quickly but these tricks shouldn't go at the expense of your fundamental understanding. When you feel this happens it might be useful to write down the functions you are using and on which parameters they depend and then you can try to proof these tricks. A nice summary of these tricks is 'differentials are not algebraic entities so you can't just switch them around in fractions but it turns out in most cases you <em>can</em> switch them around like that'.</p> https://physics.stackexchange.com/questions/572956/-/699079#699079 0 Answer by Cathartic Encephalopathy for The usage of chain rule in physics Cathartic Encephalopathy https://physics.stackexchange.com/users/236734 2022-03-15T15:16:45Z 2022-03-15T15:16:45Z <p>What we are really saying is that there is some function <span class="math-container">$f$</span> which when composed with position gives velocity. We have:</p> <p><span class="math-container">$$ v(t) = f \circ x(t)$$</span></p> <p>Taking the derivative:</p> <p><span class="math-container">$$ \frac{dv}{dt} = \left[ \frac{df}{dx} \circ x(t) \right] \frac{dx}{dt}= v \left[ \frac{df}{dt} \circ x(t)\right]$$</span></p> -