Finding an Interval for Intermediate Value Theorem

19 ビュー (過去 30 日間)
Jarrett Packwood
Jarrett Packwood 2022 年 2 月 25 日
回答済み: Piyush Patil 2023 年 10 月 5 日
How could you calculate an interval of a function that would work for the intermediate value theorem? Basically, how could you calculate the interval [a,b] such that f(a) > 0 and f(b) < 0,or that f(a) < 0 and f(b) > 0. I'm looking to use IVT to solve for the root of a function.

回答 (1 件)

Piyush Patil
Piyush Patil 2023 年 10 月 5 日
Hello Jarrett,
As per my understanding you want to find an interval [a, b] for function "f" such that "f(a)" and "f(b)" are of opposite signs, so that it guarantees that there is at least one root of the function in the interval [a, b], given that "f(x)" is continuous.
I suggest you to perform the following steps to find an interval:
  1. Assign any random values to "a" and "b" and evaluate the function at these points.
  2. If "f(a)" and "f(b)" are of same sign, then increase the value of "a" by some fraction and decrease the value of "b" by some fraction. Repeat this until "f(a)" and "f(b)" are of opposite sign.
  3. If "f(a)" and "f(b)" are of opposite sign, then that is the interval [a, b].
I suggest you to refer the following link to know more about how to find the roots between given interval:
Please check the following MATLAB Answer where similar question was asked:
I hope this resolves the issue you are facing.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by