Japanese Pentagon Problem

There is a regular pentagon.  The length of its side is a.  Find the area of the pentagon.  Generalize your result for an nonagon.  (Japan, Takebe Katahiro, 1664-1739)