# Are Mathematica commands always supposed to check that Method -> name is valid?

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.

• @BobHanlon I see. I did not know this. This makes sense. You could post this as answer and will accept it. Mar 16, 2018 at 2:37
• Options-checking is in general a headache. If there were any easy, built-in way to enforce OptionValue checks this type of thing would never come up. Mar 16, 2018 at 2:58

I would expect a fully implemented/documented function to check the validity of the specified Method; however, since AsymptoticDSolveValue is marked as [EXPERIMENTAL] I would not assume that it is fully implemented/documented.
• I haven't looked at the source code recently, but last I checked Automatic is currently the only implemented method. :) Which is why it is not documented, and for now basically ignored. Mar 16, 2018 at 3:59
The other answer is completely correct (see my comment), but let me add some context. For algorthmic functions, it is generally the case that we validate the method options and issue messages/fail (sometimes a fallback is used). However, in "container" type functions, like Graphics/Graphics3D, we often don't validate them. This is because they may be used by some layers and not others (for example, in Graphics, the value of Method might only affect front end rendering, and it is the front end which must understand it). If they were validated, then every layer would have to know all the valid values, even if they were completely irrelevant.