# How to solve the ODE system for sensitivity analysis in a dynamical system?

I am involved in sensitivity analysis of an ODE system. The sensitivity $$Z_i$$ is defined as $$Z_i:=\frac{\partial y_i}{\partial c}$$ for a state function $$y_i$$ and a parameter $$c$$.

(In this post, I want to iterate through multiple state functions but stay with one parameter. It should be possible to repeat the process for different $$c$$.)

The temporary derivative of $$y_i$$ shall be $$\dot{y}_i$$ which is described via the function $$\dot{y}_i=f_i(y,P,t)$$ with the set of all parameters $$P$$ and time $$t$$ as well as the vector of all state functions $$y$$.

I am looking for the solution of the following ODE system: $$\dot{Z}=f_c+JZ$$ $$f_c$$ is a vector with components $$f_{c,i}=\frac{\partial f_i}{\partial c}$$ with one parameter $$c$$. $$J$$ shall be the Jacobian with the derivatives of each $$f_i$$ considering $$y_j$$ (former $$y_i$$).

Is it true that the solution is $$\left ( \begin{matrix} Z_1 \\ ... \\ Z_I \end{matrix} \right ) = \mathbf{J}^{-1}\cdot \exp\left ( (\mathbf{J}\cdot t) - \mathbb{I} \right )\cdot \left ( \begin{matrix} \frac{\partial f_1}{\partial c} \\ ... \\ \frac{\partial f_I}{\partial c} \end{matrix} \right )$$ with identity/unit matrix $$\mathbb{I}$$ and former defined $$i\in I$$?

• Only if $J$ and $f_c$ are constant. If not the solution formula can be almost anything. – LutzL May 31 at 8:19
• Okay, I see. You are right! But it is surely true for constants $J,f_c$, right? – Kutsubato May 31 at 8:47
• Yes. One relatively easy way to see this is to insert a power series for $Z$ and then compare coefficients to get an iterative formula. In the power series, the $J^{-1}$ factor cancels, as there is no constant term in $e^{Jt}-I$. – LutzL May 31 at 9:07

## 1 Answer

Thanks to @LutzL, I recognized that the given solution is a solution of the ODE problem above but only for $$f_c,J=\text{const.}$$. Thus, they aren't allowed to be functions of time.

If they are functions of time, the solution is way more complex and heavily depends on the exact structure of both functions. As consequence, the solution approach is absolutely not explanable in a single StackExchange blog post.

Thanks.