2
$\begingroup$

Assuming $a>0,b>0,c>0$, in matrix A = {{a - I*b, c}, {c, a + I*b}}; I am interested in solving the following differential equation $\frac{d}{dt}R(t) = -i(A R(t) - R(t) A^\dagger)$, where $A^\dagger$ is the conjugate-transpose of $A$. Here is my code

ini = R[0] == {{s00, s01}, {s10, s11}}; R[t_] = {{r00[t], r01[t]}, {r10[t], r11[t]}}; solR = DSolve[{D[R[t], t] == (-I)*(A . R[t] - R[t] . ConjugateTranspose[A]), ini}, Flatten[R[t]], t] 

Unfortunately, this yields {{r00[t] -> ComplexInfinity, r01[t] -> ComplexInfinity, r10[t] -> ComplexInfinity, r11[t] -> ComplexInfinity}}.

By direct approach: noting that $\frac{d}{dt}R(t) = -i(A R(t) - R(t) A^\dagger)$ has the solution $R(t) = e^{-i A t} R(0) e^{i A^\dagger t}$, the following code does not lead to ComplexInfinity solution

 R0 = {{s00, s01}, {s10, s11}}; SolR=MatrixExp[(-I)*A*t] . Rinitial . MatrixExp[I*ConjugateTranspose[A]*t] 

I want to understand what is "wrong" with the first approach?

$\endgroup$
1
  • $\begingroup$ I'm using V 13.3. What result do you obtain? $\endgroup$ Commented May 14, 2024 at 21:21

1 Answer 1

1
$\begingroup$

In both Wolfram Language 13.3.0 Engine for Linux and the cloud version 14.0.0, the original code produces the error message "DSolve::nolist: List encountered within ... There should be no lists on either side of the equations." The DEs and ICs can be rewritten using Flatten and Thread to eliminate the disallowed lists, as

ClearAll["Global`*"] r[t_]= {{r00[t], r01[t]}, {r10[t], r11[t]}}; ini= {{s00, s01}, {s10, s11}}; amat={{a-I*b, c}, {c, a+I*b}}; adgr=ConjugateTranspose[amat] //ComplexExpand; ( ics = Thread[Flatten[ r[0]] == Flatten[ini]] )//ColumnForm ( odes = Thread[D[Flatten[r[t]],t] == -I*Flatten[amat.r[t]-r[t].adgr]] )//ColumnForm solR1 = DSolveValue[Flatten@{odes,ics}, Flatten[r[t]], t]//Simplify; 

The solution is a bit too complicated. Making the substitution $b^2 \rightarrow c^2-\omega^2/4$ and multiplying the solution by $\omega^3$ allows some simplification, as

solR2 = ω^3 solR1 /.b^2->c^2+ω^2/4 //PowerExpand //ExpToTrig //FullSimplify; solR2 //ColumnForm 

enter image description here

You may want to make different substitutions or not use ComplexExpand depending on the values of your constants.

The DSolveValue solution can be compared to the MatExp form as follows.

altSol1 = MatrixExp[(-I)*amat*t] . ini . MatrixExp[I*adgr*t]; altSol2 = ω^3 altSol1 /.b^2->c^2+ω^2/4 //PowerExpand //ComplexExpand //ExpToTrig //Simplify; ( Flatten[altSol2] == solR2 //Thread ) /.b->Sqrt[c^2+ω^2/4] //Simplify {True,True,True,True} 

Note this approach uses PowerExpand and ComplexExpand. Each of them makes assumptions about expressions being positive and real. Use ArrayReshape to transform solR1 and solR2 back to 2x2 nested lists.

$\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.