compulsory vs necessary

compulsory

adj
  • Required; obligatory; mandatory. 

  • Having the power of compulsion; constraining. 

noun
  • Something that is compulsory or required. 

necessary

adj
  • Required, essential, whether logically inescapable or needed in order to achieve a desired result or avoid some penalty. 

  • Unavoidable, inevitable. 

How often have the words compulsory and necessary occurred in a corpus of books? (source: Google Ngram Viewer )