# On the derivative along the trajectories of a dynamical system

The Lie derivative of a function $V:\mathbb{R}^n\to\mathbb{R}$ along the trajectories of the dynamical system $\dot{x}=f(x)$, with $x\in\mathbb{R}^n$ and $f:\mathbb{R}^n\to\mathbb{R}^n$, is defined as [H.K.Khalil, Nonlinear Systems, Prentice Hall editions, 3rd edition, ISBN: 0-13-067389-7, London 2002, p.114,509-510]: $$\dot{V}(x)=\frac{\partial V}{\partial x}\cdot f(x)$$ Using this formula and assuming that $V(x)=\frac{1}{2}x'Px$ (with $P$ symmetric) and $f(x)=Ax$ we have: $$\dot{V}(x)=\frac{\partial V}{\partial x}\cdot f(x)=x'PAx$$ However, this is wrong. The correct answer follows this derivation: $$\dot{V}(x)=\frac{d}{dt}V(x)=\frac{d}{dt}(x'Px)=\frac{1}{2}(\dot{x}'Px+x'P\dot{x})$$ we now substitute $\dot{x}=Ax$ to get: $$\dot{V}(x)=\frac{1}{2}x'(A'P+PA)x$$

So I have a series of questions:

1. What is wrong with the first approach?
2. Why don't we denote $\frac{\partial V}{\partial x}$ simply as $\frac{dV}{dx}$ since $V$ is a function of a single variable - namely $x$.
3. What is the utility of the first formula? an example?
-

1. There is nothing wrong, since the two answers are equal (note that $x'A'Px$ is a scalar, so it equals its own transpose $(x'A'Px)'=x'P'A''x''=x'PAx$).

2. The variable $x$ is a vector $(x_1,\dots,x_n)$, and $\partial V/\partial x$ is the vector of partial derivatives (i.e., the gradient of $V$), which I guess is the reason for the curved d's. But this is just one of many notations for the gradient. Pick your favourite. ;-)

3. Which formula? The definition of $\dot V$? Well, for example, $\dot V=0$ iff $V$ is a constant of motion. And you might want to read about Liapunov functions too.

-
Thanks a lot for the answer. If I may ask one more thing... The Lyapunov equation is known as $A'P+PA=-Q$ where $Q$ is a positive (semi)definite matrix. Why don't we use $PA=-Q$ ? (I understand that $A'P+PA\neq 2PA$ although $x'(A'P+PA)x=2x'PAx$). – Pantelis Sopasakis Nov 3 '11 at 8:53
@Pantelis: The notion of "positive definite" really only makes sense for symmetric matrices (or Hermitian matrices if you deal with complex numbers), since it's really about the quadratic form $x'Qx$ rather than just the matrix $Q$ itself. So if you want $Q$ to be symmetric, you can't take just $PA=-Q$, since $PA$ need not be symmetric. – Hans Lundmark Nov 3 '11 at 9:37

Indeed they are both correct, even if $P$ is not symmetric. If $x$ is a $n\times 1$ column vector (which, using your algebra, it is), then the gradient of $V$ i.e. $\frac{\partial V}{\partial x}$ is the derivative of a quadratic form,

$$\frac{\partial V }{\partial x}=\frac{1}{2}\frac{\partial xPx}{\partial x}=\frac{1}{2}(P+P^{T})x$$

In the special case that $P$ is symmetric, obviously you get,

$$\frac{\partial V }{\partial x}=Px$$

Observe that $Px$ (in matrix notation) is a $n\times 1$ column vector. If $P$ is not symmetric, $(P+P^{T})$ is indeed so. Now, the Lie derivative of the function $V$ with respect to the vector field $f$, is given by,

$$\dot V(x)=\frac{\partial V }{\partial x} \cdot f(x)=\frac{1}{2}[(P+P^{T})x]^{T} Ax = \frac{1}{2}x^{T}(P+P^{T})Ax$$

Apparently we have tranposed $\frac{\partial V}{\partial x}$ in the above equation because we used matrix notation and the dotting between vectors is equivalent to matrix multiplication, with one vector transposed. Notice for the transposition that $P+P^{T}$ is a symmetric matrix hence $P+P^{T}=(P+P^{T})^{T}$. Now, if $P$ is symmetric the Lie derivative is,

$$\dot V(x)=x^{T}PAx$$

Using your second derivation, the Lie derivative is,

$$\dot V(x)= \frac{1}{2}x^{T}(A^{T}P+PA)x$$

which also works for non-symmetric matrices. You want to prove that they are equal. Take the difference of the two results, i.e.

$$\Delta V(x)= \frac{1}{2}x^{T}(P+P^{T})Ax - \frac{1}{2}x^{T}(A^{T}P+PA)x = \frac{1}{2}x^{T}[PA+P^{T}A-A^{T}P-PA]x =$$ $$=\frac{1}{2}x^{T}[P^{T}A-A^{T}P ]x$$

For $x=0 \rightarrow \Delta V=0$. Taking the derivative w.r.t $x$ (notice that $\Delta V$ is a quadratic form),

$$\frac{\partial \Delta V(x)}{\partial x}=\frac{1}{2}([P^{T}A-A^{T}P]+[P^{T}A-A^{T}P]|^{T})x$$

some algebra,

$$P^{T}A-A^{T}P+[P^{T}A-A^{T}P]|^{T}=P^{T}A-A^{T}P+[(P^{T}A)^{T}-(A^{T}P)^{T}]=$$ $$=P^{T}A-A^{T}P+[A^{T}T-P^{T}A]=0$$

Thus $\Delta V(x)= const=0$.

Also, regarding the dels in the derivative $\frac{\partial V(x)}{\partial x}$, Hans is also correct, but in the general case the Lie derivative is also defined for two vector fields, which in this case $\frac{\partial V(x)}{\partial x}$ is the Jacobian matrix of the vector field $V$.

-