When calling a Mathematica command which accepts a Method -> name
option, I always thought that if the name
given is not a valid method name, then the command does not evaluate; i.e., the command always checks if the Method
given is supported.
For example, this works, since the Method
is valid:
ode = t y''[t] + y'[t] + 2 y[t] == 0;
DSolve[ode, y[t], t, Method -> Automatic]
But this will not work, since the Method
name is wrong:
ode = t y''[t] + y'[t] + 2 y[t] == 0;
DSolve[ode, y[t], t, Method -> "MickyMouse"]
So I was trying to find what Method
can be used by AsymptoticDSolveValue
, since it is not documented, and by chance I found it will accept any Method
name I give it, and it still works.
ode = t y''[t] + y'[t] + 2 y[t] == 0;
ic = {y[0] -> C[1], y'[0] -> C[2]};
pt = 1;
AsymptoticDSolveValue[ode, y[t], {t, pt, 3}, Method -> Automatic]
But this also works:
AsymptoticDSolveValue[ode, y[t], {t, pt, 3}, Method -> "MickyMouse"]
Same answer as before. Since I am sure the MickyMouse
method is not supported by AsymptoticDSolveValue
, then it must be that not all commands do check the Method
argument.
Is this buggy behaviour?
This makes one wonder if the Method
name they supplied to a command was actually used, or was it ignored as in this example, and another method was used?
This is on 11.3, Windows 7.
Options
-checking is in general a headache. If there were any easy, built-in way to enforceOptionValue
checks this type of thing would never come up. $\endgroup$