# Optimization: area of triangle & square (Part 1)

## Video transcript

Let's say that I have
a 100 meter long wire. So that is my wire
right over there. And it is 100 meters. And I'm going to make a
cut someplace on this wire. And so let's say I make
the cut right over there. With the left
section of wire-- I'm going to obviously cut it in
two-- with the left section, I'm going to construct
an equilateral triangle. And with the right section, I'm
going to construct a square. And my question
for you and for me is, where do we make
this cut in order to minimize the combined
areas of this triangle and this square? Well, let's figure out. Let's define a variable that
we're trying to minimize, or that we're trying to
optimize with respect to. So let's say that the variable
x is the number of meters that we decide to
cut from the left. So if we did that, then
this length for the triangle would be x meters, and
the length for the square would be, well, if we use x
up for the left hand side, we're going to have 100 minus
x for the right hand side. And so what would the dimensions
of the triangle and the square be? Well, the triangle sides are
going to be x over 3, x over 3, and x over 3 as an
equilateral triangle. And the square is going
to be 100 minus x over 4 by 100 minus x over 4. Now it's easy to figure
out an expression for the area of the
square in terms of x. But let's think about what the
area of an equilateral triangle might be as a function of
the length of its sides. So let me do a little bit
of an aside right over here. So let's say we have an
equilateral triangle. Just like that. And its sides are
length s, s, and s. Now we know that the
area of a triangle is 1/2 times the base
times the height. So in this case,
the height we could consider to be altitude, if we
were to drop an altitude just like this. This length right over
here, this is the height. And this would be
perpendicular, just like that. So our area is going to be equal
to one half times our base is s. 1/2 times s times whatever our
height is, times our height. Now how can we express
h as a function of s? Well, to do that we just
have to remind ourselves that what we've drawn over
here is a right triangle. It's the left half of
this equilateral triangle. And we know what this bottom
side of this right triangle is. This altitude splits this
side exactly into two. So this right over here
has length s over 2. So to figure out what
h is, we could just use the Pythagorean theorem. We would have h squared
plus s over 2 squared plus s over 2 squared is going to
be equal to the hypotenuse squared, is going to
be equal to s squared. So you would get h squared
plus s squared over 4 is equal to s squared. Subtract s squared
over 4 from both sides, and you get h squared is equal s
squared minus s squared over 4. Now, to do this I could
call it s squared. I could call this
4s squared over 4, just to be able to have
a common denominator. And 4s squared minus
s squared over 4 is going to be equal
to 3s squared over 4. So we get h squared is
equal to 3s squared over 4. Now we can take the
principal root of both sides, and we get h is equal
to the square root of 3 times s over 2. So now we can just substitute
back right over here and we get our area. Our area is equal
to 1/2 s times h. Well h is this business. So it's s times this. So it's 1/2 times s times the
square root of 3s over 2, which is going to be equal to
s times s is s squared. So this is going to
be square root of 3 s squared over 2 times 2 over 4. So this is the area of
an equilateral triangle as the function of the
length of its sides. So what's the area of
this business going to be? So the area of our little
equilateral triangle-- let me write a combined area. And let me do that
in a neutral color. So let me do that in white. So the combined
area, I'll write it A sub c is going to be equal
to the area of my triangle A sub t plus the
area of my square. Well, the area of my triangle,
we know what it's going to be. It's going to be square
root of 3 times the length of a side squared divided by 4. So it's going to be
square root of 3. Let me do that in that
same yellow color. It's going to be-- make
sure I switch colors. It's going to be square root of
3 over 4 times a side squared, times x over 3 squared. All I did is the length
of a side is x over 3. We already know
what the area is. It's the square root of
3 over 4 times the length of a side squared. And then the area
of this square right over here, the
area of the square is just going to be 100
minus x over 4 squared. So our area, our combined
area-- and maybe I can write it like
this-- our combined area as a function of where we make
the cut is all of this business right over here. And this is what we
need to minimize. So we need to minimize
that right over there. And I will do that
in the next video.