This GeoGebra applet presents interactive demonstration of tree planting problem, where the yield per tree in a fixed acreage of land is given to decrease with the number of additional trees. The objective is to find the number of trees fro maximum yield. A similar problem would be the Theater revenue problem where the number of customers coming to see movie decreases with increase in ticket price.
Instructions are given on the applet itself. Solution of the problem is provided using four steps.
For more on optimization technique check my online book
"Flipped Classroom Calculus of Single Variable"
https://versal.com/learn/vh45au/