In this paper, we present an analytical method for solving the electric potential equation with the exact boundary condition. We analyze the dielectrophoresis (DEP) force with an $n$-phase ac electric field periodically applied on an interdigitated parallel electrode array. We compare our analytical solution with the numerical results obtained using the commercial software CFD-ACE . This software verifies that our analytical method is correct for solving the problem. In addition, we compare the analytical solutions obtained using the exact boundary conditions and the approximate boundary conditions. The comparison shows that the analytical solution with the exact boundary condition gives a more accurate analysis for DEP and traveling wave DEP forces. The DEP forces of latex beads are also investigated with different phase arrays for $(n=2,3,4,5,6)$.