Hence, we can use a simple harmonic oscillator potential to test the accuracy of Wang–Landau algorithm because we know already the analytic form of the density of states. Therefore, we compare the estimated density of states ρ ρ ^ ^ ( E ) obtained by the Wang–Landau algorithm with ρ ρ ( E ) .