Solutions for problems 2 and 8.