Let x denote the length of the side of the garden which is covered fenced by a shed, and

be the width of the garden.
The perimeter of a rectangle is given by 2(length + width).
Given that on of the sides is to be covered by the side of a shed, the the perimeter of the remaining three sides to be fenced is given by
which gives:

For the area to be maximum, the differentiation of A with respect to x must be equal to 0.
i.e.

Therefore, the maximum area of the garden enclosed is given by
