0
$\begingroup$

I have an $8\times8$ symbolic matrix, $G$. It contains mostly real parameters but a few complex ones too. Mathematica computes (actually pretty fast) its inverse $G^{-1}$. The problem is that the inverse provided is too complicated, that is, it is far from being simplified, even though I am pretty sure that it could be much simpler.

If I apply directly Simplify[]of FullSimplify[], Mathematica gets stuck.

What can I do to massage $G^{-1}$ so that a simplification can be carried on?

I tried basically two things: (I)Inputting some assumptions in the simplification and (II)specifying different Methods-->" " for Inverse[] . Using my assumptions about parameters (positive, reals, etc) leads equally to a stuck calculation and different methods lead to equally complicated inverses.

Another question that may help me solving the issue is:

How can I trace which manipulations are slowing down (Full)Simplify ?

Here is my matrix G, in input form:

{{-γa - 2*ΓHa*Re[tH] - 2*ΓVa*Re[tV], -1/2*γb - ΓHb*Re[tH] - ΓVb*Re[tV], 0, 0, -(tH*Sqrt[ΓHa]*Sqrt[ΓHb]) - tV*Sqrt[ΓVa]*Sqrt[ΓVb] - (Sqrt[ΓHa]*Sqrt[ΓHb]*Conjugate[tH])/2 - 
   (Sqrt[ΓVa]*Sqrt[ΓVb]*Conjugate[tV])/2, 0, 0, -1/2*(tH*Sqrt[ΓHa]*Sqrt[ΓHb]) - (tV*Sqrt[ΓVa]*Sqrt[ΓVb])/2 - Sqrt[ΓHa]*Sqrt[ΓHb]*Conjugate[tH] - 
   Sqrt[ΓVa]*Sqrt[ΓVb]*Conjugate[tV]}, {-1/2*γa - ΓHa*Re[tH] - ΓVa*Re[tV], -γb - 2*ΓHb*Re[tH] - 2*ΓVb*Re[tV], 0, 0, 
  -1/2*(tH*Sqrt[ΓHa]*Sqrt[ΓHb]) - (tV*Sqrt[ΓVa]*Sqrt[ΓVb])/2 - Sqrt[ΓHa]*Sqrt[ΓHb]*Conjugate[tH] - Sqrt[ΓVa]*Sqrt[ΓVb]*Conjugate[tV], 0, 0, 
  -(tH*Sqrt[ΓHa]*Sqrt[ΓHb]) - tV*Sqrt[ΓVa]*Sqrt[ΓVb] - (Sqrt[ΓHa]*Sqrt[Γ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,~\gamma b,~\Gamma Ha,~\Gamma Hb,~\Gamma Va,~\Gamma Vb,~\Delta a,~\Delta_b >0$ and $tH,~tV \in \mathbb{C}$

$\endgroup$
3
  • 1
    $\begingroup$ Try to include the conditions inside Simplify: Simplify[..., Map[{Element[#, Reals], # > 0} &, { \[Gamma]a, \[Gamma]b, \[CapitalGamma]Ha, \ \[CapitalGamma]Hb, \[CapitalGamma]Va, \[CapitalGamma]Vb, \ \[CapitalDelta]a, \[CapitalDelta]b } ] ] $\endgroup$ Feb 9, 2022 at 11:14
  • 3
    $\begingroup$ Inverses of symbolica are just unreadible in general. You are already lucky enough to have only 23 nonzero entries in the inverse... $\endgroup$ Feb 9, 2022 at 11:15
  • $\begingroup$ It might already be as simple as it will get. $\endgroup$ Feb 9, 2022 at 14:42

1 Answer 1

1
$\begingroup$

Create an image-array of your matrix, generate a rule for substition of created variables, invert this image-array, simplify it and reinsert original expressions. (I renamed your matrix G to mat and substituted the two complex variables by their real and imaginary part.)

vars = {tH1, tH2, tV1, tV2, \[Gamma]a, \[Gamma]b, \[CapitalGamma]Ha, \[CapitalGamma]Hb, \[CapitalGamma]Va, \[CapitalGamma]Vb, 
\[CapitalDelta]a, \[CapitalDelta]b}; 

MatrixForm[
mat2 = (Simplify[#1, Thread[vars \[Element] Reals]] &)[
mat /. {tH -> tH1 + I tH2, tV -> tV1 + I tV2}]];

arr = Array[a, {8, 8}];

(arr2 = mat2 arr /. _*a[u_, v_] -> a[u, v]) // MatrixForm

varsarr2 = Variables[Flatten[arr2]]

rule = Flatten@MapThread[Rule, {arr, mat2}, 2]

invarr2 = Inverse[arr2]

Denominator for all elements is same. Finaly show all elements, that are not zero.

den = invarr2[[1, 1]] // Denominator;

(invarr3 = invarr2 /. 1/den -> 1/dd // Simplify) // MatrixForm

(invmat = (invarr3 /. dd -> den // Simplify) /. rule // 
Simplify[#, Thread[vars \[Element] Reals]] &) // Timing   (*   16 sec   *)

Manipulate[invmat[[Sequence @@ k]], {k, List @@@ varsarr2}, 
   ControlType -> Setter]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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