Calculus – How to Show a Stationary Path with a Natural Boundary Condition at x=0?

boundary value problemcalculuscalculus-of-variationseuler-lagrange-equation

Let $a>0, b>0, c>0$ be constants. Show that the stationary path of the functional $$S[y]=\int_{0}^{a}(y'^2+2by)dx, \quad y(a)=0,$$ with a natural boundary condition at $x=0$ and subject to the constraint $$C[y]=\int_{0}^{a}ydx=C,$$ is given by $$y(x)=\frac{3C}{2a^3}(a^2-x^2).$$

Here's my work:

Consider the functional $S[y]=\int_{0}^{a}(y'^2+2by)dx, y(a)=0,$ with a natural boundary condition at $x=0$ where $a>0, b>0, c>0$ are constants.

Then the auxiliary functional is $\bar{S}[y]=\int_{0}^{a}(y'^2+2by+\lambda_{1}y)dx, y(a)=y(c)=0$ where $\lambda_{1}$ is the Lagrange multiplier.

By definition, the Euler-Lagrange equation is $\frac{d}{dx}(\frac{\partial F}{\partial y'})-\frac{\partial F}{\partial y}=0, y(a)=A, y(b)=B$ for the functional $S[y]=\int_{a}^{b}F(x, y, y')dx, y(a)=A, y(b)=B.$

Let $F(x, y, y')=y'^2+2by+\lambda_{1}y.$

Note that $\frac{\partial F}{\partial y'}=2y'$ and $\frac{\partial F}{\partial y}=2b+\lambda_{1}.$

This gives $\frac{d}{dx}(\frac{\partial F}{\partial y'})=2y''.$

Thus, the Euler-Lagrange equation is $\frac{d}{dx}(\frac{\partial F}{\partial y'})-\frac{\partial F}{\partial y}=0\implies 2y''-2b-\lambda_{1}=0.$

Observe that $2y''-2b-\lambda_{1}=0\implies 2y''=2b+\lambda_{1}\implies y''=b+\frac{\lambda_{1}}{2}.$

I know I need to find the general solution first by solving this differential equation but how should I solve this?

Best Answer

You are totally on the right track, and all that is left is to use the boundary conditions and the constraint to pin down some coefficients.

Note that $b$ doesn't appear in the answer, and this is naturally so since $$ S[y]=\int_0^a (y'^2+2by)dx = \int_0^a y'^2\,dx + 2b\int_0^a y\,dx= \int_0^a y'^2\,dx + 2bc, $$ since the constraint is $C[y]=\int_0^a y\,dx=c$. (I think your $C$ should be $c$ from your first sentence.)

Therefore you can just use $\int_0^a y'^2\,dx$ as your functional, and $b$ never comes into play. (You can keep it if you want to, but the final answer won't change.)

Therefore, your calculation of the Euler-Lagrange equation with Lagrange multiplier gives $$ y'' = \frac{\lambda}{2}. $$ (I dropped your subscript 1, and dropped $b$ as explained above.) Integrating with respect to $x$ twice, the solution would be $$ y = \frac{\lambda}{4}x^2 + \alpha x + \beta, $$ where $\lambda, \alpha, \beta$ are constants to be determined. We do this by the boundary conditions and the constraint.

The natural boundary at $x=0$ means that for $p=\frac{\partial L}{\partial y'}=2y'$, we should have $p(0)=0$, that is, $2y'(0)=0$. Here $L=y'^2$ is the Lagrangian (the integrand in the functional). See Difference between "essential boundary conditions" and "natural boundary conditions"?

Therefore the three conditions for $y= \frac{\lambda}{4}x^2 + \alpha x + \beta$ are $$ \begin{cases} 2y'(0)=0 &\Longrightarrow \alpha=0, \text{ so}\\ y(a)=0&\Longrightarrow \frac{\lambda}{4}a^2 + \beta = 0,\\ \int_0^a y\,dx=c&\Longrightarrow \frac{\lambda}4\frac{a^3}3 + \beta a=c. \end{cases} $$ Solving the last two equstions gives $$ \lambda=-\frac{6c}{a^3},\quad \beta=\frac{3c}{2a}. $$ Therefore $$ y=\frac{\lambda}4 x^2 + \beta = \frac{3c}{2a^3}(a^2-x^2). $$