Answer

问题及解答

求 $x^5-4x^3-5=0$ 的根

Posted by haifeng on 2023-06-03 19:33:56 last update 2023-06-03 20:14:59 | Edit | Answers (0)

设 $f(x)=x^5-4x^3-5$, 则 $f'(x)=5x^4-12x^2$. 令

\[
x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}
\]

>> :mode polyn
Switch into polynomial mode.

>> diff(x^5-4x^3-5)
out> 5x^4-12x^2

------------------------

>> (x^5-4x^3-5)/(5x^4-12x^2)
in> (x^5-4x^3-5)/(5x^4-12x^2)

out>
 quotient> q(x) = 1|5x
remainder> r(x) = -8|5x^3-5

1|5x^1
------------------------

 


>> printRecursiveSeries(4/5*x_n+(8/5*x_n^3+5)/(5*x_n^4-12*x_n^2),x_n,1,100,\n,linenumber)
[1]     1
[2]     -0.1428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571429
[3]     -20.68684146042636608674344523401127174712080372457730948296986032835089438863023768684146042636608673092
[4]     -16.565023688617589109177537826433863432338260623780573240602345316225300420691945262445633989624803938736
[5]     -13.2714938151392127327086618324645366416606984746301979545605997238256662746354987884645019492889088259888
[6]     -10.64160729106856435253004280224457254617986844856116673479583215765055870684575566382988446238459617659104
[7]     -8.543927904421098082103266940566651336467393310841794835891510921669912488167846412120893765286900283972832
[8]     -6.8736750146567822836834747098409137278847103761224278023001309485647375068881413772811833775034090294782656
[9]     -5.54751385154459757117959853911308426694533117603318730701466364274880256207172022811686144943490408568261248
[10]    -4.499428383849649530577659730552688681850614839831792743978496600619449792627229845215124665110187212646089984
...  ...
[95]    -1.7523882613158145756642021439965730423292471867922368214477915180260352744599353088675504105795106405000000039951342135619708337669405749916685322147717924146834921482445434074138489452088000512
[96]    -1.75238826131581457566420214399657304232924718679223682144779151802603527445993530886755041057951064050000000319610737084957666701355245999333482577181743393174679371859563472593107915616704004096
[97]    -1.752388261315814575664202143996573042329247186792236821447791518026035274459935308867550410579510640500000002556885896679661333610841967994667860617453947145397434974876507780744863324933632032768
[98]    -1.7523882613158145756642021439965730423292471867922368214477915180260352744599353088675504105795106405000000020455087173437290668886735743957342884939631577163179479799012062245958906599469056262144
[99]    -1.75238826131581457566420214399657304232924718679223682144779151802603527445993530886755041057951064050000000163640697387498325351093885951658743079517052617305435838392096497967671252795752450097152
[100]   -1.752388261315814575664202143996573042329247186792236821447791518026035274459935308867550410579510640500000001309125579099986602808751087613269944636136420938443486707136771983741370022366019600777216

 

 

>> x=-1.752388261315814575664202143996573042329247186792236821447791518026035274459935308867550410579510640500000001309125579099986602808751087613269944636136420938443486707136771983741370022366019600777216
----------------------------
 type: double
 name: x
value: -0
--------------------
>> (x)^5-4*(x)^3-5
in> (-1.752388261315814575664202143996573042329247186792236821447791518026035274459935308867550410579510640500000001309125579099986602808751087613269944636136420938443486707136771983741370022366019600777216)^5-4*(-1.752388261315814575664202143996573042329247186792236821447791518026035274459935308867550410579510640500000001309125579099986602808751087613269944636136420938443486707136771983741370022366019600777216)^3-5

out> 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100246145459086898585802895870188576837095998950884918298641158723559282188775705998581874986989258205424303464763848840790191389632164176548802253105448816681594005165936343156722773516711893034676728450651453570649817816469002947814009596245777511620864799261738696376838799747784277730251509134065093393799300694265837562131421519346343974503745560305120305614651107308855715555811229082159622948908292166108381373370499489108074739974508281096479430654358092447625637625382610938780421530534478487833251837308685695313740517610641168059282723155215195454469839074609502737089508716321411361434807371548709509131679916412796742165441812738587766584562366496393623176677562279651152507508747918974460653536570760308781440856424720183327725525430635283070792546407203728655490798266409749217358117945684603185503201696956723823148920764841223782621217436808496957051984681847936038599655424
------------------------