Find the area of the largest rectangle that can be inscribed in a right triangle with legs of lengths 8 cm and 9 cm if two sides of the rectangle lie along the legs.
Draw a picture. Draw one leg, say the 9cm leg, of the right triangle horizontal and one leg vertical. If the height of the rectangle is x then the little right triangle above the rectangle has height 9- x. If the width of the rectangle is y, then the width of that little triangle is y. That little triangle is similar to the entire right triangle so $\displaystyle \frac{9-x}{y}= \frac{9}{8}$. Use that to get y as a function of x. Now you can write the area of the rectangle, xy, as a function of x alone.