unnecessarily vs vainly

unnecessarily

adv
  • In an unnecessary way; not by necessity. 

  • To an extent beyond what is needed. 

vainly

adv
  • In a vain pursuit; to no avail. 

  • With a vain attitude; in a self-approving manner. 

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