# Transpose::nmtx error when using Greek Formal symbol in NDSolveValue

Bug introduced in 12.0 or earlier, persisting through 12.2.

Consider the following call to NDSolveValue for a system of ODEs with 2 dependent variables, where we may choose the first dependent variable, symbol, to be any symbol except y or t:

solver[symbol : Except[y | t, _Symbol]] :=
NDSolveValue[
{symbol'[t] == 1, y'[t] == 1, symbol[0] == 0, y[0] == 0}
, {symbol, y}
, {t, 0, 1}
];

$Version (* 12.0.0 for Linux x86 (64-bit) (April 7, 2019) *)  If we choose ordinary Latin symbols, ordinary Greek symbols, or Formal Latin symbols, this works fine: solver[a] solver[α] solver[\[FormalA]] (* OK *)  But if we choose any Formal Greek symbol, we get errors: solver[\[FormalAlpha]]  Transpose::nmtx: The first two levels of {\[FormalAlpha], NDSolvexs$2814} cannot be transposed.
Part::partw: Part 2 of Transpose[{\[FormalAlpha], NDSolvexs\$2814}] does not exist.
etc.

What is it about Greek Formal symbols which causes things to break?

Interestingly, multi-character symbols containing Formal Greek are OK:

solver[a\[FormalAlpha]]
solver[\[FormalAlpha]\[FormalAlpha]]
(* OK *)


Also note that the error does not occur if there is only 1 dependent variable in NDSolveValue.

• Interesting. v12.2 spits out ndode warning. Looks like a bug. Have you reported it to WRI? – xzczd Dec 18 '20 at 11:56
• @xzczd Reporting now, wanted to see if others could reproduce – yawnoc Dec 18 '20 at 12:37
• Reported, assigned ID [CASE:4742880] – yawnoc Dec 18 '20 at 12:49

v12.2 spits out ndode warning. This seems to be a bug related to the undocumented function InternalProcessEquationsFindDependentVariables (I know it from this post BTW):

Table[
InternalProcessEquationsFindDependentVariables[{symbol'[t] == 1, y'[t] == 1,
symbol[0] == 0, y[0] == 0}, t], {symbol, {\[FormalAlpha], a\[FormalAlpha]}}]
(* {{y}, {a\[FormalAlpha], y}} *)


As we can see, it fails to find the single \[FormalAlpha]. But this function doesn't show up in Trace[NDSolveValue[………], TraceInternal->True], and I've no idea why NDSolve succeeds in handling the 1 dependent variable case.

Luckily, the problem is easy to circumvent. Just set the DependentVariables option:

With[{symbol = \[FormalAlpha]},
NDSolveValue[{symbol'[t] == 1, y'[t] == 1, symbol[0] == 0, y[0] == 0}, {symbol, y},
{t, 0, 1}, DependentVariables -> {symbol, y}]]