1
$\begingroup$

The following matrix equation is a Lyapunov equation,

$$ mA.x+ x.mA^T=-mC,$$

the matrix $mA$ is given by

$$

  mA= \begin{pmatrix}
        -\frac  {\gamma}{2}  &  \omega_{m}  &  0 &  0\\\\
        -\omega_{m} &-\frac  {\gamma}{2} &  -2G & 0\\\\
        0  &  0  & -\frac  {\kappa}{2} & -\Delta\\\\
        -2G  &  0  & \Delta &  -\frac   {\kappa}{2}
    \end{pmatrix}

$$

and the matrix $mC$ is given by

$$
    mC= \begin{pmatrix}
        0   &   0   &   0   &  0\\\\
        0   &   \gamma   (2n+1) & 0 & 0\\\\
        0   &    0   &    \kappa   & 0\\\\
        0   &    0    &  0   &    \kappa
     \end{pmatrix}
$$


With[{x = Array[x, Dimensions[mA]]},  x /. Solve[mA .x + x. mA^T + mC == 0,Flatten@x]]

I got an output like this ![enter image description here How can linear matrix equations like these be solved in terms of the given parameters?

$\endgroup$

closed as off-topic by Michael E2, Chris K, garej, Alex Trounev, Edmund Jun 26 at 21:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Chris K, garej, Alex Trounev, Edmund
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Note that LyapunovSolve is the first hit when searching for "Lyapunov equation" in the documentation center. $\endgroup$ – Michael E2 Jun 22 at 23:52
  • 1
    $\begingroup$ People here generally like users to post code as Mathematica code instead of (i.e. in addition to) just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this meta Q&A helpful $\endgroup$ – Michael E2 Jun 22 at 23:53
7
$\begingroup$

There's LyapunovSolve[]:

LyapunovSolve[mA, -mC]
(* long output of matrix for X *)
$\endgroup$
  • $\begingroup$ would it be possible to trace out the cavity before the stationary solution to avoid the long output? $\endgroup$ – user0322 Jun 23 at 20:50
  • 1
    $\begingroup$ @user0322 Sorry, I'm unsure what the jargon term "cavity" refers to. It's likely that the underlying problem that led to this Lyapunov equation is from a field I'm not familiar with. Your follow-up question might better be asked on physics.SE or another more appropriate site. Of course this site attracts experts from a wide variety of fields, so someone else might be able to answer your question. $\endgroup$ – Michael E2 Jun 23 at 21:40
  • $\begingroup$ I moved it to physics $\endgroup$ – user0322 Jun 24 at 6:37
  • $\begingroup$ I modified the matrix mA with changes in sign and would like to ask one question how to avoid returning Null in the output. $\endgroup$ – user0322 Jul 24 at 8:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.