# How to solve matrix differential equation $\dot P (t) = P(t) S(t) P(t) - Q$?

While solving an optimal control problem, I encountered the following matrix differential equation

$$\dot P (t) = P(t) S(t) P(t) - Q$$

where $P(t_f)=Q_f$ is the terminal condition. All matrices are block matrices

$$P = \begin{bmatrix} P_1\\ P_2\\ P_3\\ \end{bmatrix}$$

$$S = \begin{bmatrix} S_1 & S_2 & S_3\end{bmatrix}$$

$$Q = \begin{bmatrix} Q_1 \\ Q_2 \\ Q_3\\ \end{bmatrix}$$

We know that block matrices $P_1$ to $P_3$ are non-symmetric and positive semidefinite. Block matrices $Q_1$ to $Q_3$ are symmetric positive semidefinite. Blocks $S_1$ to $S_3$ are diagonal square matrices.

What are the solvability conditions? And what is the solution?

• Are you sure about the product $PSP$ ? No transpose, no inverse ?
– user65203
Commented Mar 15, 2018 at 9:33
• yes, P is a column block matrix, S is a row block matrix and PSP will result in a column block matrix Commented Mar 15, 2018 at 10:22
• S is 1-by-3 and matrices P and Q are 3-by-1. Commented Mar 15, 2018 at 10:33

Not an answer but too long for a comment.

Maybe you can get some inspiration from the scalar equivalent, the Riccati equation

$$p'(t)=s(t)p^2(t)-q(t).$$

Assuming you know a particular solution, let $$p_0(t)$$, by subtraction you get

$$(p(t)-p_0(t))'=s(t)(p^2(t)-u^2(t))=s(t)(p(t)-p_0(t))(p(t)-p_0(t)+2p_0(t))$$ or

$$v'(t)-2p_0(t)v(t)=s(t)v^2(t)$$ which is a Bernouilli equation and is linearized as

$$\left(\frac1{v(t)}\right)'-2p_0(t)\frac1{v(t)}=s(t).$$

From this, the homogeneous solution

$$\frac1{v(t)}=Ce^{2\int p_0(t)\,dt}$$ and the general solution can be obtained by variation of the constant.