Implemented state_derivatives method.
Added state derivatives example.
Added state_derivatives.cc example file.