A toolshed with a square base and a flat roof is to have a volume of 800 cubic feet. If the floor costs $6 per square foot, the roof $2 per square foot, and the sides $5 per square foot, determine the dimensions of the least expensive shed.

x^2y = 800

y = 800/x^2

c = 6*x^2 + 2*x^2 + 5*4*xy
= 8x^2 + 1600/x
dc/dx = 16x - 1600/x^2 = 16(x^3-100)/x^2
dc/dx=0 at x=∛100

so, the shed is ∛100 x ∛100 x 8∛100

To determine the dimensions of the least expensive shed, we need to minimize the cost of constructing it.

Let's assume that the length, width, and height of the shed are L, L, and H, respectively.

Volume of the shed = Length * Width * Height
800 = L^2 * H

We need to minimize the cost, which is the sum of the cost of the floor, roof, and sides.

Cost = Cost of floor + Cost of roof + Cost of sides

Cost of floor = Length * Width * Cost per square foot of the floor
Cost of floor = L^2 * 6

Cost of roof = Length * Width * Cost per square foot of the roof
Cost of roof = L^2 * 2

Cost of sides = 4 * (Length * Height + Width * Height) * Cost per square foot of the sides
Cost of sides = 4 * (2LH) * 5
Cost of sides = 40LH

Total Cost = L^2 * 6 + L^2 * 2 + 40LH

Now, we want to find the dimensions (L, H) that will minimize the Total Cost. Let's differentiate the Total Cost with respect to L and H and find the critical points.

d(Total Cost) / dL = 12L + 40H = 0 ---- (1)
d(Total Cost) / dH = 40L = 0 ---- (2)

From equation (2), we get L = 0.
However, since we are dealing with physical dimensions, L cannot be zero.

So, from equation (1), we have 12L + 40H = 0
12L = -40H
L = -40H /12
L = -10H / 3 ---- (3)

Substituting equation (3) into the equation of Volume, we have:
800 = L^2 * H
800 = (-10H / 3)^2 * H
800 = (100H^2 / 9) * H
Multiplying both sides by 9 to get rid of the fraction:
7200 = 100H^3
H^3 = 72
H = ∛72
H ≈ 4.16

Substituting the value of H into equation (3):
L = (-10 * 4.16) / 3
L ≈ -13.86 / 3
L ≈ -4.62

Since dimensions cannot be negative, we discard the negative values. Therefore, L ≈ 4.62 and H ≈ 4.16.

Therefore, the dimensions of the least expensive shed are approximately 4.62 feet by 4.62 feet by 4.16 feet.