This commit is contained in:
2025-06-10 14:29:12 +08:00
parent 0d7b89e21d
commit 68eb32f618
15 changed files with 23 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ def f(x):
def df(x):
return 2*x
# 牛顿方法求解方程
def NewtonSolve(fx, dfx, x0, err, N0):
count = 0
x1 = x0 + 1 + err
@@ -21,6 +21,7 @@ def NewtonSolve(fx, dfx, x0, err, N0):
x0 = x1
return x1, 1
# 查找根区间
def FindRootZone(fx,start,stop,step):
x = start
while x < stop: