I have the following example, which is a proxy for the more complex problem I am trying to solve.(Apologies that the LaTeX is explicit, for some reason it trips the code formatting error on stackoverflow..)
$$
\dot{\Phi} = \Phi, \quad \Phi(0) = \mathbf{I}
$$
where $\Phi$ is a square matrix, with identity initial condition. The analytical solution is an exponent for all the diagonal entries and zero for off-diagonal entries. Solving this in mathematica for $\Phi$ up to 10x10 behaves exactly as expected. However, for 11x11 and above, I get
DSolve::overdet: There are fewer dependent variables than equations, so the system is overdetermined
The 10 by 10 example runs in a second or so. My guess is there is something interesting happening when we get to 100 equations, but I can't tell what it is. If anyone knows why this is, or knows how to debug it, would be greatly appreciated. The code is below.
t = Symbol["t"];
phiMatrix =
Table[ToExpression["\[Phi]" <> ToString[i] <> ToString[j]][t], {i,
1, 15}, {j, 1, 15}];
nStates = 11;
phiSubMatrix = phiMatrix[[1 ;; nStates, 1 ;; nStates]];
eqsList = {};
Do[AppendTo[eqsList,
D[phiSubMatrix[[i, j]], t] == phiSubMatrix[[i, j]]], {i, 1,
nStates}, {j, 1, nStates}];
icList = {};
Do[AppendTo[
icList, (phiSubMatrix[[i, j]] /. t -> 0) ==
KroneckerDelta[i, j]], {i, 1, nStates}, {j, 1, nStates}];
phiVars = Flatten[phiSubMatrix];
Dimensions[eqsList]
Dimensions[icList]
Dimensions[phiVars]
solution = DSolve[Join[eqsList, icList], phiVars, t]
1 Answer 1
Something funky with the variable naming. I fixed by using the code below (notice the "n" in between the indices). There might be something strange with the variable naming for higher numbers (perhaps I was inadvertently creating duplicates).
phiMatrix =
Table[ToExpression["\[Phi]" <> ToString[i] <> "n" <> ToString[j]][
t], {i, 1, 15}, {j, 1, 15}];
-
1$\begingroup$ Compare
phiVars // LengthandphiVars // DeleteDuplicates // Length. OrSelect[PositionIndex[phiVars], Length[#] > 1 &](11,1 vs. 1,11). $\endgroup$Michael E2– Michael E22025年08月21日 15:19:04 +00:00Commented Aug 21 at 15:19
Explore related questions
See similar questions with these tags.
NDSolvesupports that:DSolve[{φ'[t] == φ[t], φ[0] == IdentityMatrix[11]}, φ[t] ∈ Matrices[{11, 11}], t]$\endgroup$