Fixed the solution to Problem 3 by increasing the precision of calculations.