Question 957901
 L=length=parallel to wall; W=width= perpendicular to wall
Available length=32ft rail + 4ft gap=36ft
L=36ft-2W
Area=LW={{{(36ft-2W)(W)=36W-2W^2}}}
This is a parabola: the maximum value will be at its vertex, which is where slope=0. The slope of a function is the first derivative, so:
dA=36-4W and we want the value where slope is 0: 
36-4W=0
-4W=-36
W=9 The width will be 9 feet
L=36ft-2(W)=36ft-18 ft=18ft The length is 18 feet.
ANSWER 1: The dimensions for maximum area are 18 feet by 9 feet and the area is
A=LW
A=(18ft)(9ft)
A=162 square feet ANSWER 2: The maximum area is 162 square feet.
If this is not a calculus question, see Question 7782 for an alternative method.
NOTE: The gap in the railing does not change the area of the deck.