Abstract. Radial basis function (RBF) approximation has the potential to provide spectrally accurate function approximations for data given at scattered node locations. For smooth solutions, the best accuracy for a given number of node points is typically achieved when the basis functions are scaled to be nearly flat. This also results in nearly linearly dependent basis functions and severe ill-conditioning of the interpolation matrices. Fornberg, Larsson, and Flyer recently generalized the RBF-QR method to provide a numerically stable approach to interpolation with flat and nearly flat Gaussian RBFs for arbitrary node sets in up to three dimensions. In this work, we consider how to extend this method to the task of computing differentiation matrices and stencil weights in order to solve partial differential equations. The expressions for first and second order derivative operators as well as hyperviscosity operators are established, numerical issues such as how to deal with non-unisolvency are resolved, and the accuracy and computational efficiency of the method are tested numerically. The results indicate that using the RBF-QR approach for solving PDE problems can be very competitive compared with using the ill-conditioned direct solution approach or using variable precision arithmetic to overcome the conditioning issue.Key words. radial basis function, flat limit, ill-conditioning, differentiation matrix, stencil weight, RBF, RBF-QR, RBF-FD AMS subject classifications. 65D15, 65D251. Introduction. Radial basis function (RBF) approximation [1,31,4] is emerging as an important method class for interpolation, approximation, and solution of partial differential equations (PDEs) for data given at scattered node locations, with non-trivial geometry, or with computational domains in higher dimensions. The main advantages are the spectral convergence rates that can be achieved using infinitely smooth basis functions, the geometrical flexibility, and the ease of implementation. However, in practical cases, convergence has often been hampered by ill-conditioning as the shape of the basis functions become flatter. The best accuracy for smooth and well resolved solutions is often found in this regime [18,13,19]. Therefore, moving to larger shape parameter values (less flat RBFs) is not a desirable solution to the conditioning problem.The first method that allowed stable computations in the flat RBF regime was the Contour-Padé method derived by Fornberg and Wright [13]. The method works in any number of dimensions, but for relatively low numbers of nodes. Except for the approach in [24], limited to Gaussian RBFs on an equispaced grid in one dimension, the next method that was developed was the RBF-QR method, which was first derived for nodes on the surface of the sphere by Fornberg and Piret [12] and then for general node distributions in up to three dimensions [9]. The RBF-QR methods can be employed for approximations over thousands of nodes.In [9], we gave examples of convergence and performance results in the case of i...