0

Problem Statement

I am treating a system of ordinary differential equations (ODE) that can be written as $$ \frac{\mathrm d\vec{x}(t)}{\mathrm dt} = A \vec{\theta}(\vec{x}(t), u(t), t), $$ with initial conditions $\vec{x}(t=0) = \vec{0}.$ Here, $\vec{x}(t) \in \mathbb{R}^N$ and $u(t) \in \mathbb{R}$. Additionally, $A \in \mathbb{R}^{N \times J}$ is constant in time and $\vec{\theta}(\vec{x}(t), u(t), t) \in \mathbb{R}^{J}$ is often called a “feature mapping” where a set of scalar-valued candidate functions $\phi_j$ are used to define $$ \vec{\theta}(\vec{x}(t), u(t), t) = \begin{bmatrix} \phi_1(\vec{x}(t), u(t), t) & \cdots &\phi_J(\vec{x}(t), u(t), t) \end{bmatrix}^T. $$

Question

If $A_{n,j}$ is used to represent the entry in the $n$-th row and $j$-th column of $A$, can I find a time-dependent expression for $\dfrac{\mathrm d\vec{x}(t)}{\mathrm dA_{n,j}}$?

Solution Attempts

  1. Browsing SE, Derivative of solution of ODE has a similar setup but ultimately is inapplicable. Estimate on derivative of ODE solution with respect to parameters also has an overlap with the current question but also strays from the intention here and also has no answers.
  2. It is intuitive for me to use the notation: $$ \vec{x}(t) = \int_0^{t'} A \vec{\theta}(\vec{x}(t'), u(t'), t') \,\mathrm dt' $$ To represent the solution to the ODE introduced earlier---despite me having trouble finding this as common practice (perhaps I have a misunderstanding)? From here, I want to work towards an expression for $\dfrac{\mathrm d\vec{x}(t)}{\mathrm dA_{n,j}}$ so I write $$ \vec{x}(t) = A \int_0^{t'} \vec{\theta}(\vec{x}(t'), u(t'), t') \,\mathrm dt'. $$ Testing this numerically, I have found this is an invalid manipulation.
  3. Googling, the concept of a parametric derivative has guided me to rewrite $$ \frac{\mathrm d\vec{x}(t)}{\mathrm dA_{n,j}} = \frac{\ \dfrac{\mathrm d\vec{x}(t)}{\mathrm dt}\ }{\ \dfrac{\mathrm dA_{n,j}}{\mathrm dt}\ } $$ but due to the time-independent nature of $A$, this becomes undefined.
  4. Thinking about the problem, it is clear to me that the dependence of $\vec{x}(t)$ on previous times introduces some kind of “path dependence” to the problem. Therefore, I expect $\dfrac{\mathrm d\vec{x}(t)}{\mathrm dA_{n,j}}$ to involve a weighted integral over $x(t')$ where $t'<t$. But I cannot put a formal approach to these words.
Tijil Saka
  • 167
  • 10

1 Answers1

1

To find the derivative of the solution with respect to a parameter, you need to use the concept of sensitivity equations. Let me walk through how to approach this parameter derivative for your ODE system.

First, we need to be precise about notation. Let's denote the sensitivity you're looking for as: $$\mathbf{s}_{n,j}(t) = \frac{\partial \vec{x}(t)}{\partial A_{n,j}}$$

This is a vector representing how each component of $\vec{x}(t)$ changes with respect to a small change in matrix entry $A_{n,j}$.

To derive the differential equation that $\mathbf{s}_{n,j}(t)$ satisfies, we can differentiate the original ODE with respect to $A_{n,j}$:

$$\frac{d}{dt}\left(\frac{\partial \vec{x}}{\partial A_{n,j}}\right) = \frac{\partial}{\partial A_{n,j}}\left(A\vec{\theta}(\vec{x},u,t)\right)$$

Using the chain rule: $$\frac{d\mathbf{s}_{n,j}}{dt} = \frac{\partial (A\vec{\theta})}{\partial A_{n,j}} + \frac{\partial (A\vec{\theta})}{\partial \vec{x}}\frac{\partial \vec{x}}{\partial A_{n,j}}$$

The first term is straightforward - it's just the derivative of $A\vec{\theta}$ with respect to the matrix element: $$\frac{\partial (A\vec{\theta})}{\partial A_{n,j}} = \mathbf{e}_n \cdot \theta_j$$

where $\mathbf{e}_n$ is the standard basis vector with 1 in position $n$ and 0 elsewhere, and $\theta_j$ is the $j$-th component of $\vec{\theta}$.

The second term involves the Jacobian of $A\vec{\theta}$ with respect to $\vec{x}$: $$\frac{\partial (A\vec{\theta})}{\partial \vec{x}} = A\frac{\partial \vec{\theta}}{\partial \vec{x}}$$

So the sensitivity equation becomes: $$\frac{d\mathbf{s}_{n,j}}{dt} = \mathbf{e}_n \cdot \theta_j + A\frac{\partial \vec{\theta}}{\partial \vec{x}}\mathbf{s}_{n,j}$$

With initial condition $\mathbf{s}_{n,j}(0) = \mathbf{0}$ (since the initial condition $\vec{x}(0)$ is independent of $A_{n,j}$).

This is a linear, time-varying ODE for the sensitivity. You can solve it alongside your original system to obtain $\mathbf{s}_{n,j}(t)$.

Your intuition about path dependence is correct - the sensitivity at time $t$ depends on the entire history of the system's evolution. The formal expression is given by solving the sensitivity equation above, which typically doesn't have a closed-form solution but must be integrated numerically.​​​​​​​​​​​​​​​​

Barbab
  • 187
  • Very interesting. I can see that this approach of introducing modifications to the original differential equation such that the quantity of interest is now included may have applications beyond the current problem. Thank you very much! – SeanBrooks Mar 23 '25 at 22:35