# 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?

1. My $$g(y)$$ contains a Lagrange multiplier as my original problem has a constraint.
2. I have a further constraint that I did not deal with, namely that the solution $$y(x)$$ must be monotonically increasing.
3. 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).$$

• Did you notice that $\mathcal{L}(y)=\int_{y(a)}^{y(b)}g(y)dy$ and thus $\mathcal{L}(y)$ only depends on the two values $\{y(a),y(b)\}$? Commented Aug 15, 2021 at 9:35
• Not really....But the outcome of your integral would still depend on $y$...right? Commented Aug 15, 2021 at 9:50
• $\mathcal{L}(y)$ does depend on $y$, but if I'm not wrong it depends only on the value of $y$ at $a$ and $b$. Thus I think that knowing $g$ is not irrelevant. Commented Aug 15, 2021 at 9:52
• Ok, here it comes: $$g(y)=1-\lambda\left[ 1+\left(1-\mathrm{erf}\left(\sqrt{\frac{y}{N}}\right)\right)^2 \right]$$ Commented Aug 15, 2021 at 9:56
• Is the aim of the exercise to find the minimum of $\mathcal{L}(y)$? Commented Aug 15, 2021 at 9:58

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.$$
• Thanks, but how do I find $y$? The constraint is that $$\int_0^1 y^\prime[1-erf^2(\sqrt{y/N})] dx$$ is a given value. Commented Aug 15, 2021 at 10:48
• Sorry, there is a mistake that does not matter much for your answer. the function $g(y)$ I stated was wrong. The corrected version should be $$g(y)=1-\lambda[1-erf^2(\sqrt{y/N})].$$ But this only alters the two last equations of your solution, so the general approach is unaffected Commented Aug 15, 2021 at 10:53
• So the constraint can be written as follows? $$\int_0^1 y'(x)\,\frac{1-g(y(x))}{\lambda} \, dx = \text{given value}$$ Commented Aug 15, 2021 at 11:16
• Is $a=0$ and $b=1$ so that the endpoints for the constraint are the same as for $\mathcal{L}(y)$? Commented Aug 15, 2021 at 11:24
• yes. I obtain\begin{eqnarray} C&=&\frac{N}{2}\mathrm{erf}^2\left(\frac{y(1)}{N}\right)-y(1)\mathrm{erf}^2\left(\frac{y(1)}{N}\right)-\frac{2N\exp(-\frac{y(1)}{N})\sqrt{\frac{y(1)}{N}}\mathrm{erf}\left(\sqrt{\frac{y(1)}{N}}\right)}{\sqrt{\pi}}\nonumber \\ &&-\frac{N\exp(-\frac{2y(1)}{N})}{\pi}+y(1)+\frac{N}{\pi} \nonumber \end{eqnarray} where $C$ is the "given value" so at least a numerical solution can be obtained. Thanks for the help. Commented Aug 15, 2021 at 13:12