I had some trouble trying to come up with a solution. Consider this
$$\int_{0}^{4}\sqrt{1+(y')^2}dx=16$$ you want to find $y$ to maximize this integral $$\int_0^4ydx$$
with $y(4)=y(0)=0$.
What I did is plug both in the euler lagrange equation to get $$\lambda \frac{d}{dx}\frac{y'}{\sqrt{1+(y')^2}}=1$$ Which is a simple differential equation that'll get you the answer of $$y=\sqrt{4-(2-x)^2}.$$ However this has an arclength of $$2\pi$$ which is less than 16 and thereby not my desired solution. Any suggestions in getting a $y(x)$ that can satisfy the arclength of 16 and $y(4)=y(0)=0$ will be appreciated.