Document automatic differentiation.

Closes #5