I need some help with this optimization problem:

Find the area of the largest rectangle that can be inscribed in a right triangle with legs of lengths 3 cm and 4 cm if two side of the rectangle lie along the legs.

There's a 6 step process I have to follow:

1. Draw diagram

2. Introduce notation

3. Express problem in one variable

4. Identify critical points and endpoints.

5. Find abs. max and min for function by finding the function values at the critical points and endpoints. Interpret the solution

So here's what I have so far.

1. I drew a picture

2.x = width of rectangle, y= width of rectangle

Area of Triangle can be calculated by adding the area of the rectangle to the area of the two smaller triangles that are created.

a= xy + 1/2(3-x)(y) + 1/2(4-y)(x)

Now I think I may have simplified the problem wrong when I got to this point which may be why I got the entire thing wrong.

I want to solve for x so I can express the area of the rectangle in terms of y.