Flailing

Here is how you solve a problem in a scientific computing class.

  1. Read the problem statement carefully. Make sure that you understand what you are supposed to be figuring out.
  2. Figure out how you’re going to sanity check your solution. This could be a check to see that the answer satisfies an equation that it is supposed to satisfy, or a check on the order of magnitude of some quantity, or a check to make sure that the procedure works correctly for an set of parameters for which the answer is known in closed form. A picture is usually helpful.
  3. Try to find a numerically convenient problem formulation. At the very least, this usually means changing to a new set of variables.
  4. Taylor expand, change coordinates, and repeat.
  5. Sanity check your analytical computations against numerics; sanity check your numerical computations with analysis.

Here is how you fail to solve a problem in a scientific computing class.

  1. Choose the most prominent looking equation in the problem statement and fixate on it. Ignore the surrounding text.
  2. Look on Wikipedia to see if there is a problem that looks almost the same. Be careful not to think too much before Googling, or you might accidentally gain some insight.
  3. Take whatever you found on Wikipedia and dump it into Mathematica. Be careful not to simplify, check for typos, or otherwise sanity check this step.
  4. Wildly guess some manipulation that you should apply to whatever formulas you’ve scraped from your Wikipedia and Mathematica wanderings. Ideally, you should avoid any manipulation having to do with Taylor series, integration by parts, or basic linear algebra in order to avoid accidentally landing on a good approach.
  5. Test with one set of inputs and conclude that if the answer is not NaN or inf, then your computation is correct. By no means should you draw a picture or think critically about your answer; this might lead to realizing that what you’ve done makes now sense.

The latter approach is colloquiually called “flailing.”

Comments

blog comments powered by Disqus
Fork me on GitHub