Environmental and safety regulations are creating increasing interest in ionic liquids which have been used as alternative solvents for a wide range of industrial applications. Knowing the phase equilibrium of these materials is very important. In this study, the solubility of CO2 in ionic liquid 1-alkyl-3 methylimidazolium bis (tri fluoro methyl sulfonyl) imide ([Cn-mim][Tf2N]; n=2, 4, 6, 8) was probed with the Peng-Robinson (PR) equation of state (EOS) and Wong-Sandler mixing rule and van Laar model for excess Gibbs free energy. The differential evolution (DE) optimization method was applied to optimize the binary interaction parameter and activity coefficients. Moreover, binary interaction parameters and activity coefficients were presented as mathematical correlations that for various materials have depended on temperature. Our results showed that average absolute derivations of our proposed model were less than other existing models, and by using the aforesaid method better prediction could be achieved.