Monday, March 2, 2009

It's times like this I wish...

... that I had more than high school physics.

I was solving a nifty little optimization problem which occurred to me as a continuous version of a discrete problem that used to come up in an old computer game I used to play long ago. The problem boiled down to finding a best route of travel given two different speeds in different kinds of terrain.

Anyway, after a page of scribbling around, I came up with a formula for a simple case of the problem.

Then I realized that my simple case was (in a modified form) essentially going to be solved by Snell's Law (also called the Law of Sines). And sure enough, my simple formula was Snell's law (but changed about a bit so it wasn't instantly obvious, like having a ratio of cosecants of angles to the normal instead of sines - which is just a matter of inverting both sides...).

This is essentially what I was doing, but less formally and with a lot more faffing about and a few false starts. (It's easy to find on-line if you already know what to look for, eh?)

I felt like a bit of a dope. On the other hand, at least I was definitely on the right track. Since I'd had a headache all day, that was all I could manage in the time available, so I didn't go on to derive the problem I was actually interested in (the shape made by traveling as far as you could in a given time, given a particular boundary between the two regions), but with Snell's Law it should become a somewhat more straightforward calculation for the situations I was playing with (since it tells me "where to head" after striking a smooth boundary, so for the simpler cases it's a matter of computing where you end up given each boundary point).

3 comments:

Anonymous said...

Feynman would have 'just' summed the integral; probably in his effing head! ;-)

Anonymous said...

Feynman would likely have had the correct intuition via a purely geometric argument to arrive at the result, avoiding the need for any fancier apparatus

Eric Davison said...

There's something to be said for discovering something on your own even if it is something you could look up.