# generating a non-uniform grid with Chebyshev discretization

I often see that it is common to put "more points" in the region of interest in the computational domain of the numerical method, i.e. use non-uniform grid. The proofs are usually done for the uniform grid though and then using some arguments like "the proof can be extended to non-uniform grid as well" the results show good errors obtained. Ok, even if the theory behind non-uniform grid is the same, I was thinking how to generate those non-uniform grids and I did not find that many articles. The simplest way, perhaps, is to use some sort of "generating" function, something like a cubic polynomial that does create a desired non-uniformity controlled by the polynomial coefficients. However, there are spectral methods such as Chebyshev discretization(I don't know much about) that can also be utilized. Thus, I wonder if there is any advantage of using it over a cubic function mapping? In either case I would approximate derivatives as on a non-uniform grid so the local error of the first and second derivative would be bounded by $O((\max_{i\in I}\{x_{i+1}-x_i\})^2)$.

-

The main use for Chebyshev points is with a (pseudo)spectral method. The Chebyshev points are good ("optimal") for $L^\infty$ approximation and derivatives can be evaluated in $O(n \log n)$ by FFT. If you are going to use a compact spatial discretization (such as FD, FV, or FE) then there is no advantage to Chebyshev points unless the "interesting" regions just happen to coincide.