For problems 1-5, see
solutions
.