Given the function y how do I implement the histogram desity function so that I get the imgae "b" if i pass the [ai , ai+1] to be [0.25 0.5] and [bi , bi+1] to b