CS 301 — Problem Set 4Alex Chen
Problem 1. Prove that the sum of the first n odd numbers is n².
Solution. By induction. Base case n=1: 1 = 1². Assume Σ(2i−1) = k². Then Σ = k² + (2k+1) = (k+1)². ∎
Problem 2. Compute ∫₀¹ x² dx.
Solution. ∫₀¹ x² dx = [x³/3]₀¹ = 1/3.