I come across these 2 problems in my self very first study to calculus of variation of parameters and I faced two problems. I solved the fist one, I hope my solution is right, but I do not know how to attack the second one which is somehow similar to the problem in the following link; Why $\frac{d}{dx}f_\xi=f_u$ and $f(b,\bar u(b), \bar u'(b))=0$.
Problem one For the functional
$$J[u] = \int_0^1 (2 x u(x) - (u'(x))^2 + 3 u'(x) (u(x)^2))\,dx,$$
find all the $C^1 ([0,1])$ stationary curves (i.e solutions of Euler-Lagrange equation) satisfying the boundary conditions $u(0)=0, u(1)=\frac{1}{3}.$
My solution Let $F(u)= 2 x u - (u')^2 + 3 u' u^2.$ Finding the followings
$$\frac{\partial F}{\partial u} = 2 x + 6u u'.$$
$$\frac{\partial F}{\partial u'} = -2 u' + 3 u^2$$
Now we plug the above two equations into Euler-Lagrange equation
\begin{align*} \frac{\partial F}{\partial u} - \frac{d}{dx} \left( \frac{\partial F}{\partial u'} \right)&=0,\\ 2x + 6 u u' + 2u''-6uu'&=0. \end{align*}
Thus we have
$$u''(x) =-x \Rightarrow u'(x) = -\frac{1}{2}x^2 + c_1 \Rightarrow u(x) = -\frac{1}{6} x^3 + c_1 x + c_2.$$
From $u(0)=0$ we have $c_2 =0$ and from $u(1)= \frac{1}{ 3}$ we have
$$\frac{1}{3} = u(1) = - \frac{1}{6} + c_1 \Rightarrow c_1 =\frac{1}{3}.$$
Then the curve is;
$$u(x) = \frac{x}{3}-\frac{x^3}{6}.$$
Problem two For $f \in C^2 ([a,b] \times \mathbb{R} \times \mathbb{R})$ we consider the minimization problem
$$\inf_{u \in X}J[u],\,\, J[u] = \int_a^b f(x,u(x),u'(x)) dx,\,\,\, X=\{ u \in C^1([a,b]); u(a)=\alpha \}.$$
Assume that a minimizer $\overline{u} \in C^2([a,b]) \cap X$ attaining the infimum of the problem exists, find the condition that the minimizer $\overline{u}$ fulfills at the right endpoint $x=b$ of the interval $[a,b]$ (i.e. find the relation satisfied by $\overline{u}(b)$, $\overline{u}'(b)$).