)A=[-4100;1-410;01-41;001-4];b=[-3;-2;-2;-3];x0=[0;0;0;0];>>[x,k]=SORmethod(A,b,x0,10000,10^(-6),1.1)x=1.00001.00001.00001.0000k=8附录6Runge-Kutta4阶算法程序代码functionR=Rungkuta4(f,a,b,n,ya)%f:微分方程右端函数句柄%a,b:自变量取值区间的两个端点%n:区间等分的个数%ya:函数初值y(a)%R=[x',y']:自变量X和解Y所组成的矩阵h=(b-a)/n;x=zeros(n+1);y=zeros(1,n+1);x=a:h:b;y(1)=ya;fori=1:nk1=h*feval(f,x(i),y(i));k2=h*feval(f,x(i)+h/2,y(i)+k1/2);k3=h*feval(f,x(i)+h/2,y(i)+k2/2);k4=h*feval(f,x(i)+h,y(i)+k3);y(i+1)=y(i)+(k1+2*k2+2*k3+k4)/6;endR=[x',y'];附录7求解题目5程序代码f=@(x,y)-20*y;R=Rungkuta4(f,0,1,10,1)R=01.00000.10000.33330.20000.11110.30000.03700.40000.01230.50000.00410.60000.00140.70000.00050.80000.00020.90000.00011.00000.0000f=@(x,y)-20*y;R=Rungkuta4(f,0,1,5,1)R=1.0e+003*00.00100.00020.00500.00040.02500.00060.12500.00080.62500.00103.1250