College Physics ›› 2025, Vol. 44 ›› Issue (12): 52-.doi: 10.16854/j.cnki.1000-0712. 240346

Previous Articles     Next Articles

The solution of the Poisson equation on a rectangular region #br# based on compact differences

PEI Xiao-qi1, WANG Jia-hua2, TAN Jia3, YU Li-min1   

  1. 1.School of Physics, East China University of Science and Technology, Shanghai 201400, China;2. 
    2.School of Pharmacy, East China University of Science and Technology, Shanghai 201400, China;
    3.School of Mechanical and Power Engineering, East China University of Science and Technology, Shanghai 201400, China
  • Received:2024-07-31 Revised:2025-02-24 Online:2026-03-13 Published:2026-03-20

Abstract: The Poisson equation is an important type of elliptic partial differential equation in the fields of mathematics and physics. It is one of the fundamental equations in electromagnetism and electrodynamics, with significant applications in plasma physics. Numerically solving the Poisson equation efficiently has been widely studied. The finite difference method is a common approach for numerically discretizing and solving such elliptic differential equations. The compact finite difference method, by introducing compact operators, can improve the computational accuracy of the finite difference method and reduce computational cost. In this work, we apply the compact finite difference method to numerically solve both the source-free Poisson equation and the linear Poisson equation with a source term within a rectangular domain. We also iteratively solve the source-free nonlinear Poisson equation. The analytical solutions and numerical solutions are visualized using Matlab. Meanwhile, the accuracy and reliability of the solver are verified by comparing the analytical solutions with the numerical solutions. This work is of great significance for solving various types of Poisson equations in physics and indicates that visualization plays an important role in the learning of mathematical physics methods.


Key words: compact difference method, Poisson equation, Matlab, rectangular region