how to write a case study format research paper vs patent