Hi this is Presh Talwalkar.
In this video we're going to discuss a math puzzler about optimizing the area that a fence encloses.
So imagine you have 100 units of fencing.
We'll think about this as wire fencing and draw it as a straight line.
The puzzle is:
How can you box off the largest area possible that's next to a river.
So specifically, you want to enclose an area, which is 3 sides of a rectangle,
and what's between that and the river should be the largest area possible.
So one way you could divide up the 100 units of fencing is to have 10 for the length and 80 for the width
and that'll give you an area of 800.
So the puzzle is to box off the largest area possible.
Give it a try, and when you're ready you can keep watching for the solution.
Alright, so the elegant solution will be using geometry, but I'm going to present the calculus solution first.
So the geometry of the situation involves a rectangle of which one side is the river,
and we have two sides that are the length, and one side which is the width.
So we want to maximize the area which is the length times the width.
The amount of fencing will be 2 times L, plus W and that needs to be equal to 100.
So we can rearrange that equation to say the width of the fence has to be 100 minus 2 L.
Substituting that into our area formula, we have the area is 100 L minus 2 L squared.
We can optimize the area as a function of L by taking the derivative with respect to L and setting that equal to 0.
So we get 100 minus 4 L equals 0.
We'll solve this for L equals 25 and then we'll solve the W as equal to 100 minus 2 L, which is 50.
So the largest area we can enclose is 25 times 50 which is 1250
So this is a very good and standard way to solve the problem,
but now I'm going to show you a more creative way.
The elegant solution requires a little more in terms of logic but it's definitely worth knowing.
So let's think about instead of having the river, let's just thing about a rectangle,
and we want to solve the problem: what's the largest rectangle for a given perimeter.
The perimeter of a rectangle is 2 times the length plus 2 times the width,
and the area is the length times the width.
So here's our solution: We're going to imagine drawing a square,
where the 2 sides are equal so we take a little bit from the longer side and we add that to the shorter side so the two sides are equal.
Now, because we've removed the same distance from one side that we've added to the other, the perimeter is the same
But now when you look at the area,
you're going to gain this large rectangle and you might lose that other rectangle.
So the area is actually larger by a factor of X squared.
So what this shows is that the square is actually the largest rectangle you can have for a given perimeter.
Because if you have a rectangle that's not a square, you can always make it a square,
and that will be the largest area you can have.
Alright, so how does that information help us solve the original problem?
What we'll do is we'll imagine flipping a mirror image of this boxed off area over to the other side of the river,
because if we optimize the side on one side of the river, we must optimize the sum over both sides that's reflected.
So this rectangle has a width of W, and a length of 2 L.
In order to box off the largest area, this figure must be a square so the width has to be equal to 2 times the length.
And we know the perimeter is 2 L plus W equals 100.
So we can easily solve that the length is equal to 25 and the width is 50, so the area is 1250.
So that's the geometric solution and it's quite elegant.
Did you solve the puzzle?
I hope you liked this video. Please subscribe to my channel.
You can support me on patreon for exclusive rewards,
catch me on my blog: MindYourDecisions,
on twitter @preshtalwalkar, and you can get my books, listed on my website.