拉格朗日

定义

假设一个物理系统符合完整系统的要求,即所有广义坐标都互相独立,则拉格朗日方程成立:{\displaystyle {\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\dot {\mathbf {q} }}}}-{\frac {\partial {\mathcal {L}}}{\partial \mathbf {q} }}=\mathbf {0} \,\!}{\frac  {d}{dt}}{\frac  {\partial {\mathcal  {L}}}{\partial {\dot  {\mathbf  {q}}}}}-{\frac  {\partial {\mathcal  {L}}}{\partial {\mathbf  {q}}}}={\mathbf  {0}}\,\!

其中,{\displaystyle {\mathcal {L}}(\mathbf {q} ,\ {\dot {\mathbf {q} }},\ t)\,\!}\mathcal{L}(\mathbf{q},\ \dot{\mathbf{q}},\ t)\,\!拉格朗日量,{\displaystyle \mathbf {q} =\left(q_{1},q_{2},\ldots ,q_{N}\right)\,\!}\mathbf{q} = \left( q_{1}, q_{2}, \ldots, q_{N} \right)\,\!是广义坐标,是时间{\displaystyle t\,\!}t\,\!的函数,{\displaystyle {\dot {\mathbf {q} }}=\left({\dot {q}}_{1},{\dot {q}}_{2},\ldots ,{\dot {q}}_{N}\right)\,\!}\dot{\mathbf{q}} = \left( \dot{q}_{1}, \dot{q}_{2}, \ldots, \dot{q}_{N} \right)\,\!广义速度

导引

分析力学里,有三种方法可以导引出拉格朗日方程。最原始的方法是使用达朗贝尔原理导引出拉格朗日方程(参阅达朗贝尔原理);更进阶层面,可以从哈密顿原理推导出拉格朗日方程(参阅哈密顿原理);最简明地,可以借用数学变分法欧拉-拉格朗日方程来推导:

设定函数{\displaystyle \mathbf {y} (x)\,\!}\mathbf{y}(x)\,\!和{\displaystyle f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)\,\!}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)\,\!:{\displaystyle \mathbf {y} (x)=(y_{1}(x),\ y_{2}(x),\ \ldots ,y_{N}(x))\,\!}\mathbf{y}(x)=(y_1(x),\ y_2 (x),\ \ldots, y_N (x))\,\!、{\displaystyle {\dot {\mathbf {y} }}(x)=({\dot {y}}_{1}(x),\ {\dot {y}}_{2}(x),\ \ldots ,\ {\dot {y}}_{N}(x))\,\!}\dot{\mathbf{y}}(x)=(\dot{y}_1(x),\ \dot{y}_2 (x),\ \ldots,\ \dot{y}_N (x))\,\!、{\displaystyle f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)=f(y_{1}(x),\ y_{2}(x),\ \ldots ,\ y_{N}(x),\ {\dot {y}}_{1}(x),\ {\dot {y}}_{2}(x),\ \ldots ,\ {\dot {y}}_{N}(x),\ x)\,\!}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)=f(y_1(x),\ y_2 (x),\ \ldots,\ y_N (x),\ \dot{y}_1 (x),\ \dot{y}_2 (x),\ \ldots,\ \dot{y}_N (x),\ x)\,\!

其中,{\displaystyle x\,\!}x\,\!自变量(independent variable)。

若{\displaystyle \mathbf {y} (x)\in (C^{1}[a,\ b])^{N}\,\!}\mathbf{y}(x)\in(C^1[a,\ b])^N\,\!使泛函{\displaystyle J(\mathbf {y} )=\int _{a}^{b}f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)dx\,\!} J(\mathbf{y})=\int_a^bf(\mathbf{y},\ \dot{\mathbf{y}},\ x)dx\,\!取得局部平稳值,则在区间{\displaystyle (a,\ b)\,\!}(a,\ b)\,\!内,欧拉-拉格朗日方程成立:{\displaystyle {\frac {d}{dx}}\left({\frac {\partial }{\partial {\dot {y}}_{i}}}f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)\right)-{\frac {\partial }{\partial y_{i}}}f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)=0\ ,\qquad \qquad \qquad \qquad i=1,\ 2,\ \ldots ,\ N\!} \frac{d}{dx}\left(\frac{\partial}{\partial \dot{y}_i}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)\right) - \frac{\partial}{\partial y_i}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)=0\ ,\qquad\qquad\qquad\qquad i=1,\ 2,\ \ldots,\ N\!

