Add example that demonstrates how notebooks can be used to derive and implement numerical algorithms

This is a new pull request after the old one, #139, was closed.

@rgbkrk I finally got back to this :-)

Apologies for those rebase and merge conflict commits - I am happy to take out a completely new, cleaner pull request if you prefer!