First attempt to solve the section 5.12

first attempt to solve section 5.12 and related problems