Skip to content

A program written in Julia for solving minimisation problems using bisection

Notifications You must be signed in to change notification settings

taoo0316/bisection-minimisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

bisection-minimisation

A program written in Julia for solving minimisation problems using bisection

Algorithm

Screenshot 2023-03-28 at 11 20 31 AM

The program takes in four arguments: the first derivative of the objective function, the lower bound, the upper bound and the error tolerance.

It returns the approximate solution x and the number of iterations.

To run the program easily, you might want to check out the online Julia compiler and interpreter by Replit.

Alternatively, run julia main.jl from the terminal. The results are printed as follows:

The approximate minimal point of the function is x ≈ 2.0786
The bisection method took 15 iterations.

To visualise the algorithm at work, one can perhaps keep track of the points visited when running the program (use print statements to log the x value for each iteration) and plot them on the graph of the objective function.

Screenshot 2023-03-28 at 12 16 47 PM

Screenshot 2023-03-28 at 12 16 29 PM

These are created using Desmos, keeping track of all 15 iterations of the program.

About

A program written in Julia for solving minimisation problems using bisection

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages