Virginia is designing a rectangular garden. The garden's length must be \(4\) meters less than three times the width, and its perimeter must be \(40\) meters. Find the garden's length and width.

Reminder: A rectangle's perimeter formula is \(P=2(L+W)\text{,}\) where \(P\) stands for perimeter, \(L\) stands for length and \(W\) stands for width.

Assume the rectangle's width is \(W\) meters. We can then represent the length as \(3W-4\) meters since we are told that it is \(4\) meters less than three times the width. It's given that the perimeter is \(40\) meters. Substituting those values into the formula, we have:

\begin{align*} P\amp=2(L+W)\\ 40\amp=2(3W-4+W)\\ 40\amp=2(4W-4)\amp\text{Like terms were combined.} \end{align*}

The next step to solve this equation is to remove the parentheses by distribution.

\begin{align*} 40\amp=2(4W-4)\\ 40\amp=8W-8\\ 40\addright{8}\amp=8W-8\addright{8}\\ 48\amp=8W\\ \divideunder{48}{8}\amp=\divideunder{8W}{8}\\ 6\amp=W\text{.} \end{align*}

To check this result, we'll want to replace \(6\) in the equation \(40=2(4W-4)\text{:}\)

\begin{align*} 40\amp=2(4W-4)\\ 40\amp\stackrel{?}{=}2(4(\substitute{6})-4)\\ 40\amp\stackrel{?}{=}2(20)\\ 40\amp\stackrel{\checkmark}{=}40\text{.} \end{align*}

To determine the length, recall that this was represented by \(3W-4\text{,}\) which is:

\begin{align*} 3W-4\amp=3(\substitute{6})-4\\ \amp=14\text{.} \end{align*}

Thus the rectangle's width is \(6\) meters and the length is \(14\) meters.