Area = x.y
y = 200 - 2x Now substitute for y in Area;
A = x(200 - 2x) Expand brackets A = 200x - 2x²
Differentiating A wrt x
dA/dx = 200 - 4x
At a maxima or minima dA/dx = 0
Therefore 0 = 200 - 4x
Clearly x = 50 metres
Since the fence is 200 metres long, the y dimension = 100 metres
A = x.y = 50.100 = 5000 m²
Proof (Pierre de Fermat?);
Differentiating wrt x the first derivative
dA/dx = 200 - 4x yields
d²A/dx² = -4
Since the second derivative is Negative, it concludes the occurence of x=50 is a maxima.
https://ibb.co/6HwYqjQ