GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Getteli/Bisection-method-in-Python: FORK - We use bisection method to find zeroes of an equation.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bisection.py
bisection.py
 
 

Repository files navigation

Bisection method of solving an equation

It is a quite simple method of solving an equation numerically in cases where the exact solution is difficuilt to find. In this method we repetedly bisect an interval into halves until we reach the desired accuracy. It is a consequence of well known mean value theorem of calculus.

I have used the equation x - cos(x) = 0 as a demonstration. This problem is also on the book "Quantum Mechanics" of Schaum Outlines page 256. They have done that in FORTRAN though while my code is on Python (2.7.13). My C version of the same problem can be found here.

The code was written under Debian GNU/Linux in Python IDLE under Python.

$ python --version
Python 2.7.13

Here's the code running. The value obtained after 16 iterations can be verified with the book or other sources as well. Also note that we obtained exactly the same value using C as well. N

USAGE

If your maximum iterations is say 20 then you can use,

python bisection.py 20

Alternatively you can also chmod +x bisection.py and then

./bisection.py 20

LICENSE

GNU_GPL_v3.0

Totally RMS approved! While you're at it, please check out GNU and Free Software Foundation as well!

About

FORK - We use bisection method to find zeroes of an equation.

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.