Four examples of the inverse method as a canonical transformation