Skip to content

Latest commit

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NumericalMethods

Java examples of Numerical Methods to calculate the root of a function.

The available algorithms are:

  1. Newton Raphson
  2. Bisection (Binary Search)
  3. Fixed Point
  4. False Position

To run the examples, you must specify the algorithm and its corresponding input values in a properties file including the equation. Under examples directory, you'll find a directory per algorithm with a script that runs the corresponding examples. If you want to run the algorithms with another polynomial, please create your own properties file with the necessary parameters for the given algorithm and pass it to the jar when running it.

Note.- The only types of equations supported are polynomials of the form C0 + C1x + C2x^2 ... Cnx^n where n is the degree of the equation and C0 is the constant, with integer exponents. Also Fixed Point calculates iterator function g(x) automatically after generalizing the expression using the degree of the function. Therefore there's no need to implement g(x) unless extending support to other type of equations that are not polynomials.

Supported properties

propertydescriptionexample(s)
methodalgorithm used to compute the rootFalse Position, Bisection, Newton Raphson, Fixed Point
polynomialexpression representing the input equationx^3 + x^2 - 10
epsilonerror tolerance0.0001, 1e-4
iterations_limitdesired limit of iterations20
initial_valuestarting value of x-0.7
lower_limitlower limit of x-3.5
upper_limituppper limit of x10

About

Java examples of Numerical Methods to calculate the root of a function. Supported algorithms are Newton Raphson, Bisection, Fixed Point and False Rule.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages