I think you can't solve the steps 2 and 3, right? Well, step 2 has a proposed method, that I recommend you to take a look on it. To solve the step 3, I suggest you to find a solution to that integral using Matlab Symbolic toolbox or using another software, as Mathcad. Then apply the found solution to your matlab script.