Finish ps16-3

This commit is contained in:
orosmatthew 2024-04-09 12:50:41 -04:00
parent fff1d92191
commit af9d25ffe8

View File

@ -28,7 +28,10 @@ def cot(x):
def func(z: float) -> float:
first = np.sqrt((z0 / z) ** 2 - 1)
second = cot(z)
return first - second
return first + second
print(find_root(func, 6.2, 6.4, max_iter=1000))
print(find_root(func, 0.1, 3, max_iter=1000))
print(find_root(func, 3.1, 6, max_iter=1000))
print(find_root(func, 6.1, 8, max_iter=1000))
print(find_root(func, 10, 12, max_iter=1000))