The rain gutter is to be created with a sheet with a width 3w by bending up to one third of the sheet on each side through an angle `theta` .
To determine the optimum angle `theta` that maximizes the volume of water, the problem can be considered to be one where a sheet of length 3w has to be bent on either side by an angle `theta` and the area of the resulting open figure is maximum.
When the sheet is bent the resulting figure consists of a rectangle between two triangles. The dimension of the rectangle is w*w*sin `theta` . The area of each triangle is (1/2)*w*sin (`90 - theta`) *w*cos(90 -` theta`) .
Adding the three the total area is A = w^2*sin `theta` + w^2*sin(90- `theta` )*cos (90-`theta` )
=> A = w^2*sin `theta` + w^2*cos `theta` *sin `theta`
To maximize area solve `(dA)/(d theta ) = w^2(sin theta + -sin^2 theta + cos^2 theta )` = 0
`w^2(cos theta + cos^2 theta - 1 + cos^2 theta ) = 0`
=> `2*cos^2 theta + cos theta - 1 = 0`
=> `2*cos^2 theta + 2*cos theta - cos theta - 1 = 0`
=> `2*cos theta(cos theta + 1) - 1(cos theta + 1) = 0`
=> `cos theta = 1/2` and `cos theta = -1`
=> `theta` = 60 degrees and `theta` = 180 degrees
The angle cannot be 180 degrees.
The required angle `theta` by which the sheet should be bent is equal to 60 degrees.