Set t = 0 to find the initial height
<span>Denote x as the interval, then:
186 = 50 + 3 + (3+x) + (3+2x) + (3+3x) + (3+4x) + (3+5x) + (3+6x) + (3+7x)
186 = 74 + 28x
x = 4
Age of the eldest son = 3+7x = 3+28 = 31.</span>
Take note of the image below
the riverbank requires no fencing due to the river's presence
so the pen's perimeter can be calculated as 2w + l, or w + w + l
thus

derive P(w), set it to zero, locate any critical points, and perform a first-derivative test for minimum values.