0
$\begingroup$

I want to find one solution to the Lyapunov equation, and I use LyapunovSolve[a,c]. But when the solution is not unique, Mathematica did not return any value instead, it shows

The matrix equation has no unique solution.

Is there some method that I can get one solution even if the solution is not unique?

Edit I try to solve equation $$\left( \begin{matrix} 1& 0\\ 0& -1\\ \end{matrix} \right) =\left( \begin{matrix} 1+z& x-iy\\ x+iy& 1-z\\ \end{matrix} \right) X+X\left( \begin{matrix} 1+z& x-iy\\ x+iy& 1-z\\ \end{matrix} \right)$$

 $Assumptions = Element[x, Reals] && Element[y, Reals] && Element[z, Reals]; Rho = { {1 + z, x - I*y}, {x + I*y, 1 - z} } ; c = { {1, 0}, {0, -1} } ; LyapunovSolve[Rho, c] 
$\endgroup$
7
  • 1
    $\begingroup$ Please post your example code. $\endgroup$ Commented Sep 30, 2022 at 12:41
  • 1
    $\begingroup$ LyapunovSolve[rho, c] returns a solution for me (V13.1). This has a nicer simplified form: xmat = LyapunovSolve[rho, c] // ComplexExpand -- I changed Rho to rho in accordance with best practices. $\endgroup$ Commented Sep 30, 2022 at 13:05
  • $\begingroup$ @MichaelE2 I think I need to try 13.1. I'm 13.0, so close. :) But is there some better way I can deal now(I will update it later since install a new version is not a quick way)? $\endgroup$ Commented Sep 30, 2022 at 13:08
  • $\begingroup$ Try it without the $Assumptions. (ComplexExpand will take care of it after the solution.) $\endgroup$ Commented Sep 30, 2022 at 13:12
  • $\begingroup$ Here's what I got, if this particular problem is your main interest: i.sstatic.net/x5qxS.png $\endgroup$ Commented Sep 30, 2022 at 13:14

1 Answer 1

1
$\begingroup$

Compare with Solve and LyapunovSolve.

Clear[rho, c, sol1, sol2]; rho = {{1 + z, x - I*y}, {x + I*y, 1 - z}}; c = {{1, 0}, {0, -1}}; sol1 = {{u, v}, {w, t}} /. Solve[rho . {{u, v}, {w, t}} + {{u, v}, {w, t}} . rho == c, {u, v, w, t}][[1]]; sol2 = LyapunovSolve[rho, c] // ComplexExpand; sol1 == sol2 // Simplify 

(* True *)

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.