-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Théorème d'approximation de Weierstrass à l'aide des polynômes…
… de Bernstein .ipynb
- Loading branch information
Showing
1 changed file
with
175 additions
and
0 deletions.
There are no files selected for viewing
175 changes: 175 additions & 0 deletions
175
polynome/Théorème d'approximation de Weierstrass à l'aide des polynômes de Bernstein .ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# **Théorème d'approximation de Weierstrass à l'aide des polynômes de Bernstein**\n", | ||
"\n", | ||
"## **历史背景**:\n", | ||
"\n", | ||
"谢尔盖·纳塔诺维奇·伯恩施坦(俄语:Серге́й Ната́нович Бернште́йн)(1880年3月5日—1968年10月26日)是一位俄国及苏联的数学家. 1912年, Bernstein多项式曾经被用来证明威尔斯特拉斯逼近定理(Weierstrass approximation theorem)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## 预备知识:\n", | ||
"\n", | ||
"- 多项式\n", | ||
"- borne supérieure\n", | ||
"- 一致连续\n", | ||
"\n", | ||
"## 定理叙述(Théorème d'approximation de Weierstrass):\n", | ||
"\n", | ||
"### **Toute fonction continue sur [0,1] est limite uniforme de fonctions polynomiales.**\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"下面我们借助于伯恩斯坦多项式分几步来证明它:\n", | ||
"\n", | ||
"Dans toute la discussion , on identifiera un polynôme et sa fonction polynomiale associée.\n", | ||
"\n", | ||
"Soit $f: [0.1] \\rightarrow \\mathbb{R}$ une application continue. Pour n $\\in \\mathbb{N}^{*}$ , on définie **le $n^{ieme}$ polynôme de Bernstein**\n", | ||
"\n", | ||
"**associé à f** par:\n", | ||
"\n", | ||
"$B_{n}(f)(x) = \\sum_{k=0}^{n}\\binom{n}{k}f(\\frac{k}{n})x^k(1-x)^{n-k}$ \n", | ||
"\n", | ||
" Soit $\\epsilon > 0$ .D'aprè le théoreme de Heine, il existe $\\eta > 0$ tel que pour $(x,y) \\in [0,1]^2$ . si $\\left | x-y \\right | \\le\\eta$ alors $\\left | f(x)-f(y) \\right | \\le\\frac{\\epsilon}{2}.$ \n", | ||
"\n", | ||
"On note $M$ la borne supérieure de $\\{\\left |f(x)\\right| / x\\in [0,1]\\}$ .On se fixe $x\\in [0,1]$ .\n", | ||
"\n", | ||
"\n", | ||
"1.Montrer que \n", | ||
"\n", | ||
" $f(x)-B_{n}(f)(x) = \\sum_{k=0}^{n}\\binom{n}{k}(f(x)-f(\\frac{k}{n}))x^k(1-x)^{n-k}$.(facile)\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"2.(a)Montrer que\n", | ||
"\n", | ||
"$\\sum_{0\\le k\\le n, \\left | x-\\frac{k}{n} \\right | \\color{blue}{\\le}\\eta}\\binom{n}{k}\\left|(f(x)-f(\\frac{k}{n}))\\right|x^k(1-x)^{n-k}\\le\\frac{\\epsilon}{2}$.(facile)\n", | ||
"\n", | ||
"2.(b)Montrer que \n", | ||
"\n", | ||
" $\\sum_{0\\le k\\le n, \\left | x-\\frac{k}{n} \\right | \\color{red}{>}\\eta}\\binom{n}{k}\\left|(f(x)-f(\\frac{k}{n}))\\right|x^k(1-x)^{n-k}\\le\\frac{2M}{\\eta^2}\\sum_{k=0}^{n}\\binom{n}{k}(x-\\frac{k}{n})^2x^k(1-x)^{n-k}$\n", | ||
"(facile)\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"3.Calculer $B_{n}(t\\mapsto t)(x)$ et $B_{n}(t\\mapsto t^2)(x)$.On pourra introduire $S: y\\mapsto (y+1-x)^n$ .(difficile,提示:利用好新引入的变量y与x的区别,试试展开S以及对分别对展开前后的S关于y求导,比照与要计算式子的区别并乘上缺的x幂次)\n", | ||
"\n", | ||
"4.Montrer que \n", | ||
"\n", | ||
"$\\sum_{0\\le k\\le n, \\left | x-\\frac{k}{n} \\right | \\color{red}{>}\\eta}\\binom{n}{k}\\left|(f(x)-f(\\frac{k}{n}))\\right|x^k(1-x)^{n-k}\\le\\frac{M}{2\\eta^2 n}$.\n", | ||
"(difficle+,要利用2(b)和3中的结论,试着展开2(b)不等式右边的(x-k/n)^2项,并试着代入3中求得的两个式子)\n", | ||
"\n", | ||
"5.Prouver que pour $\\epsilon>0$ ,il existe $N\\in \\mathbb{N}$ tel que pour $x\\in [0,1],\\left|f(x)-B_{n}(f)(x)\\right|\\le \\epsilon.$ (difficile+,注意这里是对整个的$x\\in[0,1]$ ,利用2(a)和4中的结论)\n", | ||
"\n", | ||
"On dit que f est approchée uniformément sur [0,1] par les polynomes $B_{n}(f)$.\n", | ||
"\n", | ||
"## 衍生:\n", | ||
"\n", | ||
"(转自网络,略有改动,可供参考。需要一点对概率的认识)\n", | ||
"\n", | ||
"假设你在做一个实验,成功的概率是u ,就像掷一枚偏心的硬币或玩一个偶然的游戏。如果你连续尝试这个实验 n 次,你成功的次数正好是 i 次,那么你成功的概率是多少?\n", | ||
"\n", | ||
"你应该知道或者能够确定答案是:\n", | ||
"\n", | ||
"![img](http://p2.itc.cn/images01/20200609/0d87dbd9da704e4d976750b868ccea90.jpeg)\n", | ||
"\n", | ||
"而这,其实就是Bernstein多项式.\n", | ||
"\n", | ||
"其中:\n", | ||
"\n", | ||
"![img](http://p4.itc.cn/images01/20200609/bced0b22742f434a8ff531acf809462b.jpeg)\n", | ||
"\n", | ||
"在这里: 我们是把视角从固定概率和可变成功次数转移到固定成功次数和可变概率上。\n", | ||
"\n", | ||
"从定义中,有几件事应该马上就能明白。首先,这是一个多项式。同时,对于[0,1]范围内的u,多项式的值是非负数,并且不超过1( 既然我们可以将它们解释为概率 )。\n", | ||
"\n", | ||
"此外,我们可以直观地看到它的表现。具体来说,我们把n=100,i=40 。所以我们要求的是通过尝试100次,正好得分40次成功的可能性。\n", | ||
"\n", | ||
"现在,很明显,如果概率u恰好是u=0.4 ,那么在40%的尝试中成功的可能性应该是合理的(事实上,获得精确的40次成功的可能性大约是8%,这听起来不大,但它比使用其他u值要好得多)。\n", | ||
"\n", | ||
"另一方面,如果u远离0.4,那么这个概率很快就会变得小得离谱。例如,想象一下,u正好是0.7 。那么你就会期望70次成功。得到60次似乎不太可能,但仍有可能,但得到50次是非常意外的,应该是极其罕见的,而40次成功是你永远也想不到会发生的。事实上,在概率为0.7的情况下,40次成功的可能性不到十亿分之一。\n", | ||
"\n", | ||
"这对我们的多项式意味着什么?意味着给定的n,i,多项式的值非常强烈地集中在u最可能的值周围,也就是i/n。事实上,这里有一张在0≤u≤1范围内的$b_{100,40}(u)$的图。\n", | ||
"\n", | ||
"![img](http://p9.itc.cn/images01/20200609/13c9646aaee54baa84ee17afaa3eba00.jpeg)\n", | ||
"\n", | ||
"当我们增加n的值时,钟形变的更窄:试验次数越多,成功次数越不可能明显偏离预期值。\n", | ||
"\n", | ||
"因此,多项式的峰值总是在u=i/n处,并迅速向左和向右衰减。这就是伯恩斯坦多项式的关键作用:**它的行为除在一个特定的点上有一个尖峰外,其他地方都是0,在这种情况下就是i/n** 。伯恩斯坦多项式的总面积并不是1,但是曲线下的总面积(多项式从0到1的积分)很容易被确定为**1/(n+1)**,与i无关。\n", | ||
"\n", | ||
"由于这种性质,Bernstein多项式可以很自然地组合成近似于[0,1]上的任何连续函数。给定这样一个函数f,我们定义一个近似值Bn[f]为:\n", | ||
"\n", | ||
"![img](http://p0.itc.cn/images01/20200609/41c0ed8918b341e3ad84b39463dd0b78.jpeg)\n", | ||
"\n", | ||
"**我们只是在0,1/n,2/n,…1这几个点对函数进行采样,然后将每个采样乘以该点的 “尖峰 “多项式**。\n", | ||
"\n", | ||
"然后我们可以很容易地证明,Bn[f]与f本身并没有太大差别,而且随着n的增长,差别会减小到0,这个结果对所有u都成立。因此,Bernstein多项式为Weierstrass逼近定理提供了明确的证明,该定理指出,连续函数可以被多项式均匀地逼近。\n", | ||
"\n", | ||
"Bernstein多项式还出现在在**贝塞尔曲线**的定义中:贝塞尔曲线的数学基础是早在 1912 年就广为人知的伯恩斯坦多项式。但直到 1959 年,当时就职于雪铁龙的法国数学家 Paul de Casteljau 才开始对它进行图形化应用的尝试,并提出了基于一种数值稳定的 de Casteljau 算法。\n", | ||
"\n", | ||
"然而贝塞尔曲线的得名,却是由于 1962 年另一位就职于雷诺的法国工程师 Pierre Bézier 的广泛宣传。他使用这种只需要很少的**控制点**(测量学和计算机图形学术语:用来控制和调整曲线形状的特殊点)就能够生成复杂平滑曲线的方法,来辅助汽车车体的工业设计。\n", | ||
"\n", | ||
"正是因为控制简便却具有极强的描述能力,贝塞尔曲线在工业设计领域迅速得到了广泛的应用。不仅如此,在计算机图形学领域,贝塞尔曲线一直占有重要的地位。\n", | ||
"\n", | ||
"**n阶贝塞尔曲线的定义**\n", | ||
"\n", | ||
"![img](http://p4.itc.cn/images01/20200609/c37ec22d73b441dba9a2b0980ed92780.jpeg)\n", | ||
"\n", | ||
"比较贝塞尔曲线函数C与之前提到的函数B可以看出, 只要把B函数里面的f替换为**几何点P**,就是贝塞尔曲线的定义了.\n", | ||
"\n", | ||
"**1-2阶贝塞尔曲线:**\n", | ||
"\n", | ||
"n=1:\n", | ||
"\n", | ||
"当n=1的时候可以用来表示直线.\n", | ||
"\n", | ||
"![img](http://p4.itc.cn/images01/20200609/93dddb8768f84c62b8287f72018a678d.jpeg)\n", | ||
"\n", | ||
"<img src=\"http://p1.itc.cn/images01/20200609/0a7d32b540c9457e85497af8315c8f97.gif\" alt=\"img\" style=\"zoom:150%;\" />\n", | ||
"\n", | ||
"n=2:\n", | ||
"\n", | ||
"当n$\\ge$2的时候可以用来表示曲线.\n", | ||
"\n", | ||
"![img](http://p3.itc.cn/images01/20200609/69135bcc8d4e41958240a988f6175f51.jpeg)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |