Artificial intelligent assistant

Maximizing the area of rectangle inscribed in triangle I'd like to ask if someone could help me out with this problem. Let's have a triangle with coordinates $[0,0],[4,0],[1,3]$. Inscribe a rectangle into this triangle, so its area is maximized The base of rectangle lays on axis $x$. I know how to proceed if it's a right triangle, but don't know how to proceed now.

I assume that you want that the corners of the rectangle be along the sides of the triangles.

The equations of the lines which define the triangle are y = 3 x and y = 4 - x.

Now, let use define four points (x1,0), (x1,y1), (x2,0) and (x2,y2) which will define the rectangle. Since it is a rectangle, y2 = y1. Now, use the equations y1 = 3 x1 and y2 = 4 - x2; since y1 = y2, then 3 x1 = 4 - x2 which can reduce to x2 = 4 - 3 x1.

The area of the rectangle is defined by Area = (x2 - x1) y2 that is to say
Area = (4 - 4 x1) (3 x1) = 12 (1 - x1) x1.

You want this area to be maximized. Compute the derivative of the area with respect to x1 and set it to zero. This will give you the value of x1; from it, x2 = 4 - 3 x1, y = 3 x1 ...

I am sure you can take from here.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cbd39b4296e06ac30613c2c1e40820ca