go to the effort of vs take pains

go to the effort of

take pains

verb
  • To use care and effort (to do something) despite any corresponding trouble or inconvenience 

How often have the words go to the effort of and take pains occurred in a corpus of books? (source: Google Ngram Viewer )