Add solution for problem 8. Update tex doc