Difficulty in solving calculus of variation problem. I am having difficulty setting $F(x,y_1,y_2,y_1^{'},y_2^{'})$ of the following question. any help will be appreciated.  
$$v(y_1,y_2)=\displaystyle\int_{0} ^ {1}(y_1+y_2)dx$$   $$\ y_1(0)=y_2(0)=0$$ 
$$ y_1(1)=1 ,\ y_2(1)=-3 $$  $$\displaystyle \int_0^1 y_1{'} y_2{'}dx=0. $$ 
Should I write $F(x,y_1,y_2,y_1^{'},y_2^{'})=y_1+y_2+\lambda_1 \lambda_2y_1{'} y_2{'}?$ 
Answer to the given problem is $$y_1=3x^2-2x , y_2=3x^2-6x $$ $$y_1=-3x^2+4x , y_2=-3x^2  $$
 A: Hints: 


*

*Use the Lagrange multiplier method. Define functional
$$S[y_1,y_2,\lambda] ~:=~ \int_0^1 \! \mathrm{d}x~\{y_1(x)+y_2(x)\} +\lambda  \int_0^1 \! \mathrm{d}x~y_1^{\prime}(x) y_2^{\prime}(x).\tag{1}$$

*The Euler-Lagrange (EL) equations become
$$ \lambda y_i^{\prime\prime}(x)~=~1, \qquad i~\in~\{1,2\}.\tag{2}$$

*Clearly $\lambda\neq 0$. Define the reciprocal $\mu:=\lambda^{-1}$ for later convenience. 

*The solution to EL eqs. (2) with boundary conditions 
$$y_i(0)~=~0, \qquad i~\in~\{1,2\},\tag{3}$$
is
$$y_i(x)~=~\frac{\mu}{2}x^2 + a_i x, \qquad i~\in~\{1,2\},\tag{4}$$
where $a_1$ and $a_2$ are integration constants.

*The remaining boundary condition
$$ y_1(1)~=~1\qquad\text{and}\qquad y_2(1)~=~-3\tag{5} $$
leads to 
$$ a_1~=~1-  \frac{\mu}{2}\qquad\text{and}\qquad a_2~=~-3-  \frac{\mu}{2}.\tag{6}$$ 

*The constraint 
$$0~=~\int_0^1 \! \mathrm{d}x~y_1^{\prime}(x) y_2^{\prime}(x)
~=~\int_0^1 \! \mathrm{d}x~ (\mu x + a_1)(\mu x + a_2)
~=~\frac{\mu^2}{3}+ \mu\frac{a_1+a_2}{2}+a_1a_2$$ 
$$ ~=~\frac{\mu^2}{3}-\mu\left(1+\frac{\mu}{2}\right)-\left(1-\frac{\mu}{2}\right)\left(3+\frac{\mu}{2}\right) ~=~\frac{\mu^2}{12}-3\tag{7}$$ 
becomes a quadratic equation in $\mu$, with solution
$$ \mu~=~\pm 6,\tag{8}$$ 
in agreement with OP's announced solution.
