Time derivative of scalar function that takes vector as argument

1.3k Views Asked by At

Let's say I have scalar function $\phi$ that is function of some vectors $\vec{\bf{p}}$ and $\vec{\bf{r}}$ such that $\phi = \phi(\vec{\bf{p}}-\vec{\bf{r}})$, also vector $\bf{r}$ is function of time, so we have $\phi = \phi(\vec{\bf{p}}-\vec{\bf{r}}(t))$. Now I want to take derivative of $\phi$ in respect of time, and my logic goes (by using a chain rule):

$\frac{\partial\phi(\vec{\bf{p}}-\vec{\bf{r}}(t))}{\partial t} = \frac{\partial\phi(\vec{\bf{p}}-\vec{\bf{r}}(t))}{\partial(\vec{\bf{p}}-\vec{\bf{r}}(t))}\frac{\partial(\vec{\bf{p}}-\vec{\bf{r}}(t))}{\partial t} = \frac{\partial\phi(\vec{\bf{p}}-\vec{\bf{r}}(t))}{\partial(\vec{\bf{p}}-\vec{\bf{r}}(t))}\frac{d(-\vec{\bf{r}}(t))}{dt}$

And now I have a problem. First term is directional derivative which means that it is a scalar and with value of $[\nabla\phi(\vec{\bf{p}}-\vec{\bf{r}}(t))]\cdot (\vec{\bf{p}}-\vec{\bf{r}}(t))$. And second term $\frac{d(-\vec{\bf{r}}(t))}{dt}$ is vector. Which means that my time derivative is vector. On the other hand I expect this time derivative to be scalar.

Where did I go wrong?

I have a feeling that it would help if this directional derivative is multiplied with unit vector $\frac{\vec{\bf{p}}-\vec{\bf{r}}(t)}{||\vec{\bf{p}}-\vec{\bf{r}}(t)||}$ and if there is a dot product between fractions so I get scalar. Something like:

$[[\nabla\phi(\vec{\bf{p}}-\vec{\bf{r}}(t))]\cdot (\vec{\bf{p}}-\vec{\bf{r}}(t))\frac{\vec{\bf{p}}-\vec{\bf{r}}(t)}{||\vec{\bf{p}}-\vec{\bf{r}}(t)||}]\cdot\frac{d(-\vec{\bf{r}}(t))}{dt}$

But I cannot find any rules that would support this feeling. And since I am not literate enough to read tensor calculus I am asking for your help.

I checked Differentiation of a scalar function w.r.t. a vector but I still have a hard time with this. My question is how to write this down without using any components or coordinate systems. I will use this equation for things in many coordinate systems and I want it to be as general as possible.

2

There are 2 best solutions below

4
On BEST ANSWER
First term is directional derivative which means that it is a scalar...

Isn't.

Small simplification: I will write simply ${\bf v}(t) = \vec{\bf{p}}- \vec{\bf{r}}(t)$ and now we have: $$ \phi:{\Bbb R}^n\longrightarrow{\Bbb R},\qquad {\bf v}:{\Bbb R}\longrightarrow{\Bbb R}^n. $$ (vectors/elements of ${\Bbb R}^n$ are column vectors)

The composition will be $$ \phi\circ{\bf v}:{\Bbb R}\longrightarrow{\Bbb R}. $$ And by the chain rule $$D(\phi\circ{\bf v})(t) = (D\phi)({\bf v}(t))\cdot D{\bf v}(t),$$ where:

  • $\cdot$ is the matrix product,

  • $(D\phi)({\bf v}(t))$ is a row vector (the transpose of gradient vector),

  • $D{\bf v}(t) = {\bf v'}(t)$ is a column vector.

Can you continue?

2
On

According to what you've written here it goes as this (under assumption that $\Bbb{R}^3$):

$D(\phi)({\bf{v}}(t)) \cdot D{\bf{v}} (t) = \begin{bmatrix} \frac{\partial \phi}{\partial v^1} & \frac{\partial \phi}{\partial v^2} & \frac{\partial \phi}{\partial v^3} \end{bmatrix} \cdot \begin{bmatrix} \frac{d v^1}{d t} \\ \frac{d v^2}{d t} \\ \frac{d v^3}{d t} \end{bmatrix}$

Is this good?

And final question, is the first term $\boldsymbol \nabla \phi$ evaluated at the ${\bf{v}}(t)$ or directional derivative in direction of ${\bf{v}}(t)$ at ${\bf{v}}(t)$?