Variational calculus: finding extremals for a functional I have a standard variational problem of the form
$$\mathcal{L}(y)=\int_a^b L[x,y,y^\prime]\mathrm{d}x,$$
where $L[x,y,y^\prime]$ is of the form
$$L[x,y,y^\prime] = y^\prime g(y)$$
for some function $g(\cdot)$ which we can leave unspecified.
With that, the Euler-Lagrange (EL) equation simplifies, using Beltrami, into
\begin{eqnarray} 
\frac{\partial \mathcal{L}}{\partial y} &=&L-y^\prime\frac{\partial L}{\partial y^{\prime}}  \nonumber \\
&=& y^\prime g(y)-y^\prime\frac{\partial L}{\partial y^{\prime}} \nonumber \\
&=&  y^\prime g(y)- y^\prime g(y) \nonumber \\
&=& 0 \nonumber 
\end{eqnarray}
But, this should equal a constant. My only conclusion is that I cannot find any  extremals for such $L$, no matter the function $g(y)$. Can someone clarify the situation to me?

Some more information:

*

*My $g(y)$ contains a Lagrange multiplier as my original problem has a constraint.

*I have a further constraint that I did not deal with, namely that the solution $y(x)$ must be monotonically increasing.

*I could provide my $g(y)$, but it appears as the problem with EL for my type of $L$ is general.

If there are no extremals to the original problem, could condition 2 alter this? To me it seems as the answer is negative, since we can incorporate this condition as
$$\tilde{\mathcal{L}}(y)=\int_a^b L[x,y,y^\prime]-\lambda(x)y^{\prime}(x)\mathrm{d}x,$$
so that the problem is still of the form
$$\tilde{L}[x,y,y^\prime]=y^\prime \tilde{g}(y).$$
 A: When we do a complete calculation we see that the variation only depends on the values at the end points:
$$\begin{align}
\delta \mathcal{L}(y) 
&= \delta \int_a^b y'(x) g(y(x)) \, dx \\
&= \int_a^b \delta y'(x) g(y(x)) \, dx + \int_a^b y'(x)g'(y(x))\delta y(x) \, dx \\
&= \left[ \delta y(x) g(y(x)) \right]_a^b - \int_a^b \delta y(x) g'(y(x)) y'(x))\, dx + \int_a^b y'(x)g'(y(x))\delta y(x) \, dx \\
&= \left[ \delta y(x) g(y(x)) \right]_a^b
.
\end{align}$$
Also, if $G$ is a primitive function of $g,$ then
$$
\mathcal{L}(y) 
= \int_a^b y'(x) g(y(x)) \, dx
= \left[ G(y(x)) \right]_a^b
= G(y(b)) - G(y(a)).
$$
Since $y(a)=0$ we get
$$\mathcal{L}(y)=G(y(b))-G(0).$$
Thus, extremizing $\mathcal{L}(y)$ reduces to finding $y(b)$ that extremizes the above expression. That is, we shall solve
$$
0 = \frac{d}{dy(b)}\left( G(y(b))-G(0) \right) = G'(y(b)) = g(y(b)) \\
= 1-\lambda\left[ 1-\mathrm{erf}\left(\sqrt{\frac{y(b)}{N}}\right)^2 \right]
,
$$
i.e.
$$
\mathrm{erf}\left(\sqrt{\frac{y(b)}{N}}\right) = \sqrt{1-\frac{1}{\lambda}}
.
$$

The constraint $\int_0^1 y^\prime[1-\mathrm{erf}^2(\sqrt{y/N})] dx=C,$ where $C$ is a given value, can be written as
$$
\int_a^b y'(x)\,\frac{1-g(y(x))}{\lambda} \, dx = C
$$
i.e.
$$
\left(y(b)-y(a)\right)-\left(G(y(b))-G(y(a))\right) = \lambda C.
$$
Thus,
$$
\mathcal{L}(y)=G(y(b))-G(y(a))=y(b)-y(a)-\lambda C.
$$
