Calculus of variation question. 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{'}?$ If yes but then I am unable to get the answer. 
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: The Lagrangian for this system is
$$
L(y_1,y_2,y_1',y_2') = y_1 + y_2 + \lambda y_1'y_2' \tag{1}
$$
so that the LE equations are simply


*

*$y_1$:
$$
 \frac{d}{dx}\left(\frac{\partial L}{\partial y_1'}\right) - \frac{\partial L}{\partial y_1} = 0 ~~~\stackrel{(1)}{\Rightarrow}~~~ \lambda y_2'' - 1 = 0 \tag{2}
 $$

*$y_2$:
$$
 \frac{d}{dx}\left(\frac{\partial L}{\partial y_2'}\right) - \frac{\partial L}{\partial y_2} = 0 ~~~\stackrel{(1)}{\Rightarrow}~~~ \lambda y_1'' - 1 = 0 \tag{3}
 $$
Therefore
$$
\begin{eqnarray}
y_1(x) &=& \frac{x^2}{\lambda} + A x + B \\
y_2(x) &=& \frac{x^2}{\lambda} + C x + D \tag{4}
\end{eqnarray}
$$
The constants $A, B, C$ and $D$ can be easily found from your constraints. 
$$
y_1(0) = B = 0 ~~~\mbox{ and }~~~ y_2(0) = D = 0 \tag{5}
$$
and
\begin{eqnarray}
y_1(1) &=& 1/\lambda + A = 1 ~~~\Rightarrow~~~ A = 1 - \frac{1}{\lambda} \\
y_2(1) &=& 1/\lambda + C = -3 ~~~\Rightarrow~~~ C = -3 - \frac{1}{\lambda} \tag{6}
\end{eqnarray}
Everything is in terms of $\lambda$ now. We can then use your final constraint to find its value
$$
0 = \int_0^1{\rm d}x\; y_1'(x)y_2'(x) = \int_0^1{\rm d}x\; \left(\frac{2x}{\lambda} + A\right)\left(\frac{2x}{\lambda} + C\right) \stackrel{(6)}{=} -3 + \frac{1}{3\lambda^2}
$$
from where you conclude
$$
\lambda = \pm\frac{1}{3} \tag{7}
$$
Now, replacing the value of $\lambda$ in Eqs (6) and (4) you get to the solution


*

*$\lambda = +1/3$:



$$
 y_1(x) = 3x^2 - 2x ~~~\mbox{and}~~~ y_2(x) = 3x^2 - 6x
 $$ 



*$\lambda = -1/3$:



$$
 y_1(x) = -3x^2 + 4x ~~~\mbox{and}~~~ y_2(x) = -3x^2
 $$ 

