您的当前位置:首页正文

迭代求解

2024-10-18 来源:威能网
1、 将方程x5 +5x3– 2x + 1 = 0 改写成各种等价的形式进行迭代,观察迭代是否收敛,并给

出解释。 (1) 画图: x1=-6:0.01:6; x2=-3:0.01:3; x3=-1:0.01:1;

x4=-0.8:0.01:-0.75;

y1=x1.^5 +5*x1.^3-2*x1+1; y2=x2.^5 +5*x2.^3-2*x2+1; y3=x3.^5 +5*x3.^3-2*x3+1; y4=x4.^5 +5*x4.^3-2*x4+1; subplot(2,2,1),plot(x1,y1) ,title('子图 (1)') ,grid on, subplot(2,2,2),plot(x2,y2) ,title('子图 (2)'),grid on, subplot(2,2,3),plot(x3,y3) ,title('子图 (3)'),grid on, subplot(2,2,4),plot(x4,y4) ,title('子图 (4)') ,grid on,

由图可知 x 的初值应在(-0.78,0.76)之间。 (2)解:第一步 构造迭代函数

xf(x)

x55x31x xf1(x)

2121xx32 xf2(x)

55x5x521x32 xf3(x)

xxx第二步

利用加速迭代收敛法变形后:

4x510x31x xf1(x)

25x415x22x64x23xx3 xf2(x) 55x3x2x22x8x2x5 xf3(x)

x5x36x1第三步 迭代

设定初值

x00.75

xn1f(xn)n=0,1,2,3………

用 MATLAB 编程 x=-077;y=-0.77;z=-0.77; for k=1:30

x=(-4*x^5-10*x^3+1)/(2-5*x^4-15*x^2); y=(2*y^6+4*y^2-3*y)/(5*y^3+3*y^5+2*y-2); z=(8*z^2-2*z)/(z^5+5*z^3+6*z-1); x,y,z; end

迭代结果为: x =

-61.5948 y =

-0.7685 x =

-49.2694 y =

-0.7685 x =

-39.4074

y =

-0.7685 x =

-31.5158 y =

-0.7685 x =

-25.2000 y =

-0.7685 x =

-20.1442 y =

-0.7685 x =

-16.0957 y =

-0.7685 x =

-12.8521 y =

-0.7685 x =

-10.2512 y =

-0.7685 x =

-8.1634 y =

-0.7685 x =

-6.4844 y =

-0.7685 x =

-5.1311 y =

-0.7685 x =

-4.0373 y =

-0.7685 x =

-3.1508

y =

-0.7685 x =

-2.4323 y =

-0.7685 x =

-1.8546 y =

-0.7685 x =

-1.4028 y =

-0.7685 x =

-1.0737 y =

-0.7685 x =

-0.8700 y =

-0.7685 x =

-0.7840 y =

-0.7685 x =

-0.7689 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685

y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 x =

-0.7685 y =

-0.7685 >>

因此方程的解为 -0.7685. 本人亲自修改

因篇幅问题不能全部显示,请点此查看更多更全内容