In this paper, we propose a new methodology for numerically solving elliptic and parabolic equations with discontinuous coefficients and singular source terms. This new scheme is obtained by clubbing a recently developed higher-order compact methodology with special interface treatment for the points just next to the points of discontinuity. The overall order of accuracy of the scheme is at least second. We first formulate the scheme for one-dimensional (1D) problems and then extend it directly to two-dimensional (2D) problems in polar coordinates. In the process, we also perform convergence and related analysis for both the cases. Finally, we show a new direction of implementing the methodology to 2D problems in cartesian coordinates. We then conduct numerous numerical studies on a number of problems, both for 1D and 2D cases, including the flow past circular cylinder governed by the incompressible Navier–Stokes equations. We compare our results with existing numerical and experimental results. In all the cases, our formulation is found to produce better results on coarser grids. For the circular cylinder problem, the scheme used is seen to capture all the flow characteristics including the famous von K{\'{a}}rm{\'{a}}n vortex street. Copyright {\textcopyright} 2016 John Wiley & Sons, Ltd.