Abstract:Genetic algorithm and Particle Swarm Optimization algorithm with strong search capability have a very wide range of applications in the optimization problem. This paper focuses on approximate solutions of ordinary differential equations and LP solutions, based on genetic algorithm and particle swarm algorithms, a comparison and analysis of the efficiency of two kinds of optimization problems is made. We then fix other parameters but adjust the particle population, in the purpose to compare optimization capability of GA and PSO in approximate solutions of differential equation and the LP problem.