The doctor asked me to do it, but based on the estimated error, not the error, and it was resolved successfully. Thank you very much for this wonderful video, sir.😍
def False_Position_Method(func,a,b,error_accept): """ This function solves for an unknown root of non-linear funktion given the function, the initial root boundaries, and an acceptable level of error. Parameters ---------- func : The user defined function, witch needs to be entered as a string. a : The inital lower root boundray. b : The inital upper root boundray. error_accept : The user's acceptable level of error Returns ------- f : The root boundraies and the error at the final iteration. """
Love the video! Very clearly and professionally explained.
The doctor asked me to do it, but based on the estimated error, not the error, and it was resolved successfully. Thank you very much for this wonderful video, sir.😍
this video is just next level thank you so much
so helpful tanks
Thank you !
thank you alot
def False_Position_Method(func,a,b,error_accept):
"""
This function solves for an unknown root of non-linear funktion given the function, the initial root boundaries,
and an acceptable level of error.
Parameters
----------
func : The user defined function, witch needs to be entered as a string.
a : The inital lower root boundray.
b : The inital upper root boundray.
error_accept : The user's acceptable level of error
Returns
-------
f : The root boundraies and the error at the final iteration.
"""
def f(x):
f=eval(func)
return f
i=0
c_before=0
c=(a*f(b)-b*f(a))/(f(b)-f(a))
error=(c-c_before)
while error > error_accept:
c_after=(a*f(b)-b*f(a))/(f(b)-f(a))
if f(a)*f(b)>=0:
print("No root multiple roots present, therefore, the bisection method will not work!")
quit()
elif f(c_after)*f(a)