Changing the smoothness of density function

Great illustration of this concept! The density plot fails at the boundaries.