Ch probs 5,6,7,8,9 Do No. 9 using a mathlab sumulation