Contributions to partition identities and sums of polygonal numbers by using Ramanujans theta functions