通过 Gram-Schmidt 正交化过程 求逼近函数

最近在linear algebra done right中看到的拟合度比泰勒展开更加高的函数方法

泰勒展开在有限维度(finite-dimension)的情况 距离0点近处才更加准确。


Example:

Find a polynomial u with real coefficients and degree at most 5 that approximates sin(x) as well as possible on the interval [-π,π].


Solution:

1.Let u(x) denotes the approximate function.

Hence, make∫[-π,π] |sin(x)-u(x)|²dx as small as possible

2.Let C[-π,π] denotes the real vector space

with inner product:<f,g>=∫[-π,π][f(x)g(x)dx]dx

v∈C[-π,π] defined by v(x)=sinx;

3.Let U denotes the subspace ofC[-π,π]

u∈U defined by u(x) (the approximate function).

4.To find∫[-π,π] |sin(x)-u(x)|²dxas small as possible is to find ||u(x)-v(x)||:

(Here we make the polynomial or in other word the function be the vector (point in other word).)

We know that u has degree at most 5 degree, consequently there is a basis(1, x ,x^2,x^3,x^4,x^5) of U. From the basis and Gram-Schmidt procedure we can get an orthonormal basis.



so the orthonormal basis(e1,e2,……,e5,e6).


5.Use the orthogonal projection

u(x)=PU(v(x))=<v,e1>e1+……+<v,e6>e6

=0.987862x-0.155271x^3+0.00564312x^5.


6.Compared to Taylor series approximation, the Gram-Schmidt has much less error.

Gram-Schmidt :



Taylor series appromation:

ux=x-x^3/3!+x^5/5!




  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值