Added derivative functionality.  Not yet tested at all.
Tested and fixed derivative functionality.  Seems to work now.  Added an example.  Need to write real unit tests.