Rapport 2IA - El Atyqy Omar
Rapport 2IA - El Atyqy Omar
Omar El Atyqy
November, 2021
Abstract
This report will focus on the three root finding methods seen in class,
their operating principles, some implementation proposals on Python as well
as the results obtained. The report will end with a comparison between the
different execution times of every algorithm seen up until now.
1 - Objective Function:
The benchmark for every method will be run on the following function:
f (x) = x2 + 78x + 65
Plotting f (x) gives us the following graph, proving that it does indeed respect
the uni-modality condition:
1
An analytical search for the function’s minimum returns the following result:
2.1.2 Implementation:
2.1.3 Results:
2
f ′ (x) = f (x+∆x)−f
2∆x
(x−∆x)
This process is iterated through until an acceptable value of precision has been
reached. This method requires the knowledge of the target function only.
2.2.2 Implementation:
2.2.3 Results:
3
2.3.2 Implementation:
2.3.3 Results:
3 - Execution time:
3.1 Execution parameters:
The following parameters were adopted for every optimization method. The la-
beling is as follows:
epsilon: precision
rep: number of times to execute a method to get the average time of execu-
tion
4
3.2 Results:
Here are the results returned by each method put into one graph. As we can see,
the returned minimae are so close to each other, there is practically no observable
difference in the graph:
5
And below is the time comparaison between all methods we’ve seen up until now:
4 Conclusion:
Although the precision of every algorithm is practically the same, the plot above
shows that the fastest of the 10 algorithms are Secant and Newton methods
while the slowest is still the Exhaustive Search.