A rectangle has a length that is 4 units longer than its width. The perimeter of the rectangle is 40 units. What is the width of the rectangle?
Let the width of the rectangle be denoted as $w$. Therefore, the length can be expressed as $w + 4$. The formula for the perimeter $P$ of a rectangle is given by:
$P = 2(length + width)$
Using this information, set up the equation to find the value of $w$.