If the strip of metal 50 cm wide is bent symmetrically so that the side walls of the (open) trough are x cm high, then the width w of the trough is (50 - 2.x) cm and the cross-sectional area A is given by
A = x.(50 - 2.x) = 50.x - 2.x²
To determine the optimum value of x, differentiate this equation and set the result to zero ie
50 - 4.x = 0, or x = 12.5cm
The base is (50 - 2 x 12.5) = 25 cm, so the optimum cross-sectional area is 12.5 x 25 = 312.5 cm².
This procedure can be used for much more complicated situations, where the relationship is not so self-evident.