If the the two end points are $(0,0)$ and $(x\_1, y\_1)$, then $y'(0)=0$ and $y'(x\_1)=0$.
I have no idea how this constraint can be set up while solving the Euler-Lagrange Equation. Also, is there some general method for optimizing functionals with similar single point constraints?