# Minimizing a functional of two functions with three boundary conditions

What are the natural boundary conditions for the following calculus of variations problem: Minimize: $$J[y] = \int_0^b (1+(y_1')^2 + (y_2')^2)) \,dx$$ subject to the boundary conditions $$y_1(0) = 0 = y_2(0)$$ and $$b + y_1(b) − y_2(b) = 1.$$

So I used Euler-Lagrange Equations to get a system of two equations. I get $y_1'' = 0$ and $y_2'' = 0$ so $y_1 = Ax + B$ and $y_2 = Cx + D$ Using first two boundary conditions I get $y_1 = Ax$ and $y_2 = Cx$ using the third condition I get $b + Ab - Cb = 1$ and I do not know where to go from here.

The boundary conditions allow more room than usual, since there are only three of them instead of four that one would normally have (a system of 2 ODE of 2nd order). So, the space of solutions of the ODE system is 1-dimensional: $$y_1=Ax, \quad y_2=Cx,\quad 1+A-C=0$$ We can still minimize within this 1-dimensional space: $$J[y]= b(1+A^2+C^2)$$ Since $C=A+1$, the minimum is at $A=-1/2$, $C=1/2$.
We are given the following 3 essential/Dirichlet boundary conditions (BCs) $$y_1(0)~=~0~=~y_2(0), \qquad y_1(b)-y_2(b)~=~1-b.\tag{1}$$ That is 1 BC short of a well-posed variational problem.
If we vary infinitesimally OP's functional $$J[y]~:=~b+ \int_0^b\! dx~ \sum_{i=1}^2 y^{\prime}_i(x)^2,\tag{2}$$ while paying attention to boundary contributions. The infinitesimal variations $\delta y_i$ must obey the BCs (1), i.e. $$\delta y_1(0)~=~0~=~\delta y_2(0), \qquad \delta y_1(b)~=~\delta y_2(b).\tag{3}$$ We find $$\delta J[y]~\stackrel{(2)}{=}~ 2\int_0^b\! dx~ \sum_{i=1}^2y^{\prime}_i(x) ~\delta y^{\prime}_i(x)$$ $$~\stackrel{\text{int. by parts}}{=}~ \sum_{i=1}^2\left( y^{\prime}_i(b)~\delta y_i(b)-y^{\prime}_i(0)~\delta y_i(0) - 2\int_0^b\! dx~ y^{\prime\prime}_i(x) ~\delta y_i(x)\right)$$ $$~\stackrel{(3)}{=}~ \underbrace{(y^{\prime}_1(b)+y^{\prime}_2(b))}_{\text{natural BC}}~ \underbrace{\delta y_1(b)}_{\text{essential BC}} - 2\int_0^b\! dx~\sum_{i=1}^2 \underbrace{y^{\prime\prime}_i(x)}_{\text{EL eqs.}} ~\delta y_i(x).\tag{4}$$
The above should vanish at a stationary point. To have a well-posed variational problem, we must impose one more essential or natural BC. Any other BC would make the variational problem (2) ill-posed. We read of from eq. (4) that the natural BC is $$y^{\prime}_1(b)+y^{\prime}_2(b)~=~0 ,\tag{5}$$ which is OP's main question.