impair vs undermine

impair

verb
  • To weaken; to affect negatively; to have a diminishing effect on. 

undermine

verb
  • To weaken or work against; to hinder, sabotage. 

  • To erode the base or foundation of something, e.g. by the action of water. 

  • To dig underneath (something), to make a passage for destructive or military purposes; to sap. 

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