Ramin M. answered 04/09/20
Data Science Professional with Math and Coding Skills
Convince yourself that a rectangular area with 3 fenced spaces will have the following constraint equation:
Constraint equation: 4x + 2y = 1000
Optimization equation: xy = A
Goal: maximize A (think Calculus, think derivatives)
In order for us to take a derivative, we need to get the optimization equation in terms of a single variable. So, let's take our constraint equation and solve for y.
4x + 2y = 1000 ==> 2y = 1000 - 4x ==> y = 500 - 2x
Note: ==> stands for "implies".
Now, let's go to our optimization equation and substitute y with 500 - 2x. When we do, we get:
x(500 - 2x) = A ==> 500x - 2x^2 = A
Let's now take a derivative:
A' = 500 - 4x
Now, an important step: we need to set the equation to 0.
0 = 500 - 4x ==> 500 = 4x ==> x = 125
Now that we know x, let's calculate y by going to our constraint equation:
4 * 125 + 2y = 1000 ==> 500 + 2y = 1000 ==> 2y = 500 ==> y = 250
And now that we know x and y, we can calculate the maximum area
A = xy = 125 * 250 = 31250 sq.ft.