Lab Report 1&2 "Incremental and Newton Methods"

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

People’s Democratic Republic of Algeria

Ministry of Higher Education and Scientific Research

University M’Hamed BOUGARA – Boumerdes

Institute of Electrical and Electronic Engineering


Power Engineering

Numerical Methods (EE472)

Lab report 1&2


“Incremental and Newton methods”

Done by:
MEFLAH Abderrahim Aimane.

Supervisor :
Mr.TERCHI
2019-2020
Introduction:
The most common real-life problems are nonlinear and are not amenable to be handled by
analytical methods to obtain solutions of a variety of mathematical problems. Iterative
methods are the foremost among the methods developed to obtain approximate solutions. The
method of finding a root of the non-linear equations of the form f(x) = 0 where the function
f(x) may be algebraic, transcendental or combination of both, plays a major role in the
applications of mathematics as problems of such kind occur more frequently in many
scientific and engineering mathematical modeling.The objective of this lab experiment is to
introduce two numerical methods (Incremental and Newton) which can be used to solve
equations of one variable that cannot be solved by exact methods. It is now possible to obtain
rapid and accurate solutions to many complex problems that face the engineer and scientist.
Why one method does not work is almost as important as why another method does work, all
of that we will see it in our experiment.

-Incremental Method: Is based on this algorithm :


We solve the following equation of variable x by using the incremental method:

F(x) = 1 + 5.25x - sec√0.68x = 0; We enter the following program in Matlab:


Case 01:
We take: dx=0.1 epsi=0.0001 xi=0.1 xmax=4.0 , we find as follows :
Case 2:
We take this time : dx=0.1 epsi=0.0001 xi=3.4 xmax=4.0 , we find as follows :

Discussion :
We notice that when we change the interval, we find only one solution “3.629” instead of two
this means that the equation has many solutions (number of solutions depends on the interval
chosen).
-Newton’s Method: based on the following algorithm :

We solve the equation F(x)= x^7 +9x^5−13x−17 =0 using Newton’s method , To avoid
having this kind of convergence problems, we may use the incremental search method to fix
an initial point as close as possible to the root and then Newton’s method would be applied
safely. This enhancement is briefly shown :

The newton first order method can be implemented for a one root search as follow:
The execution of this code will gives the following:
The first thing to notice is that we have got the same result with the same precision but the
farther the initial guess, the more the iterations involved in getting the root at the desired
precision.

The graph of the function tested above is shown. From the graph we can see that a root is
approximately located at 1.25. Furthermore, the equation f(x) = 0 has only one real root.

Newton second order formula:


The second order formula of newton is given by:
This formula is more complicated than the first one and it results in a slower convergence in
general. Nevertheless, an extremely powerful converges is provided for multiple roots. The
code will be similar to the previous one except for the expression of the Newton 1st order
formula, which must be replaced by the 2nd order formula. An execution tags concerning a
number of functions are shown:

Conclusion :
In this lab, we have seen the incremental and Newton’s methods to solve equations. The
newton method is very powerful and accurate in solving equations (linear and non-linear)
however it suffers always from the divergence problems. In a practical application, an initial
approximation is selected and successive approximations are generated by Newton’s method.
These will generally either converge quickly to the root, or it will be clear that convergence is
unlikely. The newton second method is strong and powerful with multiple roots while
providing a smoother convergence (more stable numerically), but it takes usually more time
to get the same precision compared to the 1st order method (less iterations).

You might also like