Newton Rapson Method
Newton Rapson Method
import numpy as np
def f(T):
T0, Ti = T
def jacobian(T):
T0, Ti = T
df1_dTi = 3600
df2_dT0 = -3600
# Newton-Raphson method
T = np.array([T0_guess, Ti_guess])
for i in range(max_iter):
F = f(T)
J = jacobian(T)
return T
import numpy as np
return x1
return x1
return x1
def solve_system_secant():
# Initial guesses
T0_0 = 1300.0
T0_1 = 1400.0
Ti_0 = 1200.0
Ti_1 = 1250.0
return T0, Ti
return T0, Ti