当前位置:网站首页>Calculus of variations
Calculus of variations
2022-07-23 18:05:00 【Lian Li o】
functional (functional)
- functional F [ y ] F[y] F[y] Is a function of a function , That is, its Input is a function y ( x ) y(x) y(x), Output is real F F F. This output value depends on one or more functions ( Input ) The integral over a whole path, rather than a general function, depends on discrete variables . For example, calculation The distance between two points , The input is a curve connecting two points , The output is the curve length . stay ML In the scene of , One of the most common functional is entropy H [ x ] H[x] H[x], The input of entropy is a random variable x x x Probability distribution of p ( x ) p(x) p(x), Output as real number , So it can also be written H [ p ] H[p] H[p]
Calculus of Variations
- Variation Is to find a function y ( x ) y(x) y(x) bring F [ y ] F[y] F[y] Maximum / Minimum . For example, find that the shortest path between two points is a straight line , The probability distribution that maximizes the differential entropy is a normal distribution
Euler - The Lagrangian equation
- (1) For the function y ( x ) y(x) y(x), Add a small disturbance ϵ → 0 \epsilon\rightarrow0 ϵ→0 Then Taylor expansion can be used to obtain the following formula ( The first derivative of the polynomial is the same as the original function )
For multivariable functions y ( x 1 , . . . , x D ) y(x_1,...,x_D) y(x1,...,xD), Taylor's expansion is as follows ( The first-order partial derivative of the polynomial is the same as the original function )
Similarly , We can Add a small perturbation to the functional ϵ η ( x ) \epsilon\eta(x) ϵη(x). Usually in the variational method , A functional is an integral , namely
F [ y ] = ∫ G d x F[y]=\int Gdx F[y]=∫Gdx Therefore, adding a small disturbance to the functional is equivalent to adding a disturbance to countless variables on the integration path , By extending Taylor expansion of multivariable function, we can get Taylor expansion of functional :
among , δ F / δ y ( x ) \delta F/\delta y(x) δF/δy(x) Is a functional F [ y ] F[y] F[y] Yes y ( x ) y(x) y(x) The derivative of - (2) G G G It could be a function y ( x ) y(x) y(x) and y ( x ) y(x) y(x) Functions of derivatives of all orders ( because y ( x ) y(x) y(x) yes x x x Function of , therefore G G G It's also x x x Function of ). For the sake of illustration , Let's suppose for the time being G G G yes y ( x ) y(x) y(x) and y ′ ( x ) y'(x) y′(x) Function of , So we can write the functional as :
to F [ y ] F[y] F[y] A perturbation and Taylor formula expansion can be obtained
F [ y ( x ) + ϵ η ( x ) ] = ∫ G ( y + ϵ η , y ′ + ϵ η ′ , x ) d x = ∫ [ G ( y , y ′ , x ) + ϵ ∂ G ∂ y η + ϵ ∂ G ∂ y ′ η ′ + O ( ϵ 2 ) ] d x = F [ y ( x ) ] + ϵ ∫ [ ∂ G ∂ y η ( x ) + ∂ G ∂ y ′ η ′ ( x ) ] d x + O ( ϵ 2 ) \begin{aligned} F[y(x)+\epsilon\eta(x)] &=\int G(y+\epsilon\eta,y'+\epsilon\eta',x)dx \\&=\int \left[G(y,y',x)+\epsilon\frac{\partial G}{\partial y}\eta+\epsilon\frac{\partial G}{\partial y'}\eta'+O(\epsilon^2)\right]dx \\&=F[y(x)]+\epsilon\int \left[\frac{\partial G}{\partial y}\eta(x)+\frac{\partial G}{\partial y'}\eta'(x)\right]dx+O(\epsilon^2) \end{aligned} F[y(x)+ϵη(x)]=∫G(y+ϵη,y′+ϵη′,x)dx=∫[G(y,y′,x)+ϵ∂y∂Gη+ϵ∂y′∂Gη′+O(ϵ2)]dx=F[y(x)]+ϵ∫[∂y∂Gη(x)+∂y′∂Gη′(x)]dx+O(ϵ2) Will be the first 2 Term partial integral can get
∫ [ ∂ G ∂ y ′ η ′ ( x ) ] d x = ∫ ∂ G ∂ y ′ d η ( x ) = η ( x ) ∂ G ∂ y ′ ∣ x − ∫ η ( x ) d ∂ G ∂ y ′ = − ∫ d d x ( ∂ G ∂ y ′ ) η ( x ) d x \begin{aligned} \int \left[\frac{\partial G}{\partial y'}\eta'(x)\right]dx &=\int \frac{\partial G}{\partial y'}d\eta(x) \\&=\left.\eta(x)\frac{\partial G}{\partial y'}\right|_x-\int\eta(x)d \frac{\partial G}{\partial y'} \\&=-\int\frac{d}{dx}\left(\frac{\partial G}{\partial y'}\right)\eta(x)d x \end{aligned} ∫[∂y′∂Gη′(x)]dx=∫∂y′∂Gdη(x)=η(x)∂y′∂G∣∣x−∫η(x)d∂y′∂G=−∫dxd(∂y′∂G)η(x)dx The last equation is because y ( x ) y(x) y(x) The value of is fixed on the integral boundary , For example, when calculating the distance between two points , The value of the curve at the two endpoints must be the same , So disturbance η ( x ) \eta(x) η(x) The value on the integral boundary is 0, F [ y ( x ) + ϵ η ( x ) ] F[y(x)+\epsilon\eta(x)] F[y(x)+ϵη(x)] You can write the following formula :
- (3) contrast (1) (2) We can know from the formula deduced in
δ F δ y ( x ) = ∂ G ∂ y − d d x ( ∂ G ∂ y ′ ) \frac{\delta F}{\delta y(x)}=\frac{\partial G}{\partial y}-\frac{d}{dx}\left(\frac{\partial G}{\partial y'}\right) δy(x)δF=∂y∂G−dxd(∂y′∂G) When y ( x ) y(x) y(x) Make functional F [ y ] F[y] F[y] When taking the extreme value , For all x x x There must be δ F δ y ( x ) = 0 \frac{\delta F}{\delta y(x)}=0 δy(x)δF=0, This is because if it exists x ^ \hat x x^ bring δ F δ y ( x ^ ) ≠ 0 \frac{\delta F}{\delta y(\hat x)}\neq0 δy(x^)δF=0, Then you can take a function η ( x ) \eta(x) η(x) bring ϵ η ( x ^ ) δ F δ y ( x ^ ) > 0 \epsilon\eta(\hat x)\frac{\delta F}{\delta y(\hat x)}>0 ϵη(x^)δy(x^)δF>0 And when x ≠ x ^ x\neq\hat x x=x^ From time to tome η ( x ) = 0 \eta(x)=0 η(x)=0. therefore , You can push the following formula , namely Euler - The Lagrangian equation :
∂ G ∂ y − d d x ( ∂ G ∂ y ′ ) = 0 \frac{\partial G}{\partial y}-\frac{d}{dx}\left(\frac{\partial G}{\partial y'}\right)=0 ∂y∂G−dxd(∂y′∂G)=0 for example , about
Euler - The Lagrange equation is
in addition , If G G G Only with y y y of , Ozra - The Lagrange equation is ∂ G ∂ y ( x ) = 0 \frac{\partial G}{\partial y(x)}=0 ∂y(x)∂G=0 ( To any x x x establish )
Example of variational method : Find the shortest path between two fixed points

- As shown in the above figure, the path is an arbitrary path , Let's take a small segment of micro elements in the area d s ds ds, It is easy to calculate that the length of the infinitesimal segment is :
d s ≈ ( d x ) 2 + ( d y ) 2 = 1 + y ′ 2 d x ds\approx\sqrt{(dx)^2+(dy)^2}=\sqrt{1+y'^2}dx ds≈(dx)2+(dy)2=1+y′2dx The total path length obtained by integration is :
F [ y ] = ∫ x 1 x 2 d s = ∫ x 1 x 2 1 + y ′ 2 d x F[y]=\int_{x_1}^{x_2}ds=\int_{x_1}^{x_2}\sqrt{1+y'^2}dx F[y]=∫x1x2ds=∫x1x21+y′2dx The above path length is y y y Of functional , among G = 1 + y ′ 2 G=\sqrt{1+y'^2} G=1+y′2, So there is
∂ G ∂ y = 0 d d x ( ∂ G ∂ y ′ ) = d d x ( y ′ 1 + y ′ 2 ) = 1 + y ′ 2 y ′ ′ − y ′ y ′ 1 + y ′ 2 y ′ ′ 1 + y ′ 2 = y ′ ′ ( 1 + y ′ 2 ) 3 2 \frac{\partial G}{\partial y}=0\\ \frac{d}{dx}\left(\frac{\partial G}{\partial y'}\right)=\frac{d}{dx}\left(\frac{y'}{\sqrt{1+y'^2}}\right)=\frac{\sqrt{1+y'^2}y''-y'\frac{y'}{\sqrt{1+y'^2}}y''}{ {1+y'^2}}=\frac{y''}{ {(1+y'^2)^{\frac{3}{2}}}} ∂y∂G=0dxd(∂y′∂G)=dxd(1+y′2y′)=1+y′21+y′2y′′−y′1+y′2y′y′′=(1+y′2)23y′′ Substitute Euler - Lagrange equation can be obtained
y ′ ′ = 0 y''=0 y′′=0 This ordinary differential equation is easy to get y y y The general solution is y = c 1 x + c 2 y=c_1x+c_2 y=c1x+c2. This also really shows that the way to minimize the distance between two points on the same plane is a line segment
References
- Bishop, Christopher M., and Nasser M. Nasrabadi. Pattern recognition and machine learning. Vol. 4. No. 4. New York: springer, 2006.
- 【PRML】【 Pattern recognition and machine learning 】【 A formula derived from zero 】 Variation
- Introduction to variational method Part 1.(Calculus of Variations)
- 【 Variational calculation 1】 Euler - The Lagrangian equation
边栏推荐
- “如今,99.9% 以上的代码都是垃圾!”
- USB Type-C PD CC逻辑芯片中的角色定义
- curl命令详解[通俗易懂]
- MySQL 66 questions, 20000 words + 50 pictures, including (answer analysis)
- Rust中的dyn关键字
- leetcode:剑指 Offer II 115. 重建序列【图论思维 + 入度考虑 + 拓扑排序】
- LeetCode_动态规划_中等_120.三角形最小路径和
- Web page basic template
- 传奇架设 GEE引擎教程 配置微端
- The difference between function and method in rust
猜你喜欢

Research and implementation of network multi exit design based on policy routing deployment

没有发现必备补丁文件‘NewopUI.pak’?

配置Gom引擎登录器出现错误提示:没有发现必备补丁文件!

CSDN定制T恤等你来拿,《新程序员》福利来袭!

ContextLoaderListener vs DispatcherServlet

The larger the convolution kernel, the stronger the performance? An interpretation of replknet model

TwinCAT 3 首次运行报错4115

MySQL7种JOIN(图)

Trust finds the maximum value in the array

【216】go语言标准库包名
随机推荐
Analyze optimism replay contract address attack events
Salary high voltage line
网页基础模版
CSDN定制T恤等你来拿,《新程序员》福利来袭!
配置Gom引擎登录器出现错误提示:没有发现必备补丁文件!
curl命令详解[通俗易懂]
"Nowadays, more than 99.9% of the code is garbage!"
Keras II classification problem
WARNING: Your password has expired.Password change required but no TTY available.
Redis数据丢失问题
【216】go语言标准库包名
测试开发面经
Tapdata 与优炫数据库完成产品兼容性互认证
没有发现必备补丁文件‘NewopUI.pak’?
TwinCAT 3 first run error 4115
机器学习(9)——特征工程(3)(补充)
curl get&post
Seata
MinGW-w64的安装及配置教程
Comparison of several operation and maintenance tools