Construction of analytic solution to chaotic dynamical systems using the Homotopy analysis method