A mining company ha 10 000 m of fencing available.It wants to use a fencing to enclose a rectangular field. one side of the field is bordered by a river.If no fencing is placed on the side next to the river, What is the largest area that can be enclosed?

I suppose I am not allowed to use calculus and must complete the square :(

A = L w

10,000 = L + 2 w so L = 10,000-2w
A = (10,000-2w) w

2 w^2 -10,000 w = - A

w^2 - 5,000 w = -A/2

w^2 - 5000 w + 2500^2 = -A/2 + 2500^2

(w-2500)^2 = -(1/2)(A- 2*2500^2)

vertex at w = 2500
then L = 5000