# 變分法

## 歐拉-拉格朗日方程

${\displaystyle A[f]=\int _{x_{1}}^{x_{2}}{\sqrt {1+[f'(x)]^{2}}}\,dx}$

${\displaystyle f'(x)={\frac {df}{dx}},\,}$ ${\displaystyle f(x_{1})=y_{1},\,}$ ${\displaystyle f(x_{2})=y_{2}\,}$

${\displaystyle A[f_{0}]\leq A[f_{0}+\epsilon f_{1}]}$

${\displaystyle {\frac {d}{d\epsilon }}\int _{x_{1}}^{x_{2}}\left.{\sqrt {1+[f_{0}'(x)+\epsilon f_{1}'(x)]^{2}}}dx\right|_{\epsilon =0}=\int _{x_{1}}^{x_{2}}\left.{\frac {(f_{0}'(x)+\epsilon f_{1}'(x))f_{1}'(x)}{\sqrt {1+[f_{0}'(x)+\epsilon f_{1}'(x)]^{2}}}}\right|_{\epsilon =0}dx=\int _{x_{1}}^{x_{2}}{\frac {f_{0}'(x)f_{1}'(x)}{\sqrt {1+[f_{0}'(x)]^{2}}}}\,dx=0}$

${\displaystyle \int _{x_{1}}^{x_{2}}f_{1}(x){\frac {d}{dx}}\left[{\frac {f_{0}'(x)}{\sqrt {1+[f_{0}'(x)]^{2}}}}\right]\,dx=0,}$

${\displaystyle I=\int _{x_{1}}^{x_{2}}f_{1}(x)H(x)dx=0}$

${\displaystyle {\frac {d}{dx}}\left[{\frac {f_{0}'(x)}{\sqrt {1+[f_{0}'(x)]^{2}}}}\right]=0}$

${\displaystyle {\frac {d^{2}f_{0}}{dx^{2}}}=0}$

${\displaystyle A[f]=\int _{x_{1}}^{x_{2}}L(x,f,f')dx}$

${\displaystyle -{\frac {d}{dx}}{\frac {\partial L}{\partial f'}}+{\frac {\partial L}{\partial f}}=0}$

## 費馬原理

${\displaystyle A[f]=\int _{x=x_{0}}^{x_{1}}n(x,f(x)){\sqrt {1+f'(x)^{2}}}dx}$

${\displaystyle \delta A[f_{0},f_{1}]=\int _{x=x_{0}}^{x_{1}}\left[{\frac {n(x,f_{0})f_{0}'(x)f_{1}'(x)}{\sqrt {1+f_{0}'(x)^{2}}}}+n_{y}(x,f_{0})f_{1}{\sqrt {1+f_{0}'(x)^{2}}}\right]dx}$

${\displaystyle -{\frac {d}{dx}}\left[{\frac {n(x,f_{0})f_{0}'}{\sqrt {1+f_{0}'^{2}}}}\right]+n_{y}(x,f_{0}){\sqrt {1+f_{0}'(x)^{2}}}=0}$

### 斯乃爾定律

${\displaystyle n(x,y)=n_{-}\quad {\hbox{if}}\quad x<0}$
${\displaystyle n(x,y)=n_{+}\quad {\hbox{if}}\quad x>0}$

${\displaystyle \delta A[f_{0},f_{1}]=f_{1}(0)\left[n_{-}{\frac {f_{0}'(0_{-})}{\sqrt {1+f_{0}'(0_{-})^{2}}}}-n_{+}{\frac {f_{0}'(0_{+})}{\sqrt {1+f_{0}'(0_{+})^{2}}}}\right]}$

${\displaystyle n_{-}}$相乘的係數是入射角的正弦值，和${\displaystyle n_{+}}$相乘的係數則是折射角的正弦值。若依照斯涅爾定律，上述二項的乘積相等，因此上述的變分量為0。因此斯涅爾定律所得的路徑也就是要求光程一階變分量為0的路徑。

### 費馬原理在三維下的形式

${\displaystyle A[C]=\int _{t=t_{0}}^{t_{1}}n(X){\sqrt {{\dot {X}}\cdot {\dot {X}}}}dt}$

${\displaystyle {\frac {d}{dt}}P={\sqrt {{\dot {X}}\cdot {\dot {X}}}}\nabla n}$

${\displaystyle P={\frac {n(X){\dot {X}}}{\sqrt {{\dot {X}}\cdot {\dot {X}}}}}}$

${\displaystyle P\cdot P=n(X)^{2}}$

${\displaystyle A[C]=\int _{t=t_{0}}^{t_{1}}P\cdot {\dot {X}}\,dt}$

## 參考

1. ^ Gelfand, I. M.; Fomin, S. V. Silverman, Richard A. , 編. Calculus of variations Unabridged repr. Mineola, N.Y.: Dover Publications. 2000: 3 [2013-05-22]. ISBN 978-0486414485. （原始內容存檔於2019-05-03）.
• Fomin, S.V. and Gelfand, I.M.: Calculus of Variations, Dover Publ., 2000
• Lebedev, L.P. and Cloud, M.J.: The Calculus of Variations and Functional Analysis with Optimal Control and Applications in Mechanics, World Scientific, 2003, pages 1-98
• Charles Fox: An Introduction to the Calculus of Variations, Dover Publ., 1987
• Forsyth, A.R.: Calculus of Variations, Dover, 1960
• Sagan, Hans: Introduction to the Calculus of Variations, Dover, 1992
• Weinstock, Robert: Calculus of Variations with Applications to Physics and Engineering, Dover, 1974
• Clegg, J.C.: Calculus of Variations, Interscience Publishers Inc., 1968
• Elsgolc, L.E.: Calculus of Variations, Pergamon Press Ltd., 1962