# How to use RiccatiSolve with symbolic matrix

According to the RiccatiSolve documentation the Eigensystem method can apply to symbolic matrices. However, I can not get it to work, here is what I have tried so far:

\$Assumptions = m ∈ Matrices[{2, 2}];

RiccatiSolve[{{{1, 0}, {0, 1}}, m}, {{{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}}, Method -> "Eigensystem"]

RiccatiSolve::matrix: Argument m at position {1, 2} is not a non-empty rectangular matrix.

RiccatiSolve[{{{1, 0}, {0, 1}}, {{1, 0}, {0, a}}}, {{{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}}, Method -> "Eigensystem"]
RiccatiSolve::nonnum: RiccatiSolve has received a matrix with non-numerical elements.


Can anyone tell me how to use a symbolic matrix with RiccatiSolve and what a symbolic matrix is.

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, [by clicking the checkmark sign](tinyurl.com/4srwe26 – Dunlop May 7 '20 at 8:44
• If you check the documentation the second argument of 'RiccatiSolve' should be a column vector? Perhaps start with the example in the documentation. – Dunlop May 7 '20 at 8:45
• I believe you are mistaken, the second argument can also be a matrix. E.g. RiccatiSolve[{{{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}}, {{{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}}, Method -> "Eigensystem"] works fine. – NeonNuke May 7 '20 at 8:54
• I do not expect your first one to work, but your second one is supposed to. I would inform Support about this. – J. M.'s ennui May 7 '20 at 9:27
• @NeonNuke, yes sorry you are right. – Dunlop May 7 '20 at 13:13

RiccatiSolve and DiscreteRiccatiSolve can handle symbolic matrices as long as the eigenvalues of the Hamiltonian are numeric so that the solver can determine those on the left- and right-half planes.

In this case

aa = {{1, 0}, {0, 1}};
bb = {{1, 0}, {0, a}};
qq = {{1, 0}, {0, 1}};
rr = {{1, 0}, {0, 1}};


and the eigenvalues of the Hamiltonian matrix are

ArrayFlatten[{{aa, -bb.Inverse[rr].Transpose[bb]}, {-qq, -Transpose[aa]}}];
Eigenvalues[%]


$$\{-\sqrt{2},\sqrt{2},-\sqrt{a^2+1},\sqrt{a^2+1}\}$$

Unless $$a$$ is real, those eigenvalues will be on the imaginary axis.

The documentation in 12.1, and probably earlier, is not accurate and will need to be fixed.