# 歐拉-拉格朗日方程

（重定向自歐拉－拉格朗日方程

## 第一方程

${\displaystyle f=f(x,\ y,\ z)}$，以及${\displaystyle f_{y},\ f_{z}}$${\displaystyle [a,\ b]\times \mathbb {R} ^{2}}$中連續，並設泛函

${\displaystyle J(y)=\int _{a}^{b}f(x,y(x),y'(x))dx}$

${\displaystyle y\in C^{1}[a,\ b]}$使得泛函${\displaystyle J(y)}$取得局部平穩值，則對於所有的${\displaystyle x\in (a,\ b)}$

${\displaystyle {\frac {d}{dx}}{\frac {\partial }{\partial y'}}f(x,y,y')={\frac {\partial }{\partial y}}f(x,y,y')}$

${\displaystyle {\vec {y}}(x)=(y_{1}(x),y_{2}(x),\ldots ,y_{n}(x))}$
${\displaystyle {\vec {y}}'(x)=(y'_{1}(x),y'_{2}(x),\ldots ,y'_{n}(x))}$
${\displaystyle f(x,{\vec {y}},{\vec {y}}')=f(x,y_{1}(x),y_{2}(x),\ldots ,y_{n}(x),y'_{1}(x),y'_{2}(x),\ldots ,y'_{n}(x))}$

${\displaystyle {\vec {y}}'(x)\in (C^{1}[a,b])^{n}}$使得泛函${\displaystyle J({\vec {y}})=\int _{a}^{b}f(x,{\vec {y}},{\vec {y}}')dx}$取得局部平穩值，則在區間${\displaystyle (a,\ b)}$內對於所有的${\displaystyle i=1,\ 2,\ \ldots ,\ n}$，皆有

${\displaystyle {\frac {d}{dx}}{\frac {\partial }{\partial y'_{i}}}f(x,{\vec {y}},{\vec {y}}')={\frac {\partial }{\partial y_{i}}}f(x,{\vec {y}},{\vec {y}}')}$

## 第二方程

${\displaystyle f=f(x,\ y,\ z)}$，及${\displaystyle f_{y},\ f_{z}}$${\displaystyle [a,\ b]\times \mathbb {R} ^{2}}$中連續，若${\displaystyle y\in C^{1}[a,\ b]}$使得泛函${\displaystyle J(y)=\int _{a}^{b}f(x,y(x),y'(x))dx}$取得局部平穩值，則存在一常數${\displaystyle C}$，使得

${\displaystyle f(x,y,y')-y'(x)f_{y\,'}(x,y,y')=\int _{a}^{x}f_{x}(x(t),y(t),y'(t))dt+C}$

## 例子

${\displaystyle (0,\ 0)}$${\displaystyle (a,\ b)}$為直角坐標上的兩個固定點，欲求連接兩點之間的最短曲線。設${\displaystyle (x(t),\ y(t))(t\in [0,\ 1])}$，並且

${\displaystyle (x(0),\ y(0))=(0,\ 0),\ (x(1),\ y(1))=(a,\ b)}$

${\displaystyle L(y)=\int _{0}^{1}{\sqrt {[x'(t)]^{2}+[y'(t)]^{2}}}dt}$

${\displaystyle {\vec {y}}(t)=(x(t),\ y(t))}$
${\displaystyle f(t,\ {\vec {y}}(t),\ {\vec {y}}'(t))={\sqrt {x'(t)^{2}+y'(t)^{2}}}}$

${\displaystyle f_{x'}={\frac {x'(t)}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}}$
${\displaystyle f_{y'}={\frac {y'(t)}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}}$
${\displaystyle f_{x}=f_{y}=0}$

${\displaystyle y}$使得${\displaystyle L(y)}$取得局部平穩值，則${\displaystyle y}$符合第一方程：

${\displaystyle {\frac {d}{dt}}f_{x'}(t,y,y')=f_{x}(t,y,y')=0}$
${\displaystyle {\frac {d}{dt}}f_{y'}(t,y,y')=f_{y}(t,y,y')=0}$

${\displaystyle {\frac {d}{dt}}{\frac {x'}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}=0}$
${\displaystyle {\frac {d}{dt}}{\frac {y'}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}=0}$

${\displaystyle t}$積分，

${\displaystyle {\frac {x'}{\sqrt {x'^{2}+y'^{2}}}}=C_{0}}$
${\displaystyle {\frac {y'}{\sqrt {x'^{2}+y'^{2}}}}=C_{1}}$

${\displaystyle x'={\sqrt {\frac {C_{0}^{2}}{1-C_{0}^{2}}}}=r}$
${\displaystyle y'={\sqrt {\frac {C_{1}^{2}}{1-C_{1}^{2}}}}=s}$

${\displaystyle x(t)=rt+r'}$
${\displaystyle y(t)=st+s'}$

${\displaystyle (x(0),\ y(0))=(0,\ 0)}$
${\displaystyle (x(1),\ y(1))=(a,\ b)}$

## 參考書籍

• Troutman, John L. Variational Calculus and Optimal Control, 2nd edition, (Springer, 1995), ISBN 978-0387945118.