歐拉-拉格朗日方程式(英語:Euler-Lagrange equation)為變分法中的一條重要方程式。它是一個二階偏微分方程式。它提供了求泛函的臨界值(平穩值)函數,換句話說也就是求此泛函在其定義域的臨界點的一個方法,與微積分差異的地方在於,泛函的定義域為函數空間而不是 R n {\displaystyle \mathbb {R} ^{n}} 。 該方程式由瑞士數學家萊昂哈德·歐拉與意大利數學家約瑟夫·拉格朗日在1750年代提出。 第一方程式 設 f = f ( x , y , z ) {\displaystyle f=f(x,\ y,\ z)} ,以及 f y , f z {\displaystyle f_{y},\ f_{z}} 在 [ a , b ] × R 2 {\displaystyle [a,\ b]\times \mathbb {R} ^{2}} 中連續,並設泛函 J ( y ) = ∫ a b f ( x , y ( x ) , y ′ ( x ) ) d x {\displaystyle J(y)=\int _{a}^{b}f(x,y(x),y'(x))dx} 。 若 y ∈ C 1 [ a , b ] {\displaystyle y\in C^{1}[a,\ b]} 使得泛函 J ( y ) {\displaystyle J(y)} 取得局部平穩值,則對於所有的 x ∈ ( a , b ) {\displaystyle x\in (a,\ b)} , d d x ∂ ∂ y ′ f ( x , y , y ′ ) = ∂ ∂ y f ( x , y , y ′ ) {\displaystyle {\frac {d}{dx}}{\frac {\partial }{\partial y'}}f(x,y,y')={\frac {\partial }{\partial y}}f(x,y,y')} 。 推廣到多維的情況,記 y → ( x ) = ( y 1 ( x ) , y 2 ( x ) , … , y n ( x ) ) {\displaystyle {\vec {y}}(x)=(y_{1}(x),y_{2}(x),\ldots ,y_{n}(x))} , y → ′ ( x ) = ( y 1 ′ ( x ) , y 2 ′ ( x ) , … , y n ′ ( x ) ) {\displaystyle {\vec {y}}'(x)=(y'_{1}(x),y'_{2}(x),\ldots ,y'_{n}(x))} , f ( x , y → , y → ′ ) = f ( x , y 1 ( x ) , y 2 ( x ) , … , y n ( x ) , y 1 ′ ( x ) , y 2 ′ ( x ) , … , 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))} 。 若 y → ′ ( x ) ∈ ( C 1 [ a , b ] ) n {\displaystyle {\vec {y}}'(x)\in (C^{1}[a,b])^{n}} 使得泛函 J ( y → ) = ∫ a b f ( x , y → , y → ′ ) d x {\displaystyle J({\vec {y}})=\int _{a}^{b}f(x,{\vec {y}},{\vec {y}}')dx} 取得局部平穩值,則在區間 ( a , b ) {\displaystyle (a,\ b)} 內對於所有的 i = 1 , 2 , … , n {\displaystyle i=1,\ 2,\ \ldots ,\ n} ,皆有 d d x ∂ ∂ y i ′ f ( x , y → , y → ′ ) = ∂ ∂ y i f ( x , y → , y → ′ ) {\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}}')} 。 第二方程式 設 f = f ( x , y , z ) {\displaystyle f=f(x,\ y,\ z)} ,及 f y , f z {\displaystyle f_{y},\ f_{z}} 在 [ a , b ] × R 2 {\displaystyle [a,\ b]\times \mathbb {R} ^{2}} 中連續,若 y ∈ C 1 [ a , b ] {\displaystyle y\in C^{1}[a,\ b]} 使得泛函 J ( y ) = ∫ a b f ( x , y ( x ) , y ′ ( x ) ) d x {\displaystyle J(y)=\int _{a}^{b}f(x,y(x),y'(x))dx} 取得局部平穩值,則存在一常數 C {\displaystyle C} ,使得 f ( x , y , y ′ ) − y ′ ( x ) f y ′ ( x , y , y ′ ) = ∫ a x f x ( x ( t ) , y ( t ) , y ′ ( t ) ) d t + 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} 。 例子 例一:兩點之間最短曲線 設 ( 0 , 0 ) {\displaystyle (0,\ 0)} 及 ( a , b ) {\displaystyle (a,\ b)} 為直角坐標上的兩個固定點,欲求連接兩點之間的最短曲線。設 ( x ( t ) , y ( t ) ) ( t ∈ [ 0 , 1 ] ) {\displaystyle (x(t),\ y(t))(t\in [0,\ 1])} ,並且 ( x ( 0 ) , y ( 0 ) ) = ( 0 , 0 ) , ( x ( 1 ) , y ( 1 ) ) = ( a , b ) {\displaystyle (x(0),\ y(0))=(0,\ 0),\ (x(1),\ y(1))=(a,\ b)} ; 這裏, ( x ( t ) , y ( t ) ) ∈ C 1 [ 0 , 1 ] {\displaystyle (x(t),\ y(t))\in C^{1}[0,\ 1]} 為連接兩點之間的曲線。則曲線的弧長為 L ( y ) = ∫ 0 1 [ x ′ ( t ) ] 2 + [ y ′ ( t ) ] 2 d t {\displaystyle L(y)=\int _{0}^{1}{\sqrt {[x'(t)]^{2}+[y'(t)]^{2}}}dt} 。 現設 y → ( t ) = ( x ( t ) , y ( t ) ) {\displaystyle {\vec {y}}(t)=(x(t),\ y(t))} , f ( t , y → ( t ) , y → ′ ( t ) ) = x ′ ( t ) 2 + y ′ ( t ) 2 {\displaystyle f(t,\ {\vec {y}}(t),\ {\vec {y}}'(t))={\sqrt {x'(t)^{2}+y'(t)^{2}}}} , 取偏微分,則 f x ′ = x ′ ( t ) x ′ ( t ) 2 + y ′ ( t ) 2 {\displaystyle f_{x'}={\frac {x'(t)}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}} , f y ′ = y ′ ( t ) x ′ ( t ) 2 + y ′ ( t ) 2 {\displaystyle f_{y'}={\frac {y'(t)}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}} , f x = f y = 0 {\displaystyle f_{x}=f_{y}=0} 。 若 y {\displaystyle y} 使得 L ( y ) {\displaystyle L(y)} 取得局部平穩值,則 y {\displaystyle y} 符合第一方程式: d d t f x ′ ( t , y , y ′ ) = f x ( t , y , y ′ ) = 0 {\displaystyle {\frac {d}{dt}}f_{x'}(t,y,y')=f_{x}(t,y,y')=0} , d d t f y ′ ( t , y , y ′ ) = f y ( t , y , y ′ ) = 0 {\displaystyle {\frac {d}{dt}}f_{y'}(t,y,y')=f_{y}(t,y,y')=0} 。 因此, d d t x ′ x ′ ( t ) 2 + y ′ ( t ) 2 = 0 {\displaystyle {\frac {d}{dt}}{\frac {x'}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}=0} , d d t y ′ x ′ ( t ) 2 + y ′ ( t ) 2 = 0 {\displaystyle {\frac {d}{dt}}{\frac {y'}{\sqrt {x'(t)^{2}+y'(t)^{2}}}}=0} 。 隨 t {\displaystyle t} 積分, x ′ x ′ 2 + y ′ 2 = C 0 {\displaystyle {\frac {x'}{\sqrt {x'^{2}+y'^{2}}}}=C_{0}} , y ′ x ′ 2 + y ′ 2 = C 1 {\displaystyle {\frac {y'}{\sqrt {x'^{2}+y'^{2}}}}=C_{1}} ; 這裏, C 0 , C 1 {\displaystyle C_{0},\ C_{1}} 為常數。重新編排, x ′ = C 0 2 1 − C 0 2 = r {\displaystyle x'={\sqrt {\frac {C_{0}^{2}}{1-C_{0}^{2}}}}=r} , y ′ = C 1 2 1 − C 1 2 = s {\displaystyle y'={\sqrt {\frac {C_{1}^{2}}{1-C_{1}^{2}}}}=s} 。 再積分, x ( t ) = r t + r ′ {\displaystyle x(t)=rt+r'} , y ( t ) = s t + s ′ {\displaystyle y(t)=st+s'} 。 代入初始條件 ( x ( 0 ) , y ( 0 ) ) = ( 0 , 0 ) {\displaystyle (x(0),\ y(0))=(0,\ 0)} , ( x ( 1 ) , y ( 1 ) ) = ( a , b ) {\displaystyle (x(1),\ y(1))=(a,\ b)} ; 即可解得 ( x ( t ) , y ( t ) ) = ( a t , b t ) {\displaystyle (x(t),\ y(t))=(at,\ bt)} ,是連接兩點的一條線段。 另經過其他的分析,可知此解為唯一解,並且該解使得 L ( y ) {\displaystyle L(y)} 取得極小值,所以在平面上連結兩點間弧長最小的曲線為一直線。 例二:兩點之間最短曲線的另一種求解 另一個例子同樣是求定義在區間[a, b]上的實值函數y滿足y(a) = c與y(b) = d,並且沿着y所定義的曲線的道路長度最短。 s = ∫ a b 1 + y ′ 2 d x , {\displaystyle s=\int _{a}^{b}{\sqrt {1+y'^{2}}}\mathrm {d} x,} 被積函數為 L ( x , y , y ′ ) = 1 + y ′ 2 {\displaystyle L(x,y,y')={\sqrt {1+y'^{2}}}} L的偏導數為 ∂ L ( x , y , y ′ ) ∂ y ′ = y ′ 1 + y ′ 2 {\displaystyle {\frac {\partial L(x,y,y')}{\partial y'}}={\frac {y'}{\sqrt {1+y'^{2}}}}} 以及 ∂ L ( x , y , y ′ ) ∂ y = 0. {\displaystyle {\frac {\partial L(x,y,y')}{\partial y}}=0.} 把上面兩式代入歐拉-拉格朗日方程式,可以得到 d d x y ′ ( x ) 1 + ( y ′ ( x ) ) 2 = 0 y ′ ( x ) 1 + ( y ′ ( x ) ) 2 = C = constant ⇒ y ′ ( x ) = C 1 − C 2 := A ⇒ y ( x ) = A x + B {\displaystyle {\begin{aligned}{\frac {\mathrm {d} }{\mathrm {d} x}}{\frac {y'(x)}{\sqrt {1+(y'(x))^{2}}}}&=0\\{\frac {y'(x)}{\sqrt {1+(y'(x))^{2}}}}&=C={\text{constant}}\\\Rightarrow y'(x)&={\frac {C}{\sqrt {1-C^{2}}}}:=A\\\Rightarrow y(x)&=Ax+B\end{aligned}}} 也就是說,該函數的一階導數必須為常值,因此其圖像為直線。 參閱 拉格朗日方程式 變分法 作用量 哈密頓原理 參考書籍 Troutman, John L. Variational Calculus and Optimal Control, 2nd edition, (Springer, 1995), ISBN 978-0387945118. Wikiwand - on Seamless Wikipedia browsing. On steroids.