In this paper, the calculation of the potential two-dimensional transonic flow discretized by the Galerkin method over finite elements is considered. The method of artificial compressibility was applied in the supersonic part of the flow field. The velocity potential is separated into one single-signal function and one multi-signal function, which provides a jump in the value of the potential at the point of cut in the current field. The discretized current field is solved by an iterative method, for which the calculation algorithm is given. For the NACA0012 airfoil, the results of flow calculations for typical transonic Mach numbers $M=0.8$ and $M=0.86$ are given in the form of pressure coefficient distribution around the airfoil.