Finding Maximum Iterations for False Position Method

조회 수: 29 (최근 30일)
Ronnie Walker
Ronnie Walker 2021년 3월 7일
답변: Sarfo 2023년 6월 26일
Hey everyone. I'm a second year ME student currently in a computing techniques class. We just finished discussing Closed and Open methods for root estimation (Bisection, False Postion, etc.). I have to write a code that estimates the root of a function on a given interval using the Bisection Method and the False Postion Method. I know that for the Bisection Method, there's a formula for determining the minimum iterations required to estimate a root with an error below a specified tolerance. I also know that there isn't a formula like that for the False Postion Method. However, in my code I'm running a while loop with two conditons. While the approximate error is greater than the specified tolerance OR when the number of iterations becomes greater than the maximum number of iteration, perform the calculations. My question: is there a way for someone to come up with a reasonable number of iterations to go through before terminating the calculations? Again, I know there isn't a mathematical formula you can use, I'm just looking for a "rule of thumb" so to speak.
I won't be linking my code, unless someone really want's to see it, because this is more a question about a method than how to implement that method into code.
Thanks!
  댓글 수: 1
Jan
Jan 2021년 3월 7일
Note: This is not twitter - no # before the tags. Thanks.

댓글을 달려면 로그인하십시오.

답변 (2개)

Jan
Jan 2021년 3월 7일
The rule of thumb is to limit the runtime to a duration, the user can bear. So waiting for an hour to detect, that the algorithm does not converge, is brute. For problems in homework questions 1000 iterations are save. For very complicated problems 1000 iterations can take some days already.

Sarfo
Sarfo 2023년 6월 26일
b) Use the program to determine roots of these functions on the intervals indicated: f(x)=x²+x²-x-1 g(x)= x³ - 2 sinx h(x) = lnx\x on [1, 2] on [0.5, 2] on [3, 4]

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by