Let x denote the length of the side of the garden which is covered fenced by a shed, and [tex] \frac{A}{x} [/tex] 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
[tex]x+ 2\left( \frac{A}{x} \right)=84[/tex]
which gives:
[tex]2A=84x-x^2 \\ A=42x- \frac{1}{2} x^2[/tex]
For the area to be maximum, the differentiation of A with respect to x must be equal to 0.
i.e. [tex] \frac{dA}{dx} =42-x=0 \\ x=42[/tex]
Therefore, the maximum area of the garden enclosed is given by
[tex]A_{max}=42(42)- \frac{1}{2} (42)^2= \frac{1}{2} (1764)=882 \, yd^2.[/tex]