现在,执行下述变换:

  • 设定独立变量{\displaystyle x\,\!}x\,\!为时间{\displaystyle t\,\!}t\,\!
  • 设定函数{\displaystyle y_{i}\,\!}y_i\,\!为广义坐标{\displaystyle q_{i}\,\!}q_i\,\!
  • 设定泛函{\displaystyle f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)\,\!}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)\,\!为拉格朗日量{\displaystyle {\mathcal {L}}(\mathbf {q} ,\ {\dot {\mathbf {q} }},\ t)\,\!}\mathcal{L}(\mathbf{q},\ \dot{\mathbf{q}},\ t)\,\!

则可得到拉格朗日方程{\displaystyle {\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\dot {\mathbf {q} }}}}-{\frac {\partial {\mathcal {L}}}{\partial \mathbf {q} }}=\mathbf {0} \,\!}{\frac  {d}{dt}}{\frac  {\partial {\mathcal  {L}}}{\partial {\dot  {\mathbf  {q}}}}}-{\frac  {\partial {\mathcal  {L}}}{\partial {\mathbf  {q}}}}={\mathbf  {0}}\,\!

  • 为了满足这变换的正确性,广义坐标必须互相独立,所以,这系统必须是完整系统。
  • 拉格朗日量是动能减去位势,而位势必须是广义位势。所以,这系统必须是单演系统。

半完整系统

主项目:参阅半完整系统

一个不是完整系统的物理系统是非完整系统,不能用上述形式论来分析。假若,一个非完整系统的约束可以以方程表示为{\displaystyle g_{i}(\mathbf {q} ,\ {\dot {\mathbf {q} }})=0\ ,\qquad \qquad \qquad i=1,\ 2,\ 3,\ \dots n\,\!}g_i(\mathbf{q},\ \dot{\mathbf{q}})=0\ ,\qquad\qquad\qquad i=1,\ 2,\ 3,\ \dots n\,\!

则称此系统为半完整系统[1]

半完整系统可以用拉格朗日形式论来分析。更具体地说,分析半完整系统必须用到拉格朗日乘子{\displaystyle \lambda _{i}\,\!}\lambda_i\,\!:{\displaystyle \sum _{i=1}^{n}\ \lambda _{i}g_{i}=0\,\!}\sum_{i=1}^n\ \lambda_i g_i=0\,\!

其中,{\displaystyle \lambda _{i}=\lambda _{i}(\mathbf {q} ,\ {\dot {\mathbf {q} }},\ t)\,\!}\lambda_i=\lambda_i(\mathbf{q},\ \dot{\mathbf{q}},\ t)\,\!是未知函数。

由于这{\displaystyle N\,\!}N\,\!个广义坐标中,有{\displaystyle n\,\!}n\,\!个相依的广义坐标,泛函{\displaystyle f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)\,\!}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)\,\!不能直接被变换为拉格朗日量{\displaystyle {\mathcal {L}}\,\!}\mathcal{L}\,\!;必须加入拉格朗日乘子,将泛函{\displaystyle f(\mathbf {y} ,\ {\dot {\mathbf {y} }},\ x)\,\!}f(\mathbf{y},\ \dot{\mathbf{y}},\ x)\,\!变换为{\displaystyle {\mathcal {L}}+\sum _{i=1}^{n}\ \lambda _{i}g_{i}\,\!}\mathcal{L}+\sum_{i=1}^n\ \lambda_i g_i\,\!。这样,可以得到拉格朗日广义力方程:{\displaystyle {\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\dot {\mathbf {q} }}}}-{\frac {\partial {\mathcal {L}}}{\partial \mathbf {q} }}={\boldsymbol {\mathcal {F}}}\,\!}{\frac  {d}{dt}}{\frac  {\partial {\mathcal  {L}}}{\partial {\dot  {\mathbf  {q}}}}}-{\frac  {\partial {\mathcal  {L}}}{\partial {\mathbf  {q}}}}={\boldsymbol  {{\mathcal  {F}}}}\,\!

其中,{\displaystyle {\boldsymbol {\mathcal {F}}}\,\!}\boldsymbol{\mathcal{F}}\,\!广义力,{\displaystyle {\boldsymbol {\mathcal {F}}}={\frac {\partial }{\partial \mathbf {q} }}\left(\sum _{i=1}^{n}\ \lambda _{i}g_{i}\right)-{\frac {d}{dt}}\left[{\frac {\partial }{\partial {\dot {\mathbf {q} }}}}\left(\sum _{i=1}^{n}\ \lambda _{i}g_{i}\right)\right]\,\!}\boldsymbol{\mathcal{F}}=\frac{\partial}{\partial \mathbf{q}}\left(\sum_{i=1}^n\ \lambda_i g_i\right) - \frac{d}{dt}\left[\frac{\partial}{\partial \dot{\mathbf{q}}}\left(\sum_{i=1}^n\ \lambda_i g_i\right)\right]\,\!

这{\displaystyle N\,\!}N\,\!个广义力运动方程加上{\displaystyle n\,\!}n\,\!个约束方程,给出{\displaystyle N+n\,\!}N+n\,\!个方程来解{\displaystyle N\,\!}N\,\!个未知广义坐标与{\displaystyle n\,\!}n\,\!个拉格朗日乘子。

实例[编辑]

这个段落会展示拉格朗日方程的两个应用实例。第一个实例展示出,用牛顿方法与拉格朗日方法所得的答案相同。第二个实例展示出拉格朗日方法的威力,因为这问题比较不适合用牛顿方法来分析。

自由落体[编辑]

思考一个粒子从静止状态自由地下落。由于重力{\displaystyle F=mg\,\!}F=mg\,\!作用于此粒子,应用牛顿第二定律,可以得到运动方程{\displaystyle {\ddot {x}}=g\,\!}\ddot x = g\,\!

其中,x-坐标垂直于地面,由初始点(原点)往地面指。

这个结果也可以从拉格朗日形式论得到。动能{\displaystyle T\,\!}T\,\!是{\displaystyle T={\frac {1}{2}}mv^{2}\,\!}T = \frac{1}{2} m v^2\,\!

位势{\displaystyle V\,\!}V\,\!是{\displaystyle V=-mgx\,\!}V = - m g x\,\!

所以,拉格朗日量{\displaystyle {\mathcal {L}}\,\!}\mathcal{L}\,\!是{\displaystyle {\mathcal {L}}=T-V={\frac {1}{2}}m{\dot {x}}^{2}+mgx\,\!}\mathcal{L} = T - V = \frac{1}{2} m \dot{x}^2 + m g x\,\! 。

将{\displaystyle {\mathcal {L}}\,\!}\mathcal{L}\,\!代入拉格朗日方程,{\displaystyle 0={\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\dot {x}}}}-{\frac {\partial {\mathcal {L}}}{\partial x}}=m{\frac {d{\dot {x}}}{dt}}-mg\,\!}0 =  \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial \dot{x}} - \frac{\partial \mathcal{L}}{\partial x}= m\frac{d \dot x}{dt} - mg\,\!

运动方程是{\displaystyle {\ddot {x}}=g\,\!}\ddot x = g\,\!

与牛顿方法的运动方程相同。

具有质量的移动支撑点的简单摆[编辑]

PendulumWithMovingSupport.JPG

思考一个简单摆系统。系统的x-轴平行于地面,y-轴垂直于x-轴,指向地面。摆锤P的质量是{\displaystyle m\,\!}m\,\!,位置是{\displaystyle (x,\ y)\,\!}(x,\ y)\,\!。摆绳的长度是{\displaystyle l\,\!}l\,\!。摆的支撑点Q的质量是{\displaystyle M\,\!}M\,\!。这支撑点Q可以沿着一条平行于x-轴的直线移动。点Q的位置是{\displaystyle (X,\ 0)\,\!}(X,\ 0)\,\!。摆绳与y-轴的夹角是{\displaystyle \theta \,\!}\theta\,\!。那么,动能是{\displaystyle T={\frac {1}{2}}M{\dot {X}}^{2}+{\frac {1}{2}}m\left({\dot {x}}^{2}+{\dot {y}}^{2}\right)\,\!}T = \frac{1}{2} M \dot{X}^2 + \frac{1}{2} m \left( \dot{x}^2 + \dot{y}^2 \right)\,\!

位势为{\displaystyle V=-mgy\,\!}V= - mgy\,\!

所以,拉格朗日量是{\displaystyle {\mathcal {L}}={\frac {1}{2}}M{\dot {X}}^{2}+{\frac {1}{2}}m\left({\dot {x}}^{2}+{\dot {y}}^{2}\right)+mgy\,\!}\mathcal{L}=\frac{1}{2}M\dot{X}^2+\frac{1}{2}m\left(\dot{x}^2+\dot{y}^2\right)+mgy\,\!

两个约束方程为{\displaystyle x=X+l\sin \theta \,\!}x=X+l\sin\theta\,\!、{\displaystyle y=l\cos \theta \,\!}y=l\cos\theta\,\!

将约束方程代入拉格朗日量方程,{\displaystyle {\mathcal {L}}={\frac {1}{2}}M{\dot {X}}^{2}+{\frac {1}{2}}m\left[\left({\dot {X}}+l{\dot {\theta }}\cos \theta \right)^{2}+\left(l{\dot {\theta }}\sin \theta \right)^{2}\right]+mgl\cos \theta \,\!}\mathcal{L}=\frac{1}{2} M \dot{X}^2 + \frac{1}{2} m \left[ \left( \dot{X} + l \dot\theta\cos\theta\right)^2 + \left( l \dot\theta \sin \theta \right)^2 \right]+ mgl\cos\theta\,\!

特别注意,在这里,广义坐标是{\displaystyle X\,\!}X\,\!与{\displaystyle \theta \,\!}\theta\,\!。应用拉格朗日方程,经过微分运算,对于{\displaystyle X\,\!}X\,\!坐标,可以得到{\displaystyle {\frac {d}{dt}}\left[(M+m){\dot {X}}+ml{\dot {\theta }}\cos \theta \right]=0\,\!}\frac{d}{dt}\left[(M+m) \dot{X}+ml\dot{\theta}\cos\theta\right]=0\,\!

运动方程为{\displaystyle (M+m){\ddot {X}}+ml{\ddot {\theta }}\cos \theta -ml{\dot {\theta }}^{2}\sin \theta =0\,\!}(M+m)\ddot{X}+ml\ddot{\theta}\cos\theta - ml\dot{\theta}^2\sin\theta = 0 \,\!

由于拉格朗日量不显含广义坐标{\displaystyle X\,\!}X\,\!,称{\displaystyle X\,\!}X\,\!可略坐标,而其相对应的广义动量{\displaystyle p_{X}\,\!}p_X\,\!是常数{\displaystyle K_{1}\,\!}K_1\,\!:{\displaystyle p_{X}=(M+m){\dot {X}}+ml{\dot {\theta }}\cos \theta =K_{1}\,\!}p_X=(M+m)\dot{X}+ml\dot{\theta}\cos\theta=K_1\,\!

对于{\displaystyle \theta \,\!}\theta\,\!坐标,可以得到{\displaystyle {\frac {d}{dt}}\left[m(l^{2}{\dot {\theta }}+{\dot {X}}l\cos \theta )\right]+m({\dot {X}}l{\dot {\theta }}+gl)\sin \theta =0\,\!}\frac{d}{dt}\left[m(l^2 \dot{\theta}+\dot{X}l\cos\theta)\right]+m(\dot{X}l\dot{\theta}+gl) \sin\theta=0\,\!

所以,运动方程为{\displaystyle {\ddot {\theta }}+{\frac {\ddot {X}}{l}}\cos \theta +{\frac {g}{l}}\sin \theta =0\,\!}\ddot{\theta}+\frac{\ddot{X}}{l}\cos\theta+\frac{g}{l}\sin\theta=0\,\!

假如用牛顿第二定律,则必须仔细地辨明所有的相关作用力。这是一项既困难又容易出错的工作。

相关条目

Leave a Reply

Your email address will not be published. Required fields are marked *