Calculating density function and checking by evaluating cauchy integral.