# Maximize area of rectangle inside a triangle

Find the maximum area of a rectangle that is inside of the triangle forms by the x-axis and the lines y=-3x+12 and y=3x+12. The base of the triangle is on the x-axis and the two upper verticies are on the lines y=-3x+12 and y=3x+12.

With this question. Obviously the are of the rectangle is lw or xy... I have figured out that x = (8-2x) and y=(12-y). Im not sure of the next step.. Could someone help?

• If you really have $x=8-2x$ and $y=12-y$ then you have $x=8/3$ and $y=6$, but where did you get those two equations? – Gerry Myerson Nov 29 '17 at 2:44
• Are you still here? – Gerry Myerson Nov 30 '17 at 22:32

Let $w$ be the width of the rectangle along the $x$ axis. Clearly the bottom is symmetric with respect to the origin. What is the height of the rectangle in terms of $w$? What is the area in terms of $w$? Take the derivative, set to zero...