Skip to content

Baranll0/BisectionMethod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Numerical Analysis

What is Bisection Method?

The bisection method is one of the implicit methods used to find roots. An attempt is made to find the root with a lower and upper value containing the root. If the value of a function changes from - to + or from + to -, then that function value becomes zero at some point in this transition.


What did I do in this app?

We perform the root of the equation 𝑥**3 − 2*(x**2) − 5 = 0 in the interval [2,4] with the method in 4 iterations.
 x**3 +4*(x**2)-10=0 in the interval [1,2] until the margin of error relative to the solution is ε = 10**-6 by the method of dividing the root by two we will continue.


Tech I use:


Modules I use:


Declaration:

      -Let's define a function for the equation.
      -Next, let's define the function of the Bisection method and code the algorithm of the Bisection method.
      -Then let's get the "lower range", "upper range" and "number of iterations" values from the user.
      -But there is one thing we should be careful about: the product of the value of the function in the lower range and the value of the function in the upper range        must be less than 0!
      -If it is less than zero, we can call the function.
  
      If we talk about the algorithm of the bisection method:
         -First we define an i variable value. This i value will be important for the loop we will use later.
-Then we define an x value and this x value will hold the value of (upper + lower)/2 in the bisection method. We set the value 0 at the beginning.
-We set the loop and x We update xi as =(lower range+upper range)/2.
-If the value of x in the function is less than zero, lower bound=x, otherwise upper bound=x.
-Then i for the loop to continue We increase its value.

I look forward to your ideas and thoughts. Enjoy your work!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages