32最小二乘法的求法 、多项式拟合 取φ,(x)=x(=0,12…,n),则(x)∈Spm{l2x,…,x" a+a1x+∴+ax 0 当n=2、P=1时的情形.由法方程(35)可得 ma+a∑x1+a2∑x2=∑y 方程 ∑x+a∑x2+an∑x=∑yx1(37 特点? a∑x2+a∑x+a2 y 解出a0,a1,a2,就得到拟合公式y=a0+a1x+a2x2取 j j (x) = x ( j = 0,1, , n) ,则 ( ) {1, , , } n x Span x x n n x = a + a x ++ a x 0 1 ( ) (3.6) 3.2 最小二乘法的求法 一、多项式拟合 当 n = 2 、 i 1 时的情形. 由法方程(3.5)可得 + + = + + = + + = = = = = = = = = = = = m i i i m i i m i i m i i m i m i m i i i m i i i n i m i m i i i m i i a x a x a x y x a x a x a x y x ma a x a x y 1 2 1 4 2 1 3 1 1 2 0 1 1 1 1 2 3 0 1 1 1 2 2 1 0 1 (3.7) 解出 0 1 2 a ,a ,a ,就得到拟合公式 2 0 1 2 y = a + a x + a x . 方程 特点?