It is known well that zero-variance Monte Carlo solutions are possible if an exact importance function is available to bias the random walks. Monte Carlo can be used to estimate the importance function. This estimated importance function then can be used to bias a subsequent Monte Carlo calculation that estimates an even better importance function; this iterative process is called adaptive importance sampling.

To obtain the importance function, one can expand the importance function in a basis such as the Legendre polynomials and make Monte Carlo estimates of the expansion coefficients. For simple problems, Legendre expansions of order 10 to 15 are able to represent the importance function well enough to reduce the error geometrically by ten orders of magnitude or more. The more complicated problems are addressed in which the importance function cannot be represented well by Legendre expansions of order 10 to 15. In particular, a problem with a cross-section notch and a problem with a discontinuous cross section are considered.