False Position Method In Python | Numerical Methods

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

ความคิดเห็น • 7

  • @antekkalafior
    @antekkalafior 3 ปีที่แล้ว +1

    Love the video! Very clearly and professionally explained.

  • @developerx962
    @developerx962 3 ปีที่แล้ว

    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.😍

  • @remziogultum6697
    @remziogultum6697 2 ปีที่แล้ว

    this video is just next level thank you so much

  • @amenehameri
    @amenehameri 7 หลายเดือนก่อน

    so helpful tanks

  • @bramgriffioen5436
    @bramgriffioen5436 3 ปีที่แล้ว +1

    Thank you !

  • @developerx962
    @developerx962 3 ปีที่แล้ว +1

    thank you alot

  • @samramzi4639
    @samramzi4639 ปีที่แล้ว

    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)