In the figure below, triangle $ABC$ and rectangle $PQRS$ have the same area and the same height 1. For each value of $x$ between 0 and 1, the trapezoid $ABED$ of height $x$ is drawn, and then the rectangle $PQNM$ of area equal to that of the trapezoid, as shown in the figure. Let $f$ be the function that associates each $x$ with the height of rectangle $PQNM$.

![](https://cdn.mathpix.com/cropped/2024_05_01_c051a4aaadd76ab6970bg-13.jpg?height=303&width=1005&top_left_y=1182&top_left_x=431)

a) What is the ratio between $AB$ and $PQ$?

b) What is the value of $f\left(\frac{1}{2}\right)$?

c) Find the expression for $f(x)$ and draw the graph of $f$.