Deriving correct integral constraint equation for calculus of variations problem

18 Views Asked by At

I have the following calculus of variations problem:

$$\mathcal{L}=-2X'(t)\ln{x'(t)}-2Y'(t)\ln{y'(t)}$$

where $x(t)$ and $y(t)$ are the functions I'm interested in, and $X(t)$ and $Y(t)$ are given as input (I'd like them to remain general). I want to minimize $\mathcal{L}$ with the constraint $$\int_{-\infty}^{\infty}y(t)x'(t)dt=A,$$ where $A$ is a constant. I have the boundary conditions:

$$x(-\infty)=y(-\infty)=X(-\infty)=Y(-\infty)=0$$ $$x(+\infty)=y(+\infty)=X(+\infty)=Y(+\infty)=1$$

Note that the unconstrained problem minimizes at $x(t)=X(t)$, $y(t)=Y(t)$.

I add a Lagrange multiplier to obtain

$$\mathcal{L}=-2X'(t)\ln{x'(t)}-2Y'(t)\ln{y'(t)}+\Lambda y(t)x'(t).$$

And derive the Euler-Lagrange equations for $x$:

$$\dfrac{\partial\mathcal{L}}{\partial x}-\dfrac{d}{dt}\dfrac{\partial\mathcal{L}}{\partial x^\prime}=0$$

$$-\dfrac{d}{dt}\left(-2\dfrac{X^\prime}{x^\prime}+\Lambda y\right)=0$$

$$2\dfrac{X^\prime}{x^\prime}-\Lambda y=c_1$$

$$\Lambda y x^\prime + c_1 x^\prime - 2X^\prime=0$$

And for $y$:

$$\dfrac{\partial\mathcal{L}}{\partial y}-\dfrac{d}{dt}\dfrac{\partial\mathcal{L}}{\partial y^\prime}=0$$

$$\Lambda x^\prime-\dfrac{d}{dt}\left(-2\dfrac{Y^\prime}{y^\prime}\right)=0$$

$$2\dfrac{Y^\prime}{y^\prime}+\Lambda x=c_2$$

$$-\Lambda x y^\prime + c_2 y^\prime - 2Y^\prime=0$$

I'm trying to solve these numerically. With two unknown functions and three variables ($x$, $y$, $c_1$, $c_2$, $\Lambda$), I need five boundary conditions: the values of $x$ and $y$ and $\pm\infty$ and one more corresponding to the constraint.

I tried deriving this last one by integrating the Euler-Lagrange equations from $-\infty$ to $\infty$ to obtain:

$$\Lambda A+c_1-2=0$$ $$-\Lambda (1-A) + c_2 - 2=0$$

(This is one boundary condition too many, but there's redundancy somewhere - if I leave out any one and plug it into scipy.integrate.solve_bvp, the solution I get still satisfies the last one.)

The problem is that my constraint $\int_{-\infty}^{\infty}y(t)x'(t)dt=A$ is sufficient but not necessary to satisfy the boundary conditions. Another solution, for any $A$, is $$\Lambda=0, c_1=c_2=2.$$ And in fact, if I don't guess a solution close enough to the one I'm looking for, sometimes solve_bvp gives me $$\Lambda=0, c_1=c_2=2, x(t)=X(t), y(t)=Y(t).$$

How can I derive a better boundary condition equation for my constraint?