A Rectangle and a Triangle

Based upon the result from the last puzzle, draw any triangle and inscribe the largest possible rectangle. Find the maximum ratio of the area of the rectangle to the area of the triangle.

Source: Original.

Solutions were received from Alan O'Donnell and Philippe Fondanaiche.

Alan's Solution:
Choose the base line to be any edge of the triangle that has angles <= 90deg at each end of it. Choose the upper vertices of the rectangle to be the midpoints of the other 2 edges. Draw an imaginary line from the apex to meet the base perpendicularly. You now have 2 right-angle triangles.
In each of these right-angled triangles, the rectangle is now 1/2 the base length by 1/2 the height. Area of triangle = bh/2. Area of rectangle = bh/4 [b=base length, h=triangle height]
Therefore ratio of rectangle to triangle is 0.5 for all triangles.

Proof that this is the biggest rectangle that can fit in a RA triangle:
Draw a straight line in the xy plane, equation y = mx + c.
The triangle formed has height c (for x=0) and base -c/m (for y=0)
The area of any rectangle inscribed is x(mx+c): A = mx^2 + cx
Differentiate to find a maximum. dA/dx = 2mx+c
This is zero at x = -c/2m [half the base length of -c/m)
y = m(-c/2m)+c = -c/2 + c = c/2 [half the base height of c]

Philippe's Solution:
The maximum of the ratio is 1/2 and does not depend on the shape of the triangle (sides and angles).

Let ABC any triangle which can be defined by:
- side BC = a
- angle(ABC) = alpha
- height AH = h
The area is U=a*h/2 .

As previously demonstrated in the POTW "Rectangle in an equilateral triangle", the rectangle PQRS is the largest possible when 2 vertices are on a side, for example R and S on BC, the third vertex P on AB  and the last one Q on AC.
Let PQ=x and QR=y. The Thales' theorem gives the relation y/h = 1- x/a. Then the area of the rectangle is V=x*y=h*x*(1-x/a). B is maximum for dV/dx=0 ==> x=a/2.
So V=a*h/4 and the ratio  V/U is equal to 1/2 whatever a, alpha and h.
Mail to Ken