I'm reading Computer Science Distilled, and I came across this question pretty early on into the book:
Your farm has two types of livestock. You have 100 units of barbed wire to make a rectangular fence for the animals, with a straight division for separating them. How do you frame the fence in order to maximize the pasture’s area?
Can someone run me through how to solve this problem ELI5? I have the briefest of backgrounds with math, and just sort of need to understand what I don't here. (Will be sure to review algebra moving forward)
In the finished fenced pasture there will be three "vertical" fences each of length $x$ and two "horizontal" fences each of length $(100-3x)/2$:
Then we want to maximise the area $x(100-3x)/2$, so we set its derivative to zero: $$\frac d{dx}\frac12(100-3x^2)=\frac12(100-6x)=0\implies x=\frac{50}3$$ And then you can take it from there.