FEM: Introduction and Weighted Residual MethodsMohammad Tawfik
What are weighted residual methods?
How to apply Galerkin Method to the finite element model?
#WikiCourses #Num001
https://wikicourses.wikispaces.com/TopicX+Approximate+Methods+-+Weighted+Residual+Methods
Subject Title: Engineering Numerical Analysis
Subject Code: ID-302
Contents of this chapter:
Mathematical preliminaries,
Solution of equations in one variable,
Interpolation and polynomial Approximation,
Numerical differentiation and integration,
Initial value problems for ordinary differential equations,
Direct methods for solving linear systems,
Iterative techniques in Matrix algebra,
Solution of non-linear equations.
Approximation theory;
Eigen values and vector;
It is also known as Indirect search method or Steepest descent method,this method firstly found to Augustin Louis Cauchy in 1857.The method is used to solve optimization problems.
FEM: Introduction and Weighted Residual MethodsMohammad Tawfik
What are weighted residual methods?
How to apply Galerkin Method to the finite element model?
#WikiCourses #Num001
https://wikicourses.wikispaces.com/TopicX+Approximate+Methods+-+Weighted+Residual+Methods
Subject Title: Engineering Numerical Analysis
Subject Code: ID-302
Contents of this chapter:
Mathematical preliminaries,
Solution of equations in one variable,
Interpolation and polynomial Approximation,
Numerical differentiation and integration,
Initial value problems for ordinary differential equations,
Direct methods for solving linear systems,
Iterative techniques in Matrix algebra,
Solution of non-linear equations.
Approximation theory;
Eigen values and vector;
It is also known as Indirect search method or Steepest descent method,this method firstly found to Augustin Louis Cauchy in 1857.The method is used to solve optimization problems.
This presentation is a part of Computer Oriented Numerical Method . Newton-Cotes formulas are an extremely useful and straightforward family of numerical integration techniques.
Solution manual for the finite element method in engineering, fifth edition ...physicsbook
https://unihelp.xyz/solution-manual-finite-element-method-in-engineering-rao/
Solution Manual for The Finite Element Method in Engineering – Fifth Edition
This manual cover the chapters 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 of the text.
This presentation is a part of Computer Oriented Numerical Method . Newton-Cotes formulas are an extremely useful and straightforward family of numerical integration techniques.
Solution manual for the finite element method in engineering, fifth edition ...physicsbook
https://unihelp.xyz/solution-manual-finite-element-method-in-engineering-rao/
Solution Manual for The Finite Element Method in Engineering – Fifth Edition
This manual cover the chapters 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 of the text.
The aim of this paper is to show the possibilities offered by Scilab/Xcos to model and simulate aeraulic and HVAC systems. In particular we develop a new Xcos module combined with the use of Modelica language to show how aeraulic systems can be modeled and studied. In this paper we construct a reduced library composed by few elements: hoods, pipes and ideal junctions. The library can be easily extended to obtain a more complete toolbox. The developed library is tested on a simple aeraulic circuit.
In this Scilab tutorial, we introduce readers to the Control System Toolbox that is available in Scilab/Xcos and known as CACSD. This first tutorial is dedicated to "Linear Time Invariant" (LTI) systems and their representations in Scilab.
Customizing Xcos with new Blocks and PaletteScilab
In this tutorial, we show how to create and customize Xcos blocks and palettes. Moreover, we use the "Xcos toolbox skeleton" for a better result. The LHY model in Xcos scheme (already developed in other tutorials) is used as a starting point.
The purpose of this tutorial is to show that Scilab can be considered as a powerful data mining tool, able to perform the widest possible range of important data mining tasks.
Modeling an ODE: 3 different approaches - Part 1Scilab
In this tutorial we show how to model a physical system described by ODE using Scilab standard programming language. The same model solution is also described in Xcos and Xcos + Modelica in two other tutorials.
Modeling an ODE: 3 different approaches - Part 2Scilab
In this tutorial we show how to model a physical system described by ODE using Xcos environment. The same model solution is also described in Scilab and Xcos + Modelica in two other tutorials.
In this tutorial the reader can learn about data fitting, interpolation and approximation in Scilab. Interpolation is very important in industrial applications for data visualization and metamodeling.
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...Scilab
In this document, we present an introduction to discrete probabilities with Scilab (discrete random variables and conditional probabilities, combinations problems, tree diagrams and Bernoulli trials, simulation of random processes with Scilab...).
"Material testing and hyperelastic material model curve fitting for Ogden, Polynomial and Yeoh models"
By Michael Rackl, Technische Universität München for ScilabTEC 2015
A brief study on linear programming solving methodsMayurjyotiNeog
This small presentation includes a brief study on various linear programming solving methods. These methods (graphical & simplex) are used to solve industrial engineering related problems in practical use.
Research Inventy : International Journal of Engineering and Scienceresearchinventy
Research Inventy : International Journal of Engineering and Science is published by the group of young academic and industrial researchers with 12 Issues per year. It is an online as well as print version open access journal that provides rapid publication (monthly) of articles in all areas of the subject such as: civil, mechanical, chemical, electronic and computer engineering as well as production and information technology. The Journal welcomes the submission of manuscripts that meet the general criteria of significance and scientific excellence. Papers will be published by rapid process within 20 days after acceptance and peer review process takes only 7 days. All articles published in Research Inventy will be peer-reviewed.
International Refereed Journal of Engineering and Science (IRJES)irjes
International Refereed Journal of Engineering and Science (IRJES)
Ad hoc & sensor networks, Adaptive applications, Aeronautical Engineering, Aerospace Engineering
Agricultural Engineering, AI and Image Recognition, Allied engineering materials, Applied mechanics,
Architecture & Planning, Artificial intelligence, Audio Engineering, Automation and Mobile Robots
Automotive Engineering….
International Journal of Engineering and Science Invention (IJESI) is an international journal intended for professionals and researchers in all fields of computer science and electronics. IJESI publishes research articles and reviews within the whole field Engineering Science and Technology, new teaching methods, assessment, validation and the impact of new technologies and it will continue to provide information on the latest trends and developments in this ever-expanding subject. The publications of papers are selected through double peer reviewed to ensure originality, relevance, and readability. The articles published in our journal can be accessed online.
The International Journal of Engineering and Science (The IJES)theijes
The International Journal of Engineering & Science is aimed at providing a platform for researchers, engineers, scientists, or educators to publish their original research results, to exchange new ideas, to disseminate information in innovative designs, engineering experiences and technological skills. It is also the Journal's objective to promote engineering and technology education. All papers submitted to the Journal will be blind peer-reviewed. Only original articles will be published.
An Improved Iterative Method for Solving General System of Equations via Gene...Zac Darcy
Various algorithms are known for solving linear system of equations. Iteration methods for solving the
large sparse linear systems are recommended. But in the case of general n× m matrices the classic
iterative algorithms are not applicable except for a few cases. The algorithm presented here is based on the
minimization of residual of solution and has some genetic characteristics which require using Genetic
Algorithms. Therefore, this algorithm is best applicable for construction of parallel algorithms. In this
paper, we describe a sequential version of proposed algorithm and present its theoretical analysis.
Moreover we show some numerical results of the sequential algorithm and supply an improved algorithm
and compare the two algorithms.
An Improved Iterative Method for Solving General System of Equations via Gene...Zac Darcy
Various algorithms are known for solving linear system of equations. Iteration methods for solving the
large sparse linear systems are recommended. But in the case of general n× m matrices the classic
iterative algorithms are not applicable except for a few cases. The algorithm presented here is based on the
minimization of residual of solution and has some genetic characteristics which require using Genetic
Algorithms. Therefore, this algorithm is best applicable for construction of parallel algorithms. In this
paper, we describe a sequential version of proposed algorithm and present its theoretical analysis.
Moreover we show some numerical results of the sequential algorithm and supply an improved algorithm
and compare the two algorithms.
Similar to Numerical analysis using Scilab: Solving nonlinear equations (20)
Why electric vehicles need model-based design?
Because of the rising complexity in new vehicles, model-based design & systems engineering is needed to cascade the requirements and trace back any modification along the engineering lifecycle. Find out more in this presentation of a customer case about electric motor optimization.
Keynote of the French Space Agency CNES on the Asteroidlander MASCOT boarding the Hayabusa2 mission in collaboration with the Japanese Space Agency JAXA and the German Aerospace Center DLR
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Scilab
Rapid Prototyping becomes very popular for faster algorithm development. With a graphical representation of the algorithm and the possibility to simulate complete designs, engineers can help to reduce the time to market. A tight integration with MPLAB-X IDE allows the combination with standard C-coding to easily get mass production code. This solution was used to optimise a sensorless field oriented controlled PMSM motor driven pump efficiency. A model for closed loop simulation was developed using X2C blocks [1][2] for the FOC algorithm based on the existing application note AN1292 [3]. Enhancements to the original version were implemented and verified with simulation. The X2C Communicator was used to generate code of the new algorithm. With the online debugging capabilities and the scope functionality the algorithm was further tuned and optimized to achieve the highest possible efficiency of the pump.
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab
Very Low Earth Orbits are orbits in altitudes lower than 450 km. The interaction between the atmosphere particles and the surfaces of the spacecraft is responsible for the aerodynamic torques and forces. Simulating several aspects of the performance of a satellite flying in VLEO is very important to make decisions about the design of the spacecraft and the mission.
X2C -a tool for model-based control development and automated code generation...Scilab
Peter Dirnberger, Stefan Fragner
Nowadays, the market demands compact, stable, easy maintain-and customizable embedded systems. To meet these requirements, afast, simple and reliable implementation of control algorithms is crucial. This paper demonstrateshow model-based design with the help of Scilab/Xcosand X2C, developed by LCM,simplifiesand speedsup the development and implementation of controlalgorithms. As an example, acontrol schemefor a bearingless motoris presented.
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...Scilab
As part of an EU-founded research project, the Scilab based development tool LoRra (Low-Cost Rapid Control Prototyping Platform) was created. This allows the realization of the continuously model based and highly automated Rapid Control Prototyping (RCP) design process for embedded software within the Scilab / Xcos environment (cf. Figure 1). Based on the application battery management system (BMS), this paper presents a Real-Time interface for Scilab.
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosScilab
The increasing demand in the aerospace industry for safety and performance has been requiring even more resourceful flight control laws in all market segments, since the airliners until the newest flying cars. The de facto standard for flight control laws design makes extensive use of tools supporting numerical computing and dynamic systems visual modeling, such that Scilab and XCos can nicely suit this kind of development.
Multiobjective optimization and Genetic algorithms in ScilabScilab
In this Scilab tutorial we discuss about the importance of multiobjective optimization and we give an overview of all possible Pareto frontiers. Moreover we show how to use the NSGA-II algorithm available in Scilab.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
Numerical analysis using Scilab: Solving nonlinear equations
1. Nonlinear equations www.openeering.com page 1/25
NUMERICAL ANALYSIS USING SCILAB:
SOLVING NONLINEAR EQUATIONS
In this tutorial we provide a collection of numerical methods for solving nonlinear
equations using Scilab.
Level
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
2. Nonlinear equations www.openeering.com page 2/25
Step 1: The purpose of this tutorial
The purpose of this Scilab tutorial is to provide a collection of numerical
methods for finding the zeros of scalar nonlinear functions. The methods
that we present are:
Bisection;
Secant;
Newton-Raphson;
Fixed point iteration method.
These classical methods are typical topics of a numerical analysis course
at university level.
An introduction to
NUMERICAL ANALYSIS USING SCILAB
solving nonlinear equations
Step 2: Roadmap
This tutorial is composed of two main parts: the first one (Steps 3-10)
contains an introduction about the problem of solving nonlinear equations,
presents some solution strategies and introduces properties and issues of
such problems and solutions. The second part (Steps 11-23) is dedicated
to the specific methods, equipped with many Scilab examples.
Descriptions Steps
Introduction and solution strategies 3-6
Conditioning and convergence 7-10
Bisection method 11-12
Secant method 13-14
Newton method 15-18
Fixed point iteration method 19-22
Conclusions and remarks 23-25
3. Nonlinear equations www.openeering.com page 3/25
Step 3: Introduction
Many problems that arise in different areas of engineering lead to the
solution of scalar nonlinear equations of the form
( )
i.e. to find a zero of a nonlinear function.
Nonlinear equations can have none, one, two, or an infinite number of
solutions. Some examples are presented on the right.
Note: A special class of nonlinear equations is constituted by polynomials
of the form
( ) .
(Linear chirp function ( ( )) with infinite zeros)
(Function ( ) ( ) with one zero)
The code of the examples is available in the file ex1.sce
4. Nonlinear equations www.openeering.com page 4/25
Step 4: Solution strategies
Many solution methods exist and the correct choice depends on the type
of function . For example, different methods are used whether is a
polynomial or it is a continuous function whose derivatives are not
available.
Moreover, the problem can be stated in equivalent formulations. For
example, the original formulation ( ) can be converted into a fixed
point formulation of the form ( ) or into a minimization problem of
the form ( ).
It is important to note that even if these formulations are mathematically
equivalent (their zeros are the same ones), the numerical methods used
to approximate the solution do not have all the same behavior.
Hence, the numerical solution strategy should take into account the kind
of problem we try to solve.
Example of equivalent formulations:
Original problem:
( )
Examples of fixed point formulation:
or
( )
Example of minimization formulation:
( )
5. Nonlinear equations www.openeering.com page 5/25
Step 5: Graphical interpretation and separation of zeros
The first step of many numerical methods for solving nonlinear equations
is to identify a starting point or an interval where to search a single zero:
this is called “separation of zeros”. If no other information is available, this
can be done by evaluating the function at several values and plotting
the results ( ).
Solving the problem ( ) is equivalent to find the solutions of the
following system
{
( )
i.e., graphically, to determine, in a Cartesian plane, the intersections of the
graph of the function ( ) with the -axis.
In the case of fixed point formulation ( ) its graphical formulation is
related to the system
{
( )
i.e. the solutions are given by the intersections of the function ( )
with the bisector .
(Separation of zeros of the original problem: )
(Fixed point equivalent formulation: ( ))
The code of the example is available in the file ex2.sce
6. Nonlinear equations www.openeering.com page 6/25
Step 6: Example of a bracketing strategy
Bracketing is an automatic strategy for finding intervals containing a zero
of a given function . An example of bracketing is given in the following
lines of code; the idea is to identify the points in which the function
changes sign:
function xsol=fintsearch(f, xmin, xmax, neval)
// Generate x vector
x = linspace(xmin, xmax, neval)';
// Evaluate function
y = f(x);
// Check for zeros
indz = find(abs(y)<=1000*%eps);
y(indz) = 0;
// Compute signs
s = sign(y);
// Find where f changes sign
inds = find(diff(s)~=0);
// Compute intervals
xsol = [x(inds),x(inds+1)];
endfunction
The code is also available in the file fintsearch.sci, while the example
can be found in fintsearch_test.sce.
(Separation of zeros for the function ( ) ( ))
7. Nonlinear equations www.openeering.com page 7/25
Step 7: Conditioning of a zero-finding problem
The conditioning of a zero-finding problem is a measure of how it is
sensitive to perturbations of the equation.
Here we denote by a zero of the function ( ), i.e. ( ) .
From the first figure on the right we can intuitively see that if the derivative
| ( )| is “large” the problem is well-conditioned. In this case we can
clearly identify the zero of , even if there are rounding errors. Conversely,
if the derivative is “small”, the zero-finding problem is said to be ill-
conditioned and there is no clear identification of the zero. In this case, if
rounding errors are present, the zero is spread up over a “large” interval of
uncertainty.
In summary, we can state the following:
The conditioning number of the root finding problem is | ( )|;
The problem is ill-conditioned if | ( )| is large, i.e. | ( )| is
small.
In the graphic on the right down we can see that the zero of
( ) can not be identified because
of ill-conditioning.
The code of the example is available in the file ex3.sce
(Example of well- and il- conditioned root finding problem)
(Given a very ill-conditioned problem, the unique zero cannot be
identified)
8. Nonlinear equations www.openeering.com page 8/25
Estimating the conditioning of the problem of finding a (single) zero of a
(continuously differentiable) function ( ) means to provide an estimate of
the relative error of a perturbed solution.
Finding the zero of a function ( ), i.e. ( ) , is equivalent (for
continuously differentiable functions) to solving the inverse problem
( ).
If we consider a perturbed solution ̃, i.e. ( ̃) or, equivalently,
̃ ( ), making an error on its evaluation, we have the following
error:
̃ ( ) ( )
Using the following Taylor expansion
( ) ( ) ( ( )) ( )
and the elation obtained on the right
( ( ))
( )
the error can be written as
( ) ( ( )) ( ) ( ( ))
( )
Hence, the relative error can be stated as
| | |
( )
| | |
The code of the example on the right is available in the file ex4.sce
Original problem:
Find such that ( ) i..e. ( )
Perturbed problem:
Find ̃ such that ( ̃) i..e. ̃ ( )
Inverse function:
(Example of inverse function)
The function and its inverse are related from the relation
( ( )) ( ( ))
and the derivative of the inverse function satisfies the relation
( ( )) ( ) i.e. ( ( ))
( )
(where ( ))
9. Nonlinear equations www.openeering.com page 9/25
Step 8: Convergence rates of iterative methods
Typically, methods for approximating nonlinear equations are based on
iterative strategies, i.e. starting from an initial guess solution , and
computing a sequence of solutions that converge to the desired
solution (where ( ) ), i.e.
We define the rate of convergence of the sequence as
| |
| |
| |
| |
for some constant and . is called the asymptotic error
constant while is the error at the iteration.
If and the convergence is called linear. We require to
ensure the convergence of the method indeed the error must be reduced
at each iteration as explained by this relation:
| | | | ( | |) | | | |
Here we compare the n+1-th step error with the initial error.
If the convergence is called superlinear.
If the convergence is called quadratic.
The following figure shows a typical convergence rate profile where we can
identify three different regions:
an exploration region: in this region there is an exploration of the
solution space trying to find an initial guess solution (starting point)
where convergence properties are guaranteed, and, moreover, there
is no significant reduction of the error;
a convergence region: the basin of attraction of the solution;
a stagnation region: this last region is due to round-off errors of the
floating point system that are unavoidable.
This figure stresses the fact that the definition of the convergence rate is
valid only “in the convergence region”, hence it is a local definition.
(Typical behavior of a convergence rate profile)
10. Nonlinear equations www.openeering.com page 10/25
Step 9: Examples of convergence rates
Let us suppose we are looking for the zero .
Linear rate:
Consider the following error model:
and
In this case we get the following errors:
zero significant figures
one significant figures
two significant figures
three significant figures
With a linear rate of convergence, the number of significant figures the
method gains is constant at each step (a multiple of the iteration number).
Quadratic rate:
Consider the following error model:
and
In this case we get the following errors:
zero significant figures
one significant figures (one
figure gained)
three significant figures (two
figures gained)
seven significant figures
(four figures gained)
With a quadratic rate of convergence, the number of significant figures the
method gains at each iteration is twice the previous iteration.
A comparison of the typical rate of convergence (when rounding errors are
present) is shown in the following figure:
(Comparison between linear, superlinear and quadratic rate of
convergence)
The number of figures gained per iteration can be summarized in the
following table:
Convergence rate Figures gained per iteration
Linear Constant
Superlinear Increasing
Quadratic Double
The code of the example is available in the file ex5.sce
11. Nonlinear equations www.openeering.com page 11/25
Step 10: Convergence criteria
When we approximate a solution with an iterative method it is necessary
to choose how to properly stop the algorithm and hence provide the
solution. As each evaluation of the function can be computationally
expensive, it is important to avoid unnecessary evaluations (for instance,
avoiding evaluations in the stagnation region).
The convergence criteria reported on the right refer to the following
problem:
Find a solution such that ( ) starting from an initial guess
( ( )), with in .
The design criteria are based on the absolute or relative error for the
variable or for the value of the function . The difference between a
criterion based on or depends on the conditioning of the nonlinear
problem, while a choice based on the absolute or relative error depends
on the scaling of the nonlinear equations.
In our example, we consider the relative errors for f and x they are
adimensional, i.e. they allow to avoid multiplicative constants.
Example of convergence criteria:
Absolute error between two iterates on :
| |
Relative error between two iterates on :
| |
Absolute residual on :
| ( )|
Relative residual on :
| ( )| ( )
Example of implementation of a stopping criterion:
// Check for convergence
if (abs(fxnew)/fref < ftol) | (abs(dx)/xref < xtol)
// The root is found
x = xnew;
fx = fxnew;
end
The code checks the convergence both on and . If we are dealing with an
ill-conditioned problem it is likely that will not converge, so the check on
will stop the iterative method.
12. Nonlinear equations www.openeering.com page 12/25
Step 11: Bisection method
Supposing we are looking for a zero of a continuous function, this method
starts from an interval [a,b] containing the solution and then evaluates the
function at the midpoint m=(a+b)/2. Then, according to the sign of the
function, it moves to the subinterval [a,m] or [m,b] containing the solution
and it repeats the procedure until convergence.
The main pseudo-code of the algorithm is the following:
Algorithm pseudo-code
while ((b - a) > tol) do
m = (a + b)/2
if sign(f(a)) = sign(f(m)) then
a = m
else
b = m
end
end1
The figure on the right refers to the first 4 iterations of the bisection
method applied to the function ( ) in the interval [1,2]. The
method starts from the initial interval [a,b]=[1,2] and evaluates the function
at the midpoint m=1.5. Since the sign of the function in m=1.5 is equal to
the sign of the function in b=2, the method moves to the interval
[a,m]=[1,1.5], which contains the zero. At the second step, it starts from
the interval [a,b]=[1,1.5], it evaluates the function at the midpoint m=1.25
and it moves to the interval [1.25, 1.5]. And so on.
The function is available in the file bisection.sci, while the example can
be found in bisection_test.sce. (Example of the first four iterations of the bisection method)
13. Nonlinear equations www.openeering.com page 13/25
Step 12: Convergence of the bisection method
At each iteration of the method the searching interval is halved (and
contains the zero), i.e.
( ) ( )
Hence, the absolute error at the nth iteration is
| | | |
( )
( )
and the converge | | is guaranteed for .
Observe that at each iteration the interval is halved, i.e. ( )
( )
, but this relation does not guarantee that | | | | (i.e.
monotone convergence to ) as explained in the figure below.
However, we define the rate of the convergence for this method linear.
The figure on the right shows the relative error related to the iterations
(reported in the table below) of the method applied to the function
( ) in the interval [1,2] where the analytic solution is √ . As
expected, the method gains 1 significant figure every 3/4 iterations.
(Relative error of the bisection method)
(Iterations of the bisection method)
14. Nonlinear equations www.openeering.com page 14/25
Step 13: Secant method
Supposing we are looking for a zero of a continuous function, this method
starts from two approximations ( , ( )) and ( ( )) of the unknown
zero ( ( ) ) and computes the new approximation as the zero
of the straight line passing through the two given points. Hence, can be
obtained solving the following system:
{
( )
( ) ( )
giving
( )
( )( )
( ) ( )
Once the new approximation is computed, we repeat the same procedure
with the new initial points ( ( )) and ( ( )).
The iterative formula is
( )( )
( ) ( )
.
The figures on the right refer to the first four iterations of the method for
the function ( ) with initial guess values and .
The function is available in the file secant.sci, while the example can be
found in secant_test.sce.
(First four iterations of the secant method)
15. Nonlinear equations www.openeering.com page 15/25
Step 14: Convergence of the secant method
The main pseudo-code of the algorithm is the following:
Algorithm
xkm1 = x0; fkm1 = f(x0) // Step: k-1
xk = x1; fk = f(x1) // Step: k
xkp1 = xk // Initialization
iter = 1 // Current iteration
while iter <= itermax do
iter = iter+1
xkp1 = xk-(fk*(xk-xkm1))/(fk-fkm1)
if abs(xkp1-xk)<tol break // Converg. test
xkm1 = xk; fkm1 = fk
xk = xkp1; fk = f(xkp1)
end
The algorithm iterates until convergence or until the maximum number of
iterations is reached. At each iteration only one function evaluation is
required. The “break” statement terminates the execution of the while
loop.
For the secant method it is possible to prove the following result: if the
function is continuous with continuous derivatives until order 2 near the
zero, the zero is simple (has multiplicity 1) and the initial guesses and
are picked in a neighborhood of the zero, then the method converges
and the convergence rate is equal to
√
(superlinear).
The figure on the right shows the relative error related to the iterations
(reported in the table below) of the method applied to the function
( ) in the interval [1,2], where the analytic solution is √ .
(Relative error of the secant method)
(Iterations of the secant method)
16. Nonlinear equations www.openeering.com page 16/25
Step 15: Newton method
Supposing we are looking for a zero of a continuous function with
continuous derivatives, this method starts from an approximation of the
unknown zero and computes the new approximation as the zero of
the straight line passing through the initial point and tangent to the
function. Hence, can be obtained solving the following system:
{
( ) ( ) ( )
giving
( )
( )
( )
Once the new approximation is computed, we repeat the same procedure
with the new initial point . The iterative formula is then
( )
( )
.
The figures on the right refer to the first four iterations of the method for
the function ( ) with initial guess value .
The function is available in the file newton.sci, while all the examples
related to this method can be found in newton_test.sce.
(First four iterations of the Newton method)
17. Nonlinear equations www.openeering.com page 17/25
Step 16: Convergence of the Newton method
The main pseudo-code of the algorithm is the following:
Algorithm
xk = x0;
iter = 1 // Current iteration
while iter <= itermax do
iter = iter+1
xkp1 = xk-f(xk)/f’(xk)
if abs(xkp1-xk)<tol break // Converg. test
xk = xkp1;
end1
The algorithm iterates until convergence or the maximum number of
iterations is reached. At each iterations a function evaluation with its
derivative is required. The “break” statement terminates the execution of
the while loop.
For the newton method it is possible to prove the following results: if the
function f is continuous with continuous derivatives until order 2 near the
zero, the zero is simple (has multiplicity 1) and the initial guess is
picked in a neighborhood of the zero, then the method converges and the
convergence rate is equal to (quadratic).
The figure on the right shows the relative error related to the iterations
(reported in the table below) of the method applied to the function
( ) in the interval [1,2], where the analytic solution is √ . As
expected, the number significant figures doubles at each iteration.
(Relative error of the Newton method)
(Iterations of the Newton method)
18. Nonlinear equations www.openeering.com page 18/25
Step 17: Newton method (loss of quadratic convergence)
A zero is said to be multiple with multiplicity if
( ) ( ) ( ) and ( ) .
In the Newton method, if the zero is multiple, the convergence rate
decreases from quadratic to linear. As an example, consider the function
( ) with zero . Then the Newton method can be stated as
giving the error
which is clearly linear.
On the right we report an example of loss of quadratic convergence
applied to the function
( ) ( )
which has a zero of multiplicity 2 in .
The relative error shows a linear behavior, indeed the method gains a
constant number of significant figures every 3 or 4 iterations.
(Function with a zero of multiplicity 2)
(Loss of quadratic convergence)
19. Nonlinear equations www.openeering.com page 19/25
Step 18: Newton method (Global convergence)
If the function of which we are looking for the zeros and its derivatives until
order 2 are continuous, it is possible to ensure the global convergence of
the Newton method by choosing a proper initial guess point.
As reported in the table on the right, under the above mentioned
hypothesis it is possible to identify a neighborhood of the zero such
that, for each initial guess in , the sequence is monotonically
decreasing (or increasing) to the zero.
For instance, if the function is convex and increasing (second row and
second column case in the table), the Newton method with an initial guess
picked on the right of the zero converges monotonically decreasing to the
unknown zero.
The Newton method with the above choosing criterion also ensures that
all are well defined, i.e. the method does not generate any point in
which the function is not defined (an example in which the monotonicity of
the convergence is important is the logarithm function, which is not
defined for negative values).
Function
properties
( )
(decrease)
( )
(increase)
( )
(concave)
(Right domain) (Left domain)
( )
(convex)
(Left domain) (Right domain)
(How to choose the initial guess for global convergence)
20. Nonlinear equations www.openeering.com page 20/25
Step 19: Fixed point iteration method
The fixed point iteration method transforms the original problem ( )
into the problem ( ) and solves it using an iterative scheme of the
form:
( ).
If the iterative scheme converges to the value , i.e. ( ), then is
also a zero of ( ), since ( ) ( ) .
Solving the equation ( ) is equivalent to solve the following system
{
( )
On the right we reported some graphical examples of iterations applied to
6 different functions . The three examples on the left show cases in
which the method converges to the unknown zero, while among the
examples on the right there is no convergence of the method, even if the
functions seem to be quite similar to the ones on the left.
Note: The Newton method is a particular case of fixed point iteration
method where ( )
( )
( )
.
(Graphical examples of iterations applied to 6 different functions )
21. Nonlinear equations www.openeering.com page 21/25
Step 20: Fixed point iteration method - example #1
The example on the right refers to the function ( ) , where the
considered fixed point iteration is
( )
Here the relative error shows a linear behavior of the method, while on the
right we can see the first four iterations of the method.
(Relative error and iterations of the fixed point iteration method)
The function is available in the file fixedpoint.sci, while the example can
be found in fixedpoint_test.sce.
(First four iterations of the fixed-point iteration method))
22. Nonlinear equations www.openeering.com page 22/25
Step 21: Convergence of the fixed point iteration method
It is possible to prove that the sequence converges to if
| ( )| (i.e. it is a contraction) in the interval containing the
initial guess and for all (i.e. ( ) ). Moreover, in this case, it is
possible to prove that the solution is the unique solution in the interval
of the equation ( ) . While, if | ( )| in the whole interval , the
sequence does not converge to the solution (even if we start very close to
the zero ).
The convergence rate of the fixed point iteration method is:
If ( ) , the method has a linear convergence rate;
If ( ) and ( ) , the method has a quadratic
convergence rate;
Example: The fixed point iteration method applied to the Newton method
with fixed point function
( )
( )
( )
with ( ) and ( ) shows a quadratic rate of convergence,
indeed we have ( ) and ( ) ( ( )
( ) ( ) ( ) ( )
( ( ))
).
Proof of convergence (idea)
Using the Taylor formula we have
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
where are unknown values in the intervals ( ). If the derivatives are
bounded by the relation
| ( )|
the error can be written as
| | ( ) | |
i.e.
| | | |
where is the initial error.
Proof of convergence rate (idea)
Assuming ( ) and using the Taylor formula we have
( ) ( )
( ) ( ) ( )
( )
( )
( )
( )
where ( ) and ( ).
If ( ) we have a linear rate of convergence of the sequence, i.e.
| |
| |
( ).
If ( ) and ( ) we have a quadratic rate of convergence of the
sequence, i.e.
| |
| |
( ).
23. Nonlinear equations www.openeering.com page 23/25
Step 22: Fixed point iteration method - example #2
This example refers to the zero of the function
( )
which is .
Starting from this function it is possible to write different kinds of fixed
point iterations:
1. with ( ) : This function shows a linear
behavior of convergence (blue line), indeed the derivative
( ) ;
2. ( ) with ( ) ( ) : This function does not
converge (red line), indeed the derivative ( ) ;
3. with ( ) : This function shows a quadratic
rate of convergence (purple line), indeed the derivative ( ) .
The initial guess is equal to .
Also this second example can be found in the file fixedpoint_test.sce.
(Original function)
(Relative error for different fixed point iterations)
24. Nonlinear equations www.openeering.com page 24/25
Step 23: Comparison of the methods – an example
This example refers to the zero of the function
( ) ( )
which is .
In the figure on the right we can see a typical result on relative errors, in
step with the rates of convergence discussed earlier for the different
methods.
At a first glance, one might think that the Newton method should be
always chosen, since its convergence is the best one, but it has to be
considered that this method needs the computation of the derivative,
which could require the evaluation of the original function, which can be
numerically very expensive.
The source code of this example can be found in the file main_fcn.sce.
(Nonlinear test function)
(Relative error of the 4 methods)
25. Nonlinear equations www.openeering.com page 25/25
Step 24: Concluding remarks and References
In this tutorial we have collected a series of numerical examples written in
Scilab to tackle the problem of finding the zeros of scalar nonlinear
equations with the main methods on which are based the state-of-the-art
algorithms.
On the right-hand column you may find a list of references for further
studies.
1. Scilab Web Page: www.scilab.org.
2. Openeering: www.openeering.com.
3. K. Atkinson, An Introduction to Numerical Analysis, John Wiley, New
York, 1989.
Step 25: Software content
To report a bug or suggest some improvement please contact the
Openeering team at the web site www.openeering.com.
Thank you for your attention,
Anna Bassi and Manolo Venturin
--------------
Main directory
--------------
ex1.sce : Examples of zero-finding problems
ex2.sce : Examples of separation and fixed point
ex3.sce : Example on conditioning
ex4.sce : Example of inverse function
ex5.sce : Examples of convergence rates
fintsearch.sci : Search intervals
fintsearch_test.sce: Test for search intervals
bisection.sci : Bisection method
bisection_test.sce : Test for the bisection method
secant.sci : Secant method
secant_test.sce : Test for the secant method
newton.sci : Newton-Raphson method
newton_test.sce : Test for the Newton-Raphson method
fixedpoint.sci : Fixed point iteration method
fixedpoint_test.sce: Tests for the fixed point iteration method
main_fcn.sce : Comparison of methods
license.txt : License file