Step 1 :Let the length of the enclosure be \(l\) and the width be \(w\). We have the equation \(lw=45000\). We want to minimize the cost of this rectangular fence, which is given by \(4l+8w\). From our equation, we know that \(l=45000/w\). Substituting this into our expression for cost, we have \[(4(45000/w)+8w)=180000/w+8w\]
Step 2 :We will now find the minimum value of this expression. Taking the derivative of the cost function with respect to \(w\), we get \[-180000/w^2+8\]. Setting this equal to zero and solving for \(w\), we get \[w^2=22500\] or \[w=150\].
Step 3 :Substituting \(w=150\) back into the equation \(lw=45000\), we get \[l=45000/150=300\].
Step 4 :Hence, the cost of the least expensive fence is \(4l+8w=4*300+8*150=\boxed{2400}\) dollars.