求大神解“y=x^3-3*x+2 的根”用牛顿法 ( matlab作业)怎么写?
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:数学作业 时间:2024/06/06 06:32:15
求大神解“y=x^3-3*x+2 的根”用牛顿法 ( matlab作业)怎么写?
具体的程序怎么写?
用书中的方法怎么不行?
具体的程序怎么写?
用书中的方法怎么不行?
程序:
clc
clear
x=zeros(1,25);
x(1)=2;
format long
for i=1:24;
x(i+1)=x(i)-(x(i)^3-3*x(i)+2)/(3*x(i)^2-3);
end
disp(x)
迭代结果
Columns 1 through 5
2.000000000000000 1.555555555555556 1.297906602254428 1.155390199213767 1.079562210414361
Columns 6 through 10
1.040288435171016 1.020276809786734 1.010172323431422 1.005094741093271 1.002549528082823
Columns 11 through 15
1.001275305026235 1.000637787960349 1.000318927867230 1.000159472408678 1.000079738323303
Columns 16 through 20
1.000039869691243 1.000019934977174 1.000009967523452 1.000004983765981 1.000002491890589
Columns 21 through 25
1.000001245940288 1.000000622991949 1.000000311543435 1.000000155931967 1.000000077850191
clc
clear
x=zeros(1,25);
x(1)=2;
format long
for i=1:24;
x(i+1)=x(i)-(x(i)^3-3*x(i)+2)/(3*x(i)^2-3);
end
disp(x)
迭代结果
Columns 1 through 5
2.000000000000000 1.555555555555556 1.297906602254428 1.155390199213767 1.079562210414361
Columns 6 through 10
1.040288435171016 1.020276809786734 1.010172323431422 1.005094741093271 1.002549528082823
Columns 11 through 15
1.001275305026235 1.000637787960349 1.000318927867230 1.000159472408678 1.000079738323303
Columns 16 through 20
1.000039869691243 1.000019934977174 1.000009967523452 1.000004983765981 1.000002491890589
Columns 21 through 25
1.000001245940288 1.000000622991949 1.000000311543435 1.000000155931967 1.000000077850191
求大神解“y=x^3-3*x+2 的根”用牛顿法 ( matlab作业)怎么写?
哪位大哥会matlab 帮忙写个程序,用牛顿迭代法求方程X^3-3*x-1=0在2附近的解
就是这样.牛顿法 matlab 求 x^3-x-1=0 在 x=1.5附近的根
请问用Matlab怎么求这个方程y=5x+e^(-x)的解啊?急交作业,谢谢!
y=1/(x^4 + x^3 + x^2 + x + 1)用matlab怎么求(1,2)区间的定积分?要数值解
牛顿法求x.^3-x-1=0在1.5附近的解,MATLAB程序出错求解
怎么用matlab画y^2+x*y+y=x^3+x^2+x+1的图像?
y=x*tan(1/x)sin(x^3)在matlab怎么写是对的?
matlab编x^3-3x-1=0在2附近的根 要求用牛顿迭代法
f=@(x)(3*x+2)的@(x)是什么意思啊,求matlab大神解答
用牛顿迭代法求方程的根:2*x*x*x-4*x*x+3*x-6=0
用牛顿法求e^x-3*x^2=0这个方程的根