Solve equation f(x)=0

This software solves the equation f(x)=0 by the dichotomy method. This program can also be used to solve the equation y = f(x). Indeed, it is often very useful to be able to calculate x for a given value of y. In this case, the equation to be solved by the program is : f(x) - y = 0.

picture from wikipedia

Manual :

1- install R programming language.

2- download the software

3- edit the dichotomy_0-01.r file you will see this part at the begining of the file :

# is a comment

# Edit a and b so f(a)>0 and f(b)<0 or vice versa

a <- 0.1

b <- 100

# Edit the accuracy = b-a

accuracy <- 0.01

my_function <-function(x) {

# edit your function here y=f(x)

y <- -3*x^2 + 2*x+5

return(y)

}

4- modify the values for a and b so f(a) and f(b) have opposite signs. In other words, f(x) must cross the X axis between a and b.

5- modify the line y <- -3*x^2 + 2*x+5 to match you equation

6- start R program.

7- load the equation software using the command <source("path to the programme file")>

for example : source("dichotomy_0-01.r")

the program will solve the equation automatically :)