Problem 1 Solution fully explained