I recently thought of a crazy sampling scheme, which has almost certainly been thought of by someone else before. I'm interested to find out what it is called, and if it is ever useful.
The idea is as follows: to sample from a smooth 1D probability distribution on interval $[a,b]$ with density $p$ (and derivative $p'$), we pick a uniform random number $y \in [0,1]$, then numerically solve for the place where the cumulative distribution function equals $y$, using Newton's method and numerical integration.
Ie., given $$f(x) := y - CDF(x) = y - \int_a^x p(s)ds,$$ with derivative $$f'(x) = -p(x) - \int_a^x p'(s) ds,$$ we solve $f(x)=0$ by iterating, $$x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)},$$ and simple halving backtracking to ensure convergence if the initial guess is not in the radius of convergence. The integrals are approximated to the desired accuracy with quadrature that is good for integrating smooth functions (eg., Gaussian quadrature).
What is this called? Are there ever situations where this could be better than other standard sampling methods?