# Having troubles to understanding differentiation of multivariable vectors

What doesn't seem to get around my head is how differentiation with vectors work. I have seen my (physics) teacher differentiate the unitary vector $$\vec{u_r}$$ using the following: $$\frac{d\vec{u_r}}{dt}=\frac{\partial \vec{u_r}}{\partial r}\dot{r}+\frac{\partial \vec{u_r}}{\partial \theta}\dot \theta+\frac{\partial \vec{u_r}}{\partial \phi}\dot \phi$$ for the unitary vectors for the spherical coordinates, which depend on those three variables $$\vec{u_r}=\vec{u_r}(r(t),\theta(t),\phi(t))$$. But then for the position vector itself, $$\vec{r}=r\vec{u_r}$$ (by definition), he used the following to differentiate: $$\frac{d\vec r}{dt}=\dot r\vec{u_r}+\dot{\vec{u_r}}r$$ How?? I know that the chain rule for multivariable scalar functions like $$f=f(x(t),y(t))$$ is $$\dot f=\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}$$ but is that rule also comparable and usable for the vectorial functions? One thing that really helps me is the tree drawing of the derivatives and it's variables, to see if I have to add or not, is there a vectorial function version of that?

• This is the product rule; both $r$ and $\vec{u_r}$ depend on $t$. Commented Sep 24, 2023 at 1:21
• @user170231 yeah but why does $\vec r$ and $\vec u_r$ differentiate differently? In one they used the product rule and in the other one they seem to have used another weird chain rule, I'm asking for that
– Ivy
Commented Sep 24, 2023 at 11:26
• $r(t)$ is not the same function as $\vec r(t)$, which is defined as $r$ times $\vec u_r$. You don't need any special rules to different $r$, that's just $\dot r$. But you do need to use the chain rule to different $\vec r$ by virtue of $\vec u_r$'s dependence on $r(t),\theta(t),\phi(t)$. Commented Sep 25, 2023 at 2:15
• @user170231 I promise I'm trying to understand, I know the vector of $r$ isn't the same as it's module, and I see what you say about $\vec{u_r}$'s dependence as I already mentioned, but for me, $\vec{r}$ depends as well on $r(t)$, no? Oh, so as it only depends on $r(t)$, you can do the product rule on $\vec r$? So say, that $\vec r$ depended on $r(t)$ and $\theta(t)$, then $\vec{\dot r}$ would be differentiated the same way as $\vec{u_r}$?
– Ivy
Commented Sep 25, 2023 at 18:35
• > Why does $\vec r$ and $\vec u_r$ differentiate differently ? $\vec r$ and $\vec u_r$ are not the same. Why do you want their derivates to be the same ? Commented Sep 25, 2023 at 20:41

If I'm understanding your concern correctly, you are asking why $$\dot{\vec r}$$ doesn't seem to have a chain-rule form similar to

$$\frac{d\vec u_r}{dt} = \frac{\partial\vec u_r}{\partial r} \, \dot r + \frac{\partial\vec u_r}{\partial\theta} \, \dot\theta + \frac{\partial\vec u_r}{\partial\phi}\,\dot\phi$$

That is, perhaps you expected to see the expression

$$\dot{\vec r} = \frac{\partial\vec r}{\partial r} \, \dot r + \frac{\partial\vec r}{\partial\theta}\,\dot\theta + \frac{\partial\vec r}{\partial\phi}\,\dot\phi$$

and that would be correct. Your instructor has provided an equivalent form.

Since $$\vec r:=r\,\vec u_r$$, we use the product rule to compute the partial derivatives,

$$\dot{\vec r} = \left(\vec u_r + r\,\frac{\partial\vec u_r}{\partial r}\right) \dot r + r\,\frac{\partial\vec u_r}{\partial \theta}\, \dot\theta + r\,\frac{\partial\vec u_r}{\partial \phi}\, \dot \phi$$

then rearrange terms as

$$\dot{\vec r} = \vec u_r \,\dot r + r \left(\frac{\partial\vec u_r}{\partial r}\,\dot r + \frac{\partial\vec u_r}{\partial \theta}\,\dot\theta + \frac{\partial\vec u_r}{\partial \phi}\,\dot\phi\right)$$

and this is of course equivalent to $$\vec u_r\,\dot r+\dot{\vec u_r}\,r$$, as per the product rule.

P.S. To my point about using the definition of the derivative, we have

\begin{align*} \dot{\vec r} &= \lim_{h\to0} \frac{r(t+h) \vec u_r(t+h) - r(t)\vec u_r(t)}h \\ &= \lim_{h\to0} \left(\frac{r(t+h)\vec u_r(t+h) - r(t+h)\vec u_r(t)}h + \frac{r(t+h)\vec u_r(t) - r(t)\vec u_r(t)}h\right) \\ &= r(t)\dot{\vec u_r}(t) + \dot r(t)\vec{u_r}(t) \end{align*}

which is the typical way one establishes the product rule. Note the absence of any derivatives w.r.t. $$r$$.