For question (a), we begin with the form from Exercise 4.6.:
By the Bayes rule:
So we only need to compute:
This can be done by completing the square inside
w.r.t.
:
Now we are ready to perform the integrating:
where
Finally,
For question (b), we can further simplify the numerator of
into: