Is the difference between stable nonlinear systems Lyapunov stable? If there are two nonlinear systems with stable equilibria $x_1 = x_2 = 0$
$$\dot x_1 = f(x_1, u) \qquad \dot x_2 = g(x_2, u)$$
with identical inputs $u$, is the difference between the system states $x_1, x_2 \in \mathbb{R}^n$
$$e = x_1 - x_2$$
stable?
Trivial case
If the systems are LTI with identical system and input matrices $A$ and $B$
$$f(x_1 = x, u) = g(x_2 = x, u) = Ax + Bu,$$
the system dynamics is
$$\dot e = Ae.$$
A Lyapunov function
$$V(e) = e^T P e$$
results in
$$\dot V(e) = \dot e P e^T + e^T P \dot e = e^T (A^T P + P A) e.$$
If $A$ is Hurwitz, then $A^T P + P A = -Q$ with a positive definite real symmetric $P$ and a positive definite $Q$. As $\dot V(e) = -e^TQe < 0\ \forall x \neq 0$, the difference between the two asymptotically stable LTI systems is asymptotically stable.
My Question
Can this be generalized to arbitrary nonlinear globally/locally/asymptotically/... stable systems,

*

*where $f = g$? (1)

*where $f \neq g$? (2)

Thought experiment: An equilibrium is stable if for each $\epsilon > 0$, there is a $\delta$ such that with $|| x || < \delta$ at $t = t_0$ the state remains within $|| x || < \epsilon$. Wouldn't that imply that the vector $e$ connecting two $x_1, x_2$ remains within a hypersphere $\mathcal{B}$ that includes both $|| x_1 || < \epsilon_1$ and $|| x_2 || < \epsilon_2$? Then for $|| e || < \min(\delta_1, \delta_2)$ at $t = t_0$, it would hold $|| e || < 2r_\mathcal{B}$ with $r_\mathcal{B}$ radius of $\mathcal{B}$?
At the same time: Starting from
$$V(e) = \frac{1}{2} e^T e,$$
I quickly get stuck at
$$\dot V(e) = e^T \dot e = e^T \left(f\left(x_1, u\right) - g\left(x_2, u\right)\right) =\ ...?$$
Update
Arastas answer has a counterexample for $f \neq g$ (loosely quoting):

$\dot x_1 = u$ and $\dot x_2 = -u$ leads to $\dot e = 2u$. With $u=1$, we get $e(t) \rightarrow \infty$ for $t \rightarrow \infty$.

In this SISO example, the derivatives of $f$ and $g$ w.r.t. $u$ differ:
$$\frac{\partial}{\partial u} f(x_1, u) = 1 \neq -1 = \frac{\partial}{\partial u} g(x_2, u).$$
Speaking more generally, the (transposed) gradient matrices of $f$ and $g$ w.r.t. $u$ differ:
$$(\nabla_u f)^T = \frac{\partial}{\partial u} f(x_1, u) \neq \frac{\partial}{\partial u} g(x_2, u) = (\nabla_u g)^T.$$

*

*What can we say about the stability of $e$ for arbitrary $f, g$, but allowing for restrictions on the gradients $\nabla_u f$, $\nabla_u g$? (3)
If the restriction were made $\nabla_u f = \nabla_u g$, (3) would capture case (1).

 A: I will assume that although $u$ is the same in both, that it is not a-priori fixed. That is you are considering that you can make the error asymptotically stable with the appropriate choice of $u.$ My interpretation of your question is:

When is the parallel interconnection of two IO stable systems IO stable? (Where IO Stable can mean whatever type of stability you want it to mean)

For all practical purposes this is what you are asking since we can always absorb a sign into one of the system's outputs and ask that question for $e' = y_1 + y_2.$ Now, this is still not obviously true. For example, Arastas' combined system is not controllable. In particular, note that the stacked system is
$$\begin{aligned}\begin{pmatrix} \dot{x}_1 \\ \dot{x}_2 \end{pmatrix} &= \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}\begin{pmatrix} {x}_1 \\ {x}_2 \end{pmatrix} + \begin{pmatrix} 1 \\ -1 \end{pmatrix} u, \\ y &= x_1 - x_2\end{aligned}$$
Apply the Kalman Controllability Conditions and verify a lack of controllability. However, it is stabilizable! The eigenvalues of the system matrix remain negative. In fact, this is true for any stacked systems that are otherwise decoupled. The eigenvalues of the combined system are necessarily the union of eigenvalues. So if you have two systems whose system matrix is Hurwitz, then the stacked state also has a Hurwitz system matrix. Moreover, if both systems are controllable, you at the minimum have stabilizability. And, of course, if all the states decay, clearly the output $y := x_1 - x_2 \to 0$ as well.
Of course, by stacking the system, it should be made clear that the feedback used to stabilize the system may be different than the feedback used to stabilize the individual subsystems. As does the nature of the stability. That shouldn't be surprising. However, my interpretation of your question is that $u$ is the same in both, but not a-priori fixed. So under that interpretation this is reasonable.
Now, what about in the nonlinear case. Clearly, even in the linear case, you are going to lose modes of controllability and so that is likely to highly constrain the nonlinear case (and being nonlinear the problem gets harder). First off, recognize that if both systems can be linearized, have Hurwitz jacobians and are controllable we can just defer to the above result. So let us consider the other cases. This is where it gets tricky. One place to look is passivity and that is not a bad place to look since you are already considering Lyapunov stability. Assuming you absorb a sign in the right place and prove that the sign flipped system is passive (i.e. you proved the map $u_2\mapsto -y_2$ is passive) you can consider

When is the parallel interconnection of two passive systems, passive?

Always. Once the combined system is passive, you can stabilize it with a strictly passive feedback to get $L_2$ stability ($L_2$ inputs produce $L_2$ outputs).
You can also consider feedback interconnections and cleverly organize your inputs and outputs to get some input to the error is passive probably. However all of these considerations depend highly on the system you are considering as they are quite restrictive! There are a wide variety of tools available that, once you have determined a system and specific category of stability, could be leveraged.
A: Consider $f\ne g$. Let $\dot{x}_1=u$ and $\dot{x}_2=-u$ (Lyapunov stable). Then $\dot{e}=2u$ and for $u=1$ we have $e(t)\to \infty$ -- unstable. If you want your system to be assymptotically stable, then consider $\dot{x}_1=-x_1+u$ and $\dot{x}_2=-x_2-u$. Then for $u=t$ we have $e(t)\to \infty$ -- unstable.
Moreover, you write

the difference between the asymptotically stable LTI systems is (unsurprisingly) asymptotically stable.

Your example is not correct since the ass. stability of an LTI system is not equivalent to $A$ being negative definite. $A$ must be Hurwitz.
