I have a solution to the problem below from my course materials, but I cannot understand where I went wrong with my own attempt at a solution. Any advice much appreciated.

Problem: Given a right triangle with one non-hypotenuse side BC at 10 inches, and the other non-hypotenuse side AC at 8 inches we need to find out the exact area of the largest rectangle (by area) that can be constructed within the triangle, such that one edge of the triangle is at the point C.

square within triangle

Solution Attempt:

I define the base of my rectangle to be CM where M is a point on the line segment AC.
|CM| = 8 - b

So now let us define the height. We select a point N on the line segment BC and the height will be |CN|. The length of NB is defined as a, and thus the height of the triangle, |CN| will be 10 - a.

Next I will try to define the area in terms of b. Since the smaller b is the larger the rectangle is, I will find a function for area in terms of b, then take first derivative, set to zero and solve.

Area as a function of b:

BC/AC = 10/8 = 5/4 = |CN|/|CM|, so, to find what a is in terms of b, we do this:

10-a/(8-b) = 5/4

40 - 5b = 40 - 4a

5b = 4a

a = 5/4*b

Area of rectangle = |CM| * |CN|

A(b) = (8-b) (10 - a)

A(b) = (8-b) * (10 - (5/4)*b )

A(b) = 80 - 20b + 5/4*b^2

Calculating first derivative:

A'(b) = 5/2*b - 20

Setting to zero gives me b = 8. If b = 8 then the area of my rectangle is zero, which does not seem to be the max achievable size. I am wondering what went wrong. Thanks!

  • 1
    $\begingroup$ Others have pointed out your mistake. When working geometrically, I try to visualize the pieces sliding around. Then as $b$ gets small (or large), you may have noticed that $a$ moves the other direction and gets large (or small). $\endgroup$
    – Teepeemm
    Commented Jun 18 at 0:59

2 Answers 2


There is no reason why $\frac{CN}{CM}$ has to be $\frac{5}{4}$.

It should have been $\frac{10-a}{b}=\frac54$.




Hence the optional $b$ is at $b=4$.

  • 1
    $\begingroup$ Oh.. wow.. simple geometry mistake got me. thanks. much appreciated. $\endgroup$ Commented Jun 17 at 18:46

Set up a coordinate system with $A = (0, 0)$, $B = (8, 10)$, and $C = (8, 0)$. Then the hypotenuse $AB$ is along the line $y = \frac{5}{4}x$.

Let $D = (b, \frac{5}{4}b)$ be the point on $AB$ that forms the top left corner of the rectangle. Then the rectangle's area $R$ is:

$$R = (8 - b)(\frac{5}{4}b) = 10b - \frac{5}{4}b^2$$

Setting $R'(b) = 0$ gives $10 - \frac{5}{2}b = 0$, from which $b = 4$, and thus $R = 20$.

Your mistake was figuring the height of the rectangle to be $10 - \frac{5}{4}b$ instead of $\frac{5}{4}b$.

  • $\begingroup$ thanks.. that was the answer in the book too ! appreciated $\endgroup$ Commented Jun 17 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .