Evaluate derivative of reachability Gramian: is this correct? So I have the reachability Gramian matrix for a linear time-invariant system:
\begin{align}
W(t_{0},t) = \int_{t_{0}}^{t}e^{A(t-s)}BB^{\intercal}e^{A^{\intercal}(t-s)}.
\end{align}
In this case I have $t_{0}=0$. Let us differentiate this w.r.t. to $t$:
\begin{align}
\dot{W}(0,t) 
=& \frac{d}{dt}\left[\int_{0}^{t}e^{A(t-s)}BB^{\intercal}e^{A^{\intercal}(t-s)}ds\right] \\
=& \frac{d}{dt}\left[e^{At}\int_{0}^{t}e^{-As}BB^{\intercal}e^{-A^{\intercal}s}ds\;e^{A^{\intercal}t}\right] \\
=& Ae^{At}\int_{0}^{t}e^{-As}BB^{\intercal}e^{-A^{\intercal}s}ds\;e^{A^{\intercal}t} \\
&+e^{At}\left[e^{-As}BB^{\intercal}e^{-A^{\intercal}s}\bigg\vert_{0}^{t}\right]e^{A^{\intercal}t} + e^{At}\int_{0}^{t}e^{-As}BB^{\intercal}e^{-A^{\intercal}s}ds\;e^{A^{\intercal}t}A^{\intercal} \\[3mm]
=& AW(0,t) + BB^{\intercal} - e^{At}BB^{\intercal}e^{A^{\intercal}t}+W(0,t)A^{\intercal}.
\end{align}
So this is the result I obtain. However, in the solution to this problem that I was trying to solve the term $- e^{At}BB^{\intercal}e^{A^{\intercal}t}$ did not appear, or was zero. So I am wondering if I made some error, or if there is some control theory result that make this term vanish?
 A: When you applied the product rule, you incorrectly computed the derivative of the integral. By the fundamental theorem of calculus, we have
$$
\frac d{dt} \int_{t_0}^t e^{-As}BB^\top e^{-A^\top s}\,ds = e^{-At}BB^\top e^{-A^\top t}.
$$
There is no $BB^\top$ term that should appear here.
A: Applying the Leibniz integral rule to your middle term yields
$$
\frac{d}{dt}\left[\int_{0}^{t} e^{-A\,s} B B^{\intercal} e^{-A^{\intercal} s}ds\right] = 
\int_{0}^{t} \frac{d}{dt}\left[e^{-A\,s} B B^{\intercal} e^{-A^{\intercal} s}\right] ds + e^{-A\,t} B B^{\intercal} e^{-A^{\intercal} t} = e^{-A\,t} B B^{\intercal} e^{-A^{\intercal} t}.
$$
You can also apply the Leibniz integral rule directly to initial expression, which yields
\begin{align}
\frac{d}{dt}\left[\int_{0}^{t} e^{A (t-s)} B B^{\intercal} e^{A^{\intercal} (t-s)}ds\right] 
&= \int_{0}^{t} \frac{d}{dt}\left[e^{A (t-s)} B B^{\intercal} e^{A^{\intercal} (t-s)}\right] ds + e^{A (t-t)} B B^{\intercal} e^{A^{\intercal} (t-t)}, \\
&= \int_{0}^{t} \left[A\,e^{A (t-s)} B B^{\intercal} e^{A^{\intercal} (t-s)} + e^{A (t-s)} B B^{\intercal} e^{A^{\intercal} (t-s)} A^{\intercal}\right] ds + B B^{\intercal}.
\end{align}
