牛顿迭代法(MATLAB)求个问题用牛顿迭代法求方程 X^x=10 的一个实根.精度要求为ε=〖10〗^(-6).哪位达人帮忙给出这个问题的MATLAB求解的代码和结果
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/29 00:08:46
牛顿迭代法(MATLAB)求个问题用牛顿迭代法求方程 X^x=10 的一个实根.精度要求为ε=〖10〗^(-6).哪位达人帮忙给出这个问题的MATLAB求解的代码和结果
牛顿迭代法(MATLAB)求个问题
用牛顿迭代法求方程 X^x=10 的一个实根.精度要求为ε=〖10〗^(-6).
哪位达人帮忙给出这个问题的MATLAB求解的代码和结果
牛顿迭代法(MATLAB)求个问题用牛顿迭代法求方程 X^x=10 的一个实根.精度要求为ε=〖10〗^(-6).哪位达人帮忙给出这个问题的MATLAB求解的代码和结果
x=10^(1/x),
{"浠f崲娆℃暟","x鍊?},
{1,10.0000000000},
{2,1.25892541179},
{3,6.2277079027},
{4,1.44734718383},
{5,4.9081658429},
{6,1.59860842235},
{7,4.22225110674},
{8,1.72520411363},
{9,3.79875738892},
{10,1.83334406211},
{11,3.51116592745},
{12,1.92666265812},
{13,3.30394053156},
{14,2.00756162740},
{15,3.14859436240},
{16,2.07779186863},
{17,3.02886668640},
{18,2.13873261347},
{19,2.93471971603},
{20,2.19153314320},
{21,2.85957547453},
{22,2.23718684977},
{23,2.79891643939},
{24,2.27657058379},
{25,2.74952195010},
{26,2.31046603117},
{27,2.70902563673},
{28,2.33957197630},
{29,2.67564573598},
{30,2.36451218146},
{31,2.64801362230},
{32,2.38584135304},
{33,2.62506071440},
{34,2.40405040970},
{35,2.60594145898},
{36,2.41957157870},
{37,2.58997938804},
{38,2.43278348440},
{39,2.57662838939},
{40,2.44401621907},
{41,2.56544428592},
{42,2.45355631677},
{43,2.55606357487},
{44,2.46165153774},
{45,2.54818725296},
{46,2.46851538330},
{47,2.54156832789},
{48,2.47433128379},
{49,2.53600205167},
{50,2.47925642595},
{51,2.53131819714},
{52,2.48342520677},
{53,2.52737489126},
{54,2.48695231719},
{55,2.52405365052},
{56,2.48993547067},
{57,2.52125535571},
{58,2.49245779954},
{59,2.51889696841},
{60,2.49458994625},
{61,2.51690883855},
{62,2.49639187875},
{63,2.51523248701},
{64,2.49791445950},
{65,2.51381877237},
{66,2.49920079634},
{67,2.51262637057},
{68,2.50028740205},
{69,2.51162051052},
{70,2.50120518701},
{71,2.51077192031},
{72,2.50198030717},
{73,2.51005594698},
{74,2.50263488691},
{75,2.50945182032},
{76,2.50318763452},
{77,2.50894203607},
{78,2.50365436536},
{79,2.50851183865},
{80,2.50404844615},
{81,2.50814878687},
{82,2.50438117188},
{83,2.50784238904},
{84,2.50466208539},
{85,2.50758379614},
{86,2.50489924804},
{87,2.50736554369},
{88,2.50509946890},
{89,2.50718133442},
{90,2.50526849875},
{91,2.50702585529},
{92,2.50541119412},
{93,2.50689462329},
{94,2.50553165610},
{95,2.50678385556},
{96,2.50563334760},
{97,2.50669035984},
{98,2.50571919256},
{99,2.50661144214},
{100,2.50579165970},
{101,2.50654482888},
{102,2.50585283331},
{103,2.50648860124},
{104,2.50590447309},
{105,2.50644113972},
{106,2.50594806465},
{107,2.50640107745},
{108,2.50598486216},
{109,2.50636726075},
{110,2.50601592439},
{111,2.50633871586},
{112,2.50604214518},
{113,2.50631462086},
{114,2.50606427906},
{115,2.50629428201},
{116,2.50608296299},
{117,2.50627711372},
{118,2.50609873469},
{119,2.50626262173},
{120,2.50611204804},
{121,2.50625038881},
{122,2.50612328623},
{123,2.50624006280},
{124,2.50613277269},
{125,2.50623134643},
{126,2.50614078047},
{127,2.50622398879},
{128,2.50614754005},
{129,2.50621777806},
{130,2.50615324598},
{131,2.50621253547},
{132,2.50615806250},
{133,2.50620811009},
{134,2.50616212824},
{135,2.50620437454},
{136,2.50616556023},
{137,2.50620122128},
{138,2.50616845726},
{139,2.50619855955},
{140,2.50617090271},
{141,2.50619631273},
{142,2.50617296697},
{143,2.50619441614},
{144,2.50617470946},
{145,2.50619281519},
{146,2.50617618034},
{147,2.50619146379},
{148,2.50617742194},
{149,2.50619032304},
{150,2.50617847000},
{151,2.50618936011},
{152,2.50617935470},
{153,2.50618854728},
{154,2.50618010149},
{155,2.50618786116},
{156,2.50618073187},
{157,2.50618728198},
{158,2.50618126400},
{159,2.50618679309},
{160,2.50618171317},
{161,2.50618638040},
{162,2.50618209233},
{163,2.50618603205},
{164,2.50618241239},
{165,2.50618573799},
{166,2.50618268255},
{167,2.50618548977},
{168,2.50618291061},
{169,2.50618528024},
{170,2.50618310311},
{171,2.50618510337},
{172,2.50618326561},
{173,2.50618495408},
{174,2.50618340278},
{175,2.50618482805},
{176,2.50618351857},
{177,2.50618472167},
{178,2.50618361631},
{179,2.50618463187},
{180,2.50618369881},
{181,2.50618455607},
{182,2.50618376845},
{183,2.50618449209},
{184,2.50618382724},
{185,2.50618443808},
{186,2.50618387686},
{187,2.50618439248},
{188,2.50618391875},
{189,2.50618435400},
{190,2.50618395411},
{191,2.50618432151},
{192,2.50618398396},
{193,2.50618429409},
{194,2.50618400915},
syms x
f=x^x-10;
df=diff(f,x);
eps=1e-6;
x0=10;
cnt=0;
MAXCNT=200; %最大循环次数
while cnt
if (...
全部展开
syms x
f=x^x-10;
df=diff(f,x);
eps=1e-6;
x0=10;
cnt=0;
MAXCNT=200; %最大循环次数
while cnt
if (abs(x1-x0)
end
x0=x1;
cnt=cnt+1;
end
if cnt==MAXCNT
disp '不收敛'
else
vpa(x1,8)
end
得到结果:
x1 =
2.5062
收起