The Christmas tree above has a top which is an isosceles triangle, and a square trunk. The five line segments at the bottom of the tree are all of length . The tree's area is the area of the top (green) plus the area of the bottom (brown).
If the outer perimeter of the tree (thick black line) has length , what value of maximizes the tree's area?
Details and Assumptions:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Greetings and best wishes to you these holidays!
Let the height of the green isosceles triangle be h . Then the perimeter is:
P = 5 x + 2 ( x + 2 x ) 2 + h 2 ⟹ P = 5 x + 9 x 2 + 4 h 2
The area of the triangle is:
A = x 2 + 2 3 x h
Method 1: Given that the perimeter is the constraint, the cost function, with the introduction of a Lagrange multiplier can be formulated as such:
L = A + λ ( P − 1 0 0 )
To be more rigorous, two more Lagrange multipliers are to be introduced to account for the inequality constraints ( 0 < x < 1 2 . 5 ) . This has however not be done. The solution to the equality constrained minimisation problem which is accepted is the one satisfying the inequality constraints. Now, Partial derivatives are computed and are equated to zero:
∂ x ∂ F = 0 ⟹ 2 3 h + 2 x + λ ( 4 h 2 + 9 x 2 9 x + 5 ) = 0 ∂ h ∂ F = 0 ⟹ 2 3 x + 4 h 2 + 9 x 2 4 λ h = 0 ∂ λ ∂ F = 0 ⟹ 5 x + 4 h 2 + 9 x 2 − 1 0 0 = 0
This set of non-linear equations can be solved numerically using a technique like Newton-Raphson and the solution satisfying the constraint is x = 9 . 2 4 8 . A second derivative test would be needed to confirm a maximum.
Method 2:
The constraint equation is based on the perimeter which is:
5 x + 2 ( x + 2 x ) 2 + h 2 = 1 0 0 ⟹ h = 2 ( 1 0 0 − 5 x ) 2 − 9 x 2 ; h > 0
The area is:
A = x 2 + 2 3 x h ⟹ A = x 2 + 4 3 x ( 1 0 0 − 5 x ) 2 − 9 x 2
This is a single variable optimization problem that can be solved using standard techniques. I choose to plot this function in the specified range of 0 < x < 1 2 . 5 .
This 'brute force' approach quickly yields the answer without having to compute derivatives and solve nonlinear equations.