joshmccraney said:
Ok, so how about this: ##s(x,t) = f(x,y(t)) = x^2+3y##. Now $$\frac{\partial s}{\partial t} = \frac{\partial f}{\partial y}\frac{d y}{d t} = 3\frac{d y}{d t}$$ However, if on the other hand ##f(x,y(t)) = x^2+3y## Then $$\frac{\partial f}{\partial t} = 0$$
Do you both agree with this or have I messed stuff up again
I would write both of those differently:
##s(x,t) = f(x,y(t)) = x^2+3y(t)##
There's no reason to omit that you are taking ##y## to be a function of ##t## on the RHS. Again, your decision to omit the ##t## can only lead to possible confusion about what is a function of what.
##f(x,y, t) = x^2+3y## then ##\frac{\partial f}{\partial t} = 0##
Here ##y## is not a function of ##t##, which is an independent variable.
Let me give a physical example of this idea. Suppose a particle of unit mass has a potential energy function ##V(x, t)##. This function depends on position and time and is therefore a function of two variables. Example ##V(x, t) = x^2 e^{-t}##, which gives us:
##\frac{\partial V}{\partial x} = 2xe^{-t}## and ##\frac{\partial V}{\partial t} = -x^2e^{-t}##
Now, imagine the particle takes
a specific path ##x(t)##, for example ##x = \sin(t)##. You can now look at the particle's potential along its path, ##V_p## which is solely a function of ##t## given by:
##V_p(t) = V(x(t), t)) = V(\sin(t), t) = \sin^2(t)e^{-t}##
And, we have a normal derivative of ##V_p## given by the one dimensional chain rule:
##\frac{dV_p}{dt} = [2\sin(t) \cos(t) - \sin^2(t)]e^{-t}##
Now, we could verify the multi-dimensional chain rule in this case:
##\frac{dV_p}{dt} = \frac{\partial V}{\partial x} \frac{dx}{dt} + \frac{\partial V}{\partial t} = 2xe^{-t}\cos(t) -x^2e^{-t} = [2\sin(t) \cos(t) - \sin^2(t)]e^{-t}##
And that agrees with the normal derivative of ##V_p## so everything is correct.
My final point is that you should start to use examples like this to check whether you're doing a chain rule correctly.