I'm reading Steven Johnson's notes on Adjoint Methods and have made it to the Initial Value Problems section.
We have $A = e^{-Bt}$, where $B$ depends on a parameter vector $\vec{p}$ and therefore $A$ does as well through its relationship to $B$.
We now want to find $A_{\vec{p}}$, the partial derivative of $A$ w.r.t. the parameters. Johnson gives the answer as:
$$ A_{\vec{p}} = - \int\limits_0^t e^{-B\tau} B_{\vec{p}} e^{-B(t-\tau)} d\tau $$
I can't see why this is true. Can someone help me out?
Moreover, he goes on to use this equation in a different one that left-multiplies $A_{\vec{p}}$ by $-\vec{\lambda}^T$ and right-multiplies by $\vec{x}$, which produces the term:
$$ \int\limits_0^t \vec{\lambda}^T(t-\tau) \cdot B_{\vec{p}} \cdot \vec{x}(\tau) d\tau $$
which seems to come from substituting in $\vec{\lambda}(\tau) = e^{B^T \tau} g_{\vec{x}}^T$, which when transposed becomes $\vec{\lambda}^T(\tau) = g_{\vec{x}} e^{B \tau}$, which can cancel the $e^{-B\tau}$ to the left inside the integral. But then to produce $\vec{\lambda}^T(t-\tau)$, you need the $e^{-B(t-\tau)}$ to be next to $g_{\vec{x}}$, but they're separated by matrix $B_{\vec{p}}$, and it's not obvious these commute!
I'm confused. It makes me think the equation for $A_{\vec{p}}$ is somehow wrong. Hoping the derivation can help me reconcile.