English

A practical recipe for variable-step finite differences via equidistribution

Numerical Analysis 2025-08-06 v2 Numerical Analysis Computational Physics

Abstract

We describe a short, reproducible workflow for applying finite differences on nonuniform grids determined by a positive weight function g. The grid is obtained by equidistribution, mapping uniform computational coordinates ξ[0,1]\xi\in[0,1] to physical space by the cumulative integral S(x)=ax ⁣1/g(s)dsS(x)=\int_a^x\!1/g(s)\,ds and its inverse, and in multiple dimensions by the corresponding variable-diffusion (harmonic) mapping with tensor P=(1/g)IP=(1/g)I. We then use the standard three-point central stencils on uneven spacing for first and second derivatives. We collect the formulas, state the mild constraints on g (positivity, boundedness, integrability), and provide a small reference implementation. Finally, we solve the 2D time-independent Schr\"odinger equation for a harmonic oscillator on uniform vs. variable meshes, showing the expected improvement in resolving localized eigenfunctions without increasing matrix size. We intend this note as a how-to reference rather than a new method, consolidating widely used ideas into a single, ready-to-use recipe, claiming no novelty.

Keywords

Cite

@article{arxiv.2412.05598,
  title  = {A practical recipe for variable-step finite differences via equidistribution},
  author = {Mário B. Amaro},
  journal= {arXiv preprint arXiv:2412.05598},
  year   = {2025}
}

Comments

6 pages, 2 figures

R2 v1 2026-06-28T20:26:30.511Z