Free Essay

# Numerical Methods Solved Examples

In: Science

Submitted By photon88
Words 803
Pages 4
NUMERICAL SOLUTIONS:
Solved Examples

By

Mahmoud SAYED AHMED
Ph.D. Candidate
Department of Civil Engineering, Ryerson University
Toronto, Ontario 2013

Part I: Numerical Solution for Single Variable............................................................................................... 2
1.1.

Newton-Raphson Method ............................................................................................................ 2

1.2.

Secant Methods ............................................................................................................................ 4

Part Two: Numerical Solutions for Multiple Variables ................................................................................. 6
2.1.

Generalized Newton-Raphson Method for Two Variables ........................................................... 6

2.2.

Multi-dimensional case for Newton-Raphson Method ................................................................ 9

Appendix: Matrix ........................................................................................................................................ 10

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Part I: Numerical Solution for Single Variable
1.1.

Newton-Raphson Method

The Newton-Raphson method (NRM) is powerful numerical method based on the simple idea of linear approximation. NRM is usually home in on a root with devastating efficiency. It starts with initial guess, where the NRM is usually very good if
, and horrible if the guess are not close.
Question:

Find the value of if using Newton-Raphson Method for three iterations?
The function equation should equal to zero; ( )
So the function equation; ( )
( )
( )

NRM:
The first iteration

( )
( )

then
( )
( )
( )

The absolute error,
| |

|

|

The second iteration
( )
( )

then
( )
( )

(

)

The absolute error,
| |

|

|

The third iteration
( )
( )

then
( )
( )

(

)

The absolute error,
| |

|

|

2

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Summary
Table 1: Newton-Raphson Method iteration results to three decimal places
Iteration
Value of x
Absolute error
Exact Solution
1
2.741
9.45%
2
2.715
0.96%
2.714417617
3
2.714
0.009%
70
60

40
30

Error, %

50

20
10
0
3.4

3.3

3.2

3.1

3

2.9

2.8

2.7

Solution

Figure 1: High initial solution
Important notes
At any time

( )

otherwise the process of iteration will not continue

3

Sayed-Ahmed, M.

1.2.

Ryerson University

Jan. 2013

Secant Methods

Question:

Find the value of if where and

using Secant Method for three iterations,
?
( )

then
( )(
( )

)
)

(

The first iteration,
( )(
( )

(

)
)

(

)(
) (

(

)
)

The absolute error
| |

|

|

|

|

The second iteration, and ( )(
( )

(

)
)

(
(

)

)(
) (

)

)(
) (

)

)(
) (

)

)(
) (

)

The absolute error
| |

|

|

|

|

The third iteration, and ( )(
( )

(

)
)

(
(

)

The absolute error
| |

|

|

|

|

The fourth iteration, and ( )(
( )

(

)
)

(
(

)

The absolute error
| |

|

|

|

|

The fifth iteration, and ( )(
( )

(

)
)

(
(

The absolute error
| |

|

|

|

|

4

)

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Summary
Table 2: Secant Method iteration results to three decimal places
Iteration
Value of x
Absolute error
Exact Solution
1
3.353
63.92%
2
3.059
9.691%
2.714417617
3
2.906
5.26%
4
2.823
2.94%
5
2.7765
1.675%
70
60

40
30
20
10
0
3.4

3.3

3.2

3.1

3

2.9

Solution

Figure 2: High initial solution

5

2.8

2.7

Error, %

50

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Part Two: Numerical Solutions for Multiple Variables
2.1.

Generalized Newton-Raphson Method for Two Variables

Question
( )
( )
For acceptable error less than 0.2, find the value of

and

Solution
Where
[ ]
( )
Use Jacobian
( )

( )

[

( )

( )

( )

]

[

]

The matrix notation
[ ]{
}
{ } [ ]{ }
OR
{
} { } [] { }
[

]

[

]

( )
]
( )

[

Iteration;
( )

The arbitrarily guess

[ ]

This scalar parameter which is adjusted to either less than 1 or more than 1 (=1 is the original Newton Method) to force for convergence.
[
[ ]

]
[

]

[

( )(

)

( )

(

Evaluate the function
( )

]

(

)

[

[

]

]

[

)
( )

( )
( )
( )

[ ]

[

]

[

]

[

]
6

]

[

]

Sayed-Ahmed, M.

Ryerson University

][

] =[ ]

]

[
(

( )

( )

( )(

)

]

Evaluate the function
( )

Jan. 2013

( )

[ ]

( )

[

[ ]

[

[

( )(

)

(

)(

]
)

)

( )
( )
( )

Iteration;
( )

[

]

[

]

Evaluate the function
( )

(

( )

[

]

[

]

)

( )
( )
( )
(

( )

)

[

]

The iteration stops when results reached to specified tolerance of error | | otherwise the process of iteration will continue.

7

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Summary
Table 3: Generalized Newton-Raphson Method
Parameters Value
Iteration
0
1
2

1
2.1
1.8284

1
1.3
1.2122

Error, | |
100%
52.38%
14.85%

100%
23.08%
7.24%

Where the absolute error
| |

|

|

3
2
1

Solution

0
-1

1

2

3

-2
-3
-4

f(x1)

-5
-6

f(x2)
Iteration

Figure 3: Graphical depiction of the solution of two simultaneous nonlinear equation

8

Sayed-Ahmed, M.

2.2.

Ryerson University

Jan. 2013

Multi-dimensional case for Newton-Raphson Method
Talyor Series of m functions with n variables:

where

= J (Jacobian) with m = n Set

The method is very expensive - It needs the function evaluation and then the derivative evaluation.
If the tangent is parallel or nearly parallel to the x-axis, then the method does not converge.
Usually Newton method is expected to converge only near the solution. The advantage of the method is its order of convergence is quadratic. Convergence rate is one of the fastest when it does converges

.
Source: (http://epoch.uwaterloo.ca/~ponnu/syde312/open_methods/page3.htm#example)

9

Sayed-Ahmed, M.

Ryerson University

Jan. 2013

Appendix: Matrix
Inverse of Matrix
For 2 x 2 matrices
[

]

the inverse can be found using this formula
[

]

[

]

Multiplication of Matrix
( ) for m x n matrix size and
( ) for n x p matrix size where ( ) for the order of m x p.

Where is summed over all values of and the uses the Einsten summation conventions. Example: Square matrix and column vector
(

)

( )

and

The matrix product
(

)( )

(

)

10

am

### Similar Documents

#### Asas

...Electric Circuits and Fields: Network graph, KCL, KVL, node and mesh analysis, transient response of dc and ac networks; sinusoidal steady-state analysis, resonance, basic filter concepts; ideal current and voltage sources. The venin's, Norton's and Superposition and Maximum Power Transfer theorems, two-port networks, three phase circuits; Gauss Theorem, electric field and potential due to point, line, plane and spherical charge distributions; Ampere's and Biot-Savart's laws; inductance; dielectrics; capacitance. Signals and Systems: Representation of continuous and discrete-time signals; shifting and scaling operations; linear, time-invariant and causal systems. Fourier series representation of continuous periodic signals; sampling theorem; Fourier, Laplace and Z transforms. Electrical Machines: Single phase transformer - equivalent circuit, phasor diagram, tests, regulation and efficiency; three phase transformers - connections, parallel operation; auto-transformer; energy conversion principles. DC machines - types, windings, generator characteristics, armature reaction and commutation, starting and speed control of motors; three phase induction motors - principles, types, performance characteristics, starting and speed control; single phase induction motors; synchronous machines - performance, regulation and parallel operation of generators, motor starting, characteristics and applications; servo and stepper motors. Power Systems: Basic power generation......

Words: 875 - Pages: 4

#### Tennis Warm Ups

Words: 633 - Pages: 3

Free Essay

#### Participation

...How do you differentiate between an expression and an equation? Provide an example of each, where the two are either related to or similar to each other. (6/26) The major difference between an equation and an expression is that while an equation has to be solved, an expression does not. For instance, this is an equation: 3x + 1 = 5.if x is multiplied by 3 and add 1, the result will be a 5. In similar vein, an equation consists of two expressions connected by an equals sign. It can only be true or false (Miller, 2009). The primary difference between the two is an equal sign. References: Miller, M. (2009). Algebra: Book 3. Eugene, OR: Garlic Press. Answer to Nathan: (6/26) Hi Nathan, I agree with you when you say "an expression is a mathematical "phrase". " In most cases it stands for a single element. 3x + 1 is an example of an expression. The expression means that its value three times the value of x, plus 1. An expression can also be a single number or variable, since those have a numerical value. Unlike in the case of an equation, an expression is never true or false, but just has a numerical value. Are the properties used to solve inequalities the same as those used to solve equations? Explain your answer. (6/27) The properties to solve inequalities are NOT exactly the same as the properties to solve equations. But, the properties to solve equations ARE exactly like those used to solve inequalities. Inequalities have an exclusive property while solving because......

Words: 917 - Pages: 4

Free Essay

#### Image Reconstr

...Zhang† Abstract. We propose, analyze, and test an alternating minimization algorithm for recovering images from blurry and noisy observations with total variation (TV) regularization. This algorithm arises from a new half-quadratic model applicable to not only the anisotropic but also the isotropic forms of TV discretizations. The per-iteration computational complexity of the algorithm is three fast Fourier transforms. We establish strong convergence properties for the algorithm including ﬁnite convergence for some variables and relatively fast exponential (or q-linear in optimization terminology) convergence for the others. Furthermore, we propose a continuation scheme to accelerate the practical convergence of the algorithm. Extensive numerical results show that our algorithm performs favorably in comparison to several state-of-the-art algorithms. In particular, it runs orders of magnitude faster than the lagged diﬀusivity algorithm for TV-based deblurring. Some extensions of our algorithm are also discussed. Key words. half-quadratic, image deblurring, isotropic total variation, fast Fourier transform AMS subject classiﬁcations. 68U10, 65J22, 65K10, 65T50, 90C25 DOI. 10.1137/080724265 1. Introduction. In this paper, we propose a fast algorithm for reconstructing images from blurry and noisy observations. For simplicity, we assume that the underlying images have square domains, but all discussions can be equally applied to rectangle domains. Let 2 2 2 u0 ∈ Rn be an......

Words: 12310 - Pages: 50

Free Essay

#### Glog

...curriculum development, and interactive computer environments for exploring mathematics, especially using Mathwright software. How do you solve the equation 1.6x = 5054.4 − 122.35x? (1) We will refer to equations of this type, with an exponential expression on one side and a linear one on the other, as exponential-linear equations. Numerical approaches such as Newton’s method or bisection quickly lead to accurate approximate solutions of exponential-linear equations. But in terms of the elementary functions of calculus and college algebra, there is no analytic solution. One approach to remedying this situation is to introduce a special function designed to solve exponential-linear equations. Quadratic equations, by way of analogy, are √ solvable in terms of the special function x, which in turn is simply the inverse of a very special and simple quadratic function. Similarly, exponential equations are solvable in terms of the natural logarithm log, and that too is the inverse of a very special function. So it is reasonable to ask whether there is a special function in terms of which exponential-linear equations might be solved. Furthermore, an obvious strategy for ﬁnding such a function is to invert some simple function connected with exponentiallinear equations. This line of thinking proves to be immediately successful, and leads to a function I call glog...

Words: 3007 - Pages: 13

Free Essay

#### (Cfd Ebook) - Solution to Two-Dimensional Incompressible Navier-Stokes Equations

... Computational Physics Section of Theoretical Physics University of Wroclaw in Poland Department of Physics and Astronomy o Exchange Student at University of Link¨ping in Sweden maq@panoramix.ift.uni.wroc.pl http://panoramix.ift.uni.wroc.pl/∼maq May 8, 2003 Abstract In that report solution to incompressible Navier - Stokes equations in non - dimensional form will be presented. Standard fundamental methods: SIMPLE, SIMPLER (SIMPLE Revised) and Vorticity-Stream function approach are compared and results of them are analyzed for standard CFD test case - Drived Cavity ﬂow. Diﬀerent aspect ratios of cavity and diﬀerent Reynolds numbers are studied. 1 Introduction The main problem is to solve two-dimensional NavierStokes equations. I will consider two diﬀerent mathematical formulations of that problem: • u, v, p primitive variables formulation • ζ, ψ vorticity-stream function approach I will provide full solution with both of these methods. First we will consider three standard, primitive component formulations, where fundamental Navier-Stokes equation will be solved on rectangular, staggered grid. Then, solution on non-staggered grid with vorticity-stream function form of NS equations will be shown. 2 Math background We will consider two-dimensional Navier-Stokes equations in non-dimensional form1 : 1 We consider ﬂow without external forces i.e. without gravity. → ∂− u − − = −(→ )→ − u u ∂t D= 1 ϕ+ Re 2→ − u (1) (2) Guess (P*) ,......

Words: 3456 - Pages: 14

Free Essay

#### Numerical Recipes in C

...Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). Numerical Recipes in C The Art of Scientiﬁc Computing Cambridge New York Port Chester Melbourne Sydney EXXON Research and Engineering Company Harvard-Smithsonian Center for Astrophysics Department of Physics, Cornell University CAMBRIDGE UNIVERSITY PRESS William T. Vetterling Saul A. Teukolsky Brian P. Flannery Second Edition William H. Press Polaroid Corporation Published by the Press Syndicate of the University of Cambridge The Pitt Building, Trumpington Street, Cambridge CB2 1RP 40 West 20th Street, New York, NY 10011-4211, USA 477 Williamstown Road, Port Melbourne, VIC, 3207, Australia Copyright c Cambridge University Press 1988, 1992 except for §13.10 and Appendix B, which are placed into the public domain, and except for all other computer programs and procedures, which are Copyright c Numerical Recipes Software 1987, 1988,......

Words: 24819 - Pages: 100

#### Micrpeconomics

...calculus, and limits, we follow with derivatives and its applications to real life problems, and integration. This course covers also functions with more than one variable, differential equations, and optimization. Basic requirement. Students must have a good background on algebra and arithmetic, as well as a good understanding of mathematical functions and their applications to practical problems. Course Objectives * To builds skills and proficiency in methods of calculus * To understand concepts, formulas and techniques of calculus through exercises and applied examples * To be able to translate real-world problems to mathematical language and models * To acquire ease in identifying the different kind of problem and the appropriated rule to solve it * To interpret results of calculus * To apply analytical methods of calculus that are relevant to managerial and business sciences. Course Outcomes * To work with functions represented in a variety of ways, including graphical, numerical, analytical, or verbal * To understand the meaning of limit graphically and numerically and be able to compute limits involving infinite * To understand the meaning of the derivative in terms of a rate of change and local...

Words: 1257 - Pages: 6

Free Essay

#### Werewd

...converted to a discrete numerical algorithm. However, there are also a huge number of initially discrete models where they also arise. As Wassily Leontief wrote in Scientific American in 1951 [153]: This article is concerned with a new effort to combine economic facts and theory known as “interindustry” or “input-output” analysis. Essentially it is a method of analysis that takes advantage of the relatively stable pattern of the flow of goods and services among the elements of our economy to bring a much more detailed statistical picture of the system into the range of manipulation by economic theory. As such, the method has had to await the modern high-speed computing machine as well as the present propensity of government and private agencies to accumulate mountains of data. It is now advancing from the phase of academic investigation and experimental trial to a broadining sphere of application in grand-scale problems of national economic policy.1 Gaussian elimination is the oldest and the simplest — but not always the fastest — algorithm for solving matrix equations. The title of this chapter is quite long because a matrix equation can be solved by many different algorithms. The only ones we discuss are Gaussian elimination and a variant which is faster in certain circumstances. Frequently in physical systems, the matrix is sparse, that is, most of its elements are zero. Then the solution of the matrix equation might be faster if an iterative method is......

Words: 399 - Pages: 2

#### Research Process

...Name CJA/334 - RESEARCH METHODS IN CRIMINAL JUSTICE Date Instructor Research Process and Terminology When I hear the word research, I usually think of scientists in a lab wearing white lab gowns but, this is not always the case in the Criminal Justice field. Research can be used to fight crime, prove evidence in court or even help improve police response without the city. There are many terminology’s that has to be known to be successful when working in the field. How will this new terminology and knowledge apply to a career in criminal justice? There are hundreds of jobs within the criminal justice field. This new terminology will help throughout the research and will and aid in whichever branch or specialty the person is undertaking. The Terminology will help the person understand the different performances of the research and how it can be applied to his or her performance in job duties. This will give anyone a better understanding for research and how it should be carried out to assist them How will not knowing the proper terminology affect you as you conduct criminal justice research? Anyone that works in the criminal justice field knows that at any time people rely on the system to help them when needed. The system basically has control of all our lives and can determine what may happen next. Not knowing the proper terminology can have a huge effect on someone’s life, safety, and can even death. For example a police detective has to...

Words: 1106 - Pages: 5

Free Essay

#### Operating Reserve Reliability Evaluation

...interruptible loads in the probabilistic assessment of the operating reserve in isolated and interconnected generating systems. This technique is then used to evaluate the magnitude and corresponding maximum allowable time delay of load interruption required to reduce the unit commitment risk in the absence of other capacity adjustments. They also present a probabilistic technique which can be used to evaluate the inherent interruptible load carrying capability of an isolated and interconnected generating system which exists without having to commit any extra units other than those required to carry the firm load. The study provides an insight into load interruption and its effect on the system risk. The techniques developed are illustrated by numerical examples. These techniques can be used in short and medium term operational planning Electric Power Systems Research Volume 18, Issue 2, March 1990, Pages 99–103 Microprocessor based on-line assessment of the operational reliability of a longitudinal power supply system * A. Chakrabarti, * A.K. Mukhopadhyay * Electrical Machines and Power System, Department of Applied Physics, Faculty of Technology, University of Calcutta, 92 Acharya P.C. Road, Calcutta 700 009 India * Received 23 October 1989. Available online 13 February 2003. *...

Words: 4873 - Pages: 20

#### Operation

...statistics is to to provide decision makers with methods for obtaining and analyzing information to help make these decisions. Statistics is used to answer long-range planning questions, such as when and where to locate facilities to handle future sales. Definition: Statistics is defined as the science of collecting, organizing, presenting, analyzing and interpreting numerical data for the purpose of assisting in making a more effective decision. Types of Statistics: There are two types of statistics 1. Descriptive Statistics is concerned with summary calculations, graphs, charts and tables. 2. Inferential Statistics is a method used to generalize from a sample to a population. For example, the average income of all families (the population) in the US can be estimated from figures obtained from a few hundred (the sample) families. Statistical Population: Is the collection of all possible observations of a specified characteristic of interest. An example is all of the students in BUSA 3101 course in this term. Note that a sample is a subset of the population. Variable: A variable is an item of interest that can take on many different numerical values. Types of Variables or Data: 1. Qualitative Variables are nonnumeric variables and can't be measured. Examples include gender, religious affiliation, state of birth. 2. Quantitative Variables are numerical variables and can be measured. Examples include balance in your checking account,......

Words: 1627 - Pages: 7

Free Essay

#### Ncbnxb

...influenced by the consolidated experience of the operators, by the specific previous similar machining cases and by several other factors depending on the machining practices. In a project, financed by the Swiss national organization for the industrial research, the authors have developed an expert system (ES) in order to get this information through software processes. The paper shows the structure of this expert system. The ES has been realized through the definition of ontology of components and elements of the machining. The ES includes a very large data base of cutting parameters, and is based on the establishment of rules for the competition between the machining strategies. The ES includes learning methods which are able to identify similar operations. The learning methods are based on the measure of the distance between the actual machining conditions and those already experimented. Therefore the system is able to learn from similar cases. The system has been designed especially for an application in the field of the watch industry which requests a very large spectrum of machining operations and includes also the cases of the HSC. The new expert...

Words: 3072 - Pages: 13

#### Hayek

...rational form. According to Hayek “data”, from which the economic calculus starts, are not “given” for the whole society. Knowledge is limited when given to us, therefore the need for the best allocation of resources in order to be economically efficient. b. What does Hayek mean by “dispersed bits of incomplete and frequently contradictory knowledge”? It means that people of different spheres of life will have a specific knowledge that they will utilize when needed. For example, business managers possess knowledge in regard to management and profit maximization, whereas a worker might have the knowledge on how to economize in the way he makes product, which perhaps the business manager does not know about it. c. Why is Hayek critical of the common assumptions in economic analysis that buyers, sellers, producers and the economist all know every relevant thing about the economy? Because according to Hayek, Economic theory has been refined through the use of mathematics. For example, economists rely extensively on statistical aggregates, but this data leaves out small variations that, although important, cannot be transmitted to those planning the best allocation of available resources. For Hayek social phenomena thought should not adopt a thought that deals with phenomena of nature, he...

Words: 1382 - Pages: 6