Garden Fence Example

This is an example of the solution of constrained optimization using Alglib.js

Let \(x\) denote the length of the side of the garden perpendicular to the rock wall and \(y\) denote the length of the side parallel to the rock wall. Then the area of the garden is \[A = x*y.\] We want to find the maximum possible area subject to the constraint that the total fencing is 100ft . The total amount of fencing used will be \(2x+y\). Therefore, the constraint equation is \[2x+y=100.\]