This article presents numerical simulation of planar potential flow around an airfoil with possibility of changing its shape. Two-dimensional unsteady flow model with scalar velocity potential, which allows us to calculate pressure distribution along an airfoil from Cauchy-Lagrange integral, is used. For this purpose, an airfoil contour is approximated by a complex cubic spline with possibility of displacement its vertices. This algorithm has been used in the context of fluid-structure interaction and has been applied successfully to determination of stability of an elastic airfoil segment interacting with a flow stream, so-called panel flutter problem. Calculation of external flow is carried out by vortex panel method with Kutta-Joukowski trailing edge condition, which makes mathematical solution unique. Using this method of approximation of an airfoil in combination with the method of discrete vortices provides a semi-analytical solution for complex potential for whole computational domain of air flow. This solution significantly accelerates process of numerical computation of time-averaged aerodynamic force as well as the dynamic stability problem for aeroelastic wing design and temporal evolution of its natural disturbances.