duty vs undertaking

duty

noun
  • That which one is morally or legally obligated to do. 

  • The state of being at work and responsible for or doing a particular task. 

  • A tax placed on imports or exports; a tariff. 

  • The efficiency of an engine, especially a steam pumping engine, as measured by work done by a certain quantity of fuel; usually, the number of pounds of water lifted one foot by one bushel of coal (94 lbs. old standard), or by 1 cwt. (112 lbs., England, or 100 lbs., United States). 

undertaking

noun
  • The act of one who undertakes (in either sense). 

  • A promise or pledge; a guarantee. 

  • That which is undertaken; any business, work, or project which a person engages in, or attempts to perform; an enterprise. 

  • The business of an undertaker, or the management of funerals. 

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