Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
35 views15 pages

Part3 Errors

This document discusses three main types of errors that can occur in engineering calculations: modeling error, operational error, and iteration error. Modeling error results from simplifying assumptions made when formulating a problem. Operational error includes rounding errors from limited precision in calculations and storing variables in computer memory. Iteration error comes from approximations made during iterative solution methods.

Uploaded by

zepozepo06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views15 pages

Part3 Errors

This document discusses three main types of errors that can occur in engineering calculations: modeling error, operational error, and iteration error. Modeling error results from simplifying assumptions made when formulating a problem. Operational error includes rounding errors from limited precision in calculations and storing variables in computer memory. Iteration error comes from approximations made during iterative solution methods.

Uploaded by

zepozepo06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

ES-361

Computing Methods in
Engineering

by

Murat Buyuk, PhD


CHAPTER 3

ERRORS IN ENGINEERING
CALCULATIONS

Errors made in expressing and solving engineering problems can be grouped as 1)


Modeling Error, 2) Operational Error, 3) Iteration Error (solution method error).
Therefore, the errors made until the solution of the engineering problem will be
the sum of these three types of errors. While some of these error types can be
controlled and reduced, some errors may not be possible to control (such as
computer sensitivity errors that are not under the user's control). Errors in
engineering can be explained in more detail as follows.

3.1 MODELING ERROR

This type of error is the type of error made when expressing an engineering
problem. It arises from simplifying assumptions made on the problem to facilitate
the expression and solution of the engineering problem and to reduce the solution
time. Below are simple examples of modeling errors.

Calculation of the area of the circle :

For example, the area of a circle can be expressed as in Figure 3.1 by adding
different number of triangles.

Figure 3.1: Representation of the area of the circle by the sum of different numbers
of triangles.

Increasing the number of triangles in Figure 3.1 will cause the area to be expressed
more accurately. Therefore, among the three models in Figure 3.1, the area of the
circle represented by 4 triangles (Model 1) will be the most inaccurate, and the
area of the circle represented by 6 triangles (Model 3) will be the most accurate.
Increasing the number of triangles will reduce the modeling error.
Stress calculation in the bar :

In Figure 3.2 below, the stress formed in the bar under the F force is tried to be
calculated. The actual Stress–Strain (  −  ) plot is nonlinear. However, linear
Stress–Strain graph, known as Hooke's Law, is used in stress calculations because
it is easy and simple in applications . Using a linear Stress–Strain plot instead of a
true nonlinear Stress–Strain plot often leads to an acceptable modeling error in
engineering applications.

Real

Figure 3.2: Calculation of the real (nonlinear) and linear material model of the
stress in the bar.

In vehicle dynamics, mass-spring-damper models as in Figure 3.3 are generally


used to examine the behavior of the vehicle while driving. Two models are shown
in Figure 3.3. In Model 1, the entire vehicle is simply represented by a single mass-
spring-damper model, while in Model 2, the upper part (body) and lower part (axle
and wheels) of the vehicle are represented in more detail by separate mass-spring-
damper models. Therefore, Model 2 will contain less modeling errors than Model 1
and will give more accurate results.

Figure 3.3: Mass-spring-damper models used to examine the vehicle's behavior


while driving.

Modeling errors, examples of which are given above, are errors that can be
reduced or avoided.
3. 2 PROCESSING ERRORS

Process errors are the types of errors that occur as a result of mathematical
operations in the solution of engineering problems. These errors are divided into 2
groups as 1) Rounding errors, 2) Cutting errors.

3.2.1 Rounding Errors

In computer calculations, a certain number of digits are reserved for each variable
or number in the computer memory. If the calculated variable value is greater than
the allocated digit value, a) either the extra digits in the variable are trimmed
(trimmed), or b) the variable value is rounded to fit the allocated space in memory
. For example 2 , and  consists of digits whose number continues to infinity. The
use of these numbers in calculations requires rounding or trimming in the computer
environment.

For example,  taking the first 15 digits of the decimal part of the number pi =
Let's think of it as 3.142857142857143. This variable can be rounded as follows

Table 3.1:  rounding and trimming the number for different numbers of digits
(digits), errors in this case.

pi = 3.142857142857143…
Value used in place Rounding Error (pi- Value used Crop Error
of Pi (with value) instead of pi (pi-value)
Rounding) (with cutting)
3.14285714285714 -0.001264489267347 3.14285714285714 -0.001264489267347
3.1428571428571 -0.001264489267207 3.1428571428571 -0.001264489267307
3.142857142857 -0.001264489267307 3.142857142857 -0.001264489267207
3.14285714286 -0.001264489270207 3.14285714285 -0.001264489260207
3.1428571429 -0.001264489310207 3.1428571428 -0.001264489210207
3.142857143 -0.001264489410207 3.142857142 -0.001264488410207
3.14285714 -0.001264486410207 3.14285714 -0.001264486410207
3.1428571 -0.001264446410207 3.1428571 -0.001264446410207
3.142857 -0.001264346410207 3.142857 -0.001264346410207
3.14286 -0.001267346410207 3.14285 -0.001257346410207
3.1429 -0.001307346410207 3.1428 -0.001207346410207
3.143 -0.001407346410207 3.142 -0.000407346410207
3.14 0.001592653589793 3.14 0.001592653589793
3.1 0.041592653589793 3.1 0.041592653589793
3 0.141592653589793 3 0.141592653589793

In engineering calculations, if the variables are not integers and are too large to
fit into the allocated digits in the memory, errors occur due to rounding or
truncation to fit into memory.

Sometimes a variable that fits in the memory may not fit in the memory allocated
digits after mathematical operations. For example, let's assume that a maximum
of 4 digits can be allocated in the memory for the variable x x . Let's say the value
of in x =0.0001 and it fits in 4 digit memory. As a result of a mathematical
operation 𝑥 2 = 0.0000 on this variable, the 8-digit x value will actually
2

0001
𝑢𝑛𝑛𝑒𝑐𝑒𝑠𝑠𝑎𝑟𝑦 𝑑𝑖𝑔𝑖𝑡𝑠
be obtained . If this variable is tried to fit into 4 digits, x = 0.0000 it will have its
2

value after rounding. In this case , there will be a difference between the true
value and the rounded value, that is, an error. 0.00000001

The rounding error is a partially controllable error. It can be reduced or controlled


by the use of precision computers such as workstations or the use of double
precision in computers for mathematical operations.

x
Example 3.1 : By taking y = x + + 2 x103 x the result of the operation x
2
3
10
=0.0001 and assuming y that 4 digits can be allocated to the variables in the computer memory
, find the true value, the rounded value and the difference between the true value
and the rounded value, namely the error?

x
y = x2 + 3
+ 2 x103 x The actual value of the function x can be calculated by taking
10
=0.0001 as follows:

y=(0.0001)^2+0.0001/1000+2000*0.0001=0.00000001+0.0000001+0.2

=0.20000011

The rounded value of this function can be calculated as follows by taking 4


precisions after the point:

y=(0.0001)^2+0.0001/1000+2000*0.0001=0.0000+0.0000+0.2=2

In this case, the error can be expressed as follows.

Error Occurred: True-Rounding=0.00000011

3.2.2 Storing Variables on the Computer

Computers use the binary system of 0.1 numbers and allocate memory space for
variable values in binary or base memory. Therefore, they store the values in the
decimal system in daily calculations by converting them to the binary system.
Variables are represented by a certain number of digits (bits) in a binary system
called words in computer memory. These words are represented by bits 2 times
the previous one, such as 4-bit, 8-bit, 16-bit, 32-bit, 64-bit. A large number of bits
allows large values to be stored in memory without rounding or clipping. Small
numbers of bits cause errors as they cause variables to be rounded or truncated.
Rounding or clipping errors are caused by mathematical operations, because the
value of the variable does not fit into the allocated digits in the memory.

Expressing a binary variable in decimal :


In the binary system, variables are represented by bits such as 01101 consisting
of the numbers 0.1. In general, in the case of using n- bit words, the variables can
be expressed d i with numbers consisting of 0.1 in binary system and their values can be
calculated as follows.

x = d n −1 d n − 2 ...d1 d 0  x = d n −1 2 n −1 + d n − 2 2 n − 2 + ... + d1 21 + d 0 2 0
 
n bit

the value of a variable consisting of 4 bits and expressed as


x = 1x2 + 0 x2 + 1x2 + 1x2 = 11x
3 2 1 0
= =1011 d 3 d 2 d1d 0 in binary . However,
considering that the variable may be negative, the first digit of the n bits allocated
in computers is used to indicate the sign, and the remaining n-1 bits are used to
indicate the values. For this reason, in the binary system, the smallest value of a
variable consisting of x = −2 n−1 n bits is expressed with , and the largest value is
expressed with . x = 2 n−1 − 1

Table 3.2 below shows the 2-bit equivalent of the values to be stored in the decimal
system.

Table 3.2: Minimum and maximum values of variables that can be stored in the
binary system.

bit( n ) Number range (- 2 n−1 , 2 n−1 − 1 ) =(min, max)


4 (- 2 4−1 , 2 4−1 − 1 ) =(-8, 7)
8 (- 28−1 , 28−1 − 1 ) =(-128, 127)
16 (- 216−1 , 216 − 1 ) =(-32 768, 32 767)
32 (- 232−1 , 232−1 − 1 )=(-2 147 483 648, 2 147 483 647)
64 (- 2 64−1 , 2 64−1 − 1 )=(-9 223 372 036 854 775 808, 9 223 372 036 854 775
807)
128 (- 2128−1 , 2128−1 − 1 )

If any integer is outside the (min, max) range in Table 3.2, it cannot be
represented exactly by the bit numbers in Table 3.2. To reduce rounding or clipping
errors, single precision (7-8 bits) or double precision (15-16 bits) should be used,
which increases the number of bits allocated to variables in computers in
mathematical operations.

Expressing a decimal variable in binary :

A decimal number can be converted to binary using the remainder after dividing
by 2 consecutively. For example, the number 20 can be expressed in base 2 by
dividing it by 2 and using the remainder ( by writing the remainder backwards
from the beginning ) until the quotient becomes zero, as in Table 3.3 :
20=10100➔ 20 = 1x2 + 0 x2 + 1x2 + 0 x2 + 0 x2
4 3 2 1 0

Table 3.3: Expressing the number 20 in base 2

Number/2 Section Remainder


20/2 10 0
10/2 5 0
5/2 2 one
2/2 one 0
1/2 taking 0 instead of 0.5 one
(taking the integer part of the
chapter)

Expressing fractional numbers :

Fractional numbers are more difficult to express than whole numbers. Fractional
numbers can be expressed in binary a) fixed point and b) floating point methods.

a) Representation of fractional numbers with fixed point:

are expressed in binary form. 𝑥 = 𝑑 ⏟−1 𝑑−2 . . . 𝑑−𝑚 where d 1 , d 2 ,… d n


⏟𝑛−1 𝑑𝑛−2 . . . 𝑑1 𝑑0 . 𝑑
𝑖𝑛𝑡𝑒𝑔𝑒𝑟_𝑡𝑒𝑟𝑚 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚𝑠
are binary numbers consisting of 0 and 1. The value of the variable expressed in
the binary system is calculated as the fractional part expressed as the decreasing
powers of two, as follows

𝑑𝑛−1 2𝑛−1 + 𝑑𝑛−2 2𝑛−2 +. . . +𝑑1 21 + 𝑑0 20 + ⏟


𝑥=⏟ 𝑑−1 2−1 + 𝑑−2 2−2 +. . . +𝑑−𝑚 2−𝑚 (3.1)
𝑖𝑛𝑡𝑒𝑔𝑒𝑟_𝑡𝑒𝑟𝑚𝑠 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚𝑠

Example 3.2 : Calculate the value of x =1011.101 with fixed point notation?

x a number 𝑥 = 1011.101 = ⏟ 𝑑−1 𝑑−2 𝑑−3 . Its value is Equation 1.1. can be
𝑑3 𝑑2 𝑑1 𝑑0 . ⏟
𝑖𝑛𝑡𝑒𝑔𝑒𝑟_𝑡𝑒𝑟𝑚𝑠 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚𝑠
calculated using the following:
𝑑3 23 + 𝑑2 22 + 𝑑1 21 + 𝑑0 20 + ⏟
𝑥=⏟ 𝑑−1 2−1 + 𝑑−2 2−2 + 𝑑−3 2−3
𝑖𝑛𝑡𝑒𝑔𝑒𝑟_𝑡𝑒𝑟𝑚𝑠 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚𝑠
3 2 1 0 −1 −2 −3
=⏟
1𝑥2 + 0𝑥2 + 1𝑥2 + 1𝑥2 + ⏟
1𝑥2 + 0𝑥2 + 1𝑥2 = 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
𝑖𝑛𝑡𝑒𝑔𝑒𝑟_𝑡𝑒𝑟𝑚𝑠 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚𝑠
= 11.625

b) Representation of fractional numbers with floating point

In fixed-point notation, many digits (digits) are needed to express very large and
very small numbers (fractions). Floating point notation has been developed to
store these numbers more efficiently in computers. In this notation, it is
represented as a fractional variable like 𝑥 = (𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛_𝑡𝑒𝑟𝑚)𝑥(𝑏𝑎𝑠𝑒)ü𝑠 any x . In the
representation of a fractional number with the floating point system, the number
is normalized with a single digit before the fraction. For example, the number 25.34
can be represented as a base 10 floating point system 0.2534x10 .
2

Fractional numbers are shown as in Table 3.4 by separating bits to the sign of the
fractional number, the fraction part, the exponent and its value with the floating
point system. While fractional numbers are expressed in binary, the first bit of the
number is used for the sign of the number, the next bit is used for the sign of the
exponent, the following bits are used for the value of the exponent, and the last
bits are used to represent the fraction part of the fractional number. In the binary
system, the positive sign is represented by the number 0 and the negative sign by
the number 1.

Table 3.4: Floating point representation of fractional numbers in the binary system.

number exponent exponent Fraction Value


sign 2 n … 21 2 0 2 −1
2−2 … 2−m
0 or 1 0 or 1 dn … d1 d 0 d −1 d −2 … d − m

, let's assume that a total of 8 bits are allocated in memory for a variable. x Let's
say the first bit of the 8 bits is reserved for the sign of the number, the next 3 bits
are reserved for the exponent (1 bit sign, 2 bits for the number), and the remaining
4 bits are reserved for the fractional number. In this case, if the variable x is
expressed as x =11101010 in binary , its floating point equivalent can be
expressed as follows
𝑠𝑖𝑔𝑛 𝑒𝑥𝑝𝑜𝑛𝑒𝑛𝑡 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛
𝑥 = ⏞⏟
1 ⏟
1 ⏞
⏟ 0 ⏞⏟
1 ⏟ 1 ⏟
0 ⏟
1 ⏟
0 ➔
𝑘𝑒𝑠𝑖𝑟 ü𝑠 𝑑1 𝑑0 𝑑−1 𝑑−2 𝑑−3 𝑑−4

( )
x = − 1x 2 −1 + 0 x 2 − 2 + 1x 2 −3 + 0 x 2 − 4 x 2 − (1x 2 + 0 x 2 ) = −0.625 x 2 − 2
1 0

It is seen from the above expression that the sign of the fraction and the exponent
is expressed with 1 in the binary system. From this, it is understood that the sign
of the fraction and its exponent is negative. The expression obtained above can be
−2
expressed as x = −0.625x2 decimal x = −0.15625 .

3.2.3 Truncation Error

The truncation error is mostly encountered in mathematical operations expressed


in series. Series are used to express various functions in terms of polynomial or
trigonometric (sine, cosine) functions. For example, in the Taylor series, any
function is obtained with polynomials, and in the Fourier series, any function is
obtained with trigonometric functions. The Taylor series is explained in detail
below, as it is widely used.

A f (x) function x 0 can be written in terms of a polynomial around a point as


f ( x) = a0 + a1 ( x − x0 ) + a2 ( x − x0 ) 2 + a3 ( x − x0 ) 3 + a4 ( x − x0 ) 4 + ... + an ( x − x0 ) n + ... (3.2)

f (x) The derivatives of the function can be expressed as

f ' ( x) = 1 a1 + 2a2 ( x − x0 ) + 3a3 ( x − x0 ) 2 + 4a4 ( x − x0 ) 3 + ... + nan ( x − x0 ) n −1 + ... (3.3)


1!

f '' ( x) = 2 a2 + (3)(2)a3 ( x − x0 ) + (4)(3)a4 ( x − x0 ) 2 + ... + n(n − 1)an ( x − x0 ) n − 2 + ... (3.4)


2!

f '' ( x) = 2a2 + (3)(2)(1)a3 ( x − x0 ) + (4)(3)(2)a4 ( x − x0 ) + ... + n(n − 1)an ( x − x0 ) n − 2 + ... (3.5)


 
3!

f ( n ) ( x) = n(n − 1)(n − 2)....(1)an (3.6)


 
n!

x 0 the value and derivatives of the function at point f ( x0 ) and f ' ( x0 ) , f '' ( x0 ) ,
f ''' ( x0 ) ,…, are known, the constants f ( n ) ( x0 ) , a1 , a 2 ,…, a n in the polynomial can be
determined by substituting the known values in the above equations a 0 as follows

x = x0 for f ( x) = f ( x0 ) ➔ a0 = f ( x0 ) (3.7)

x = x0 for f ' ( x) = f ' ( x0 ) ➔ a1 = f ' ( x0 ) (3.8)

f '' ( x0 )
x = x0 for f '' ( x) = f '' ( x0 ) ➔ a2 = 2! f '' ( x0 ) ➔ a2 = (3.9)
2!

f ''' ( x0 )
x = x0 for f ''' ( x ) = f ''' ( x0 ) ➔ a3 = (3)(2) f ''' ( x0 ) ➔ a3 = (3.10)
 3!
3!

….

f ( n ) ( x0 )
x = x0 for f ( n ) ( x) = f ( n ) ( x0 ) ➔ an = n(n − 1)(n − 2)....(1) f ( n ) ( x0 ) ➔ an = (3.11)
   n!
n!

If the constants obtained above are substituted in Equation X.1, the Taylor series
can be written as follows

f '' ( x0 ) f ( n ) ( x0 ) f ( n ) ( x0 )
f ( x) = f ( x0 ) + f ' ( x0 )( x − x0 ) + ( x − x0 ) 2 + ... + ( x − x0 ) n + ... =  ( x − x0 ) n
2! n! n =0 n!
(3.12)

the Taylor series, x0 = 0 the Taylor series is called the Maclurin series and is
expressed as

f '' (0) 2 f '' (0) 3 f ( n ) (0) n f ( n ) (0) n
f ( x) = f (0) + f ' (0) x + x + x + ... + x + ... =  x (3.13)
2! 3! n! n =0 n!
the Maclurin series , the polynomial equivalent of the functions can be obtained.
Each term of the above series expression has exponentiation, multiplication and
division operations. Therefore, rounding errors may occur in each term of the
series. Increasing the number of terms to reduce the truncation error may increase
the rounding error as it will cause mathematical operations for more terms. In
short, increasing the number of terms in the series decreases the truncation error
and increases the rounding errors.

Example 3.3 : f ( x) = e x Get the polynomial equivalent of the function with the
Maclurin series?

f ( x) = e x derivatives of the function f ' ( x) = f '' ( x) = f ''' ( x) = ... = f ( n) ( x) = e x , these


derivatives

x0 = 0 The function and derivative values at the point


f (0) = f ' (0) = f '' (0) = f ''' (0) = ... = f ( n) (0) = 1 can be expressed as . Using this function
and its derivative values, f ( x) = e x the function can be expressed with the Maclurin
series as follows

x 2 x3 x 4 xn  xn
e = 1 + x + + + + ... +
x
=
2! 3! 4! n! n =0 n!

Example 3.4 : f ( x) = sin x Obtain the polynomial equivalent of the function with
the Maclurin series?

f ( x) = sin x The derivatives of the function can be expressed as:

f ' ( x) = cos x , f '' ( x) = − sin x , f ''' ( x) = − cos x , f ( 4 ) ( x) = sin x , …,

f ( x) = sin x The values f (0) = sin 0 = 0 of the function and its derivatives at the point
can be expressed as x0 = 0 , f (0) = cos 0 = 1 , f (0) = − sin 0 = 0 , f (0) = − cos 0 = −1 ,
' '' '''

f ( 4) (0) = sin 0 = 0 , …,.

Using this function and its derivative values, f ( x) = sin x the function can be
expressed with the Maclurin series as follows

x3 x5 x7 
(−1) n 2 n +1
sin x = x − + − + ... =  x
3! 5! 7! n = 0 ( 2n + 1)!

3.2.4 Calculation of the Cutting Error

As seen from the examples above e , , sin x and all other functions can be
x

expressed in terms of polynomials with the Maclurin series. But since these series
contain an infinite number of terms, they continue indefinitely. Therefore, for
practical use of these series, they must be truncated after a certain number of
terms have been taken. The error that occurs due to the use of series by cutting
is called truncation error.

The Taylor series can be written with the terms after R(x) the n -ci derivative as
follows:

f '' ( x0 ) f ( n ) ( x0 ) f ( n +1) ( x0 )
f ( x) = f ( x0 ) + f ' ( x0 )( x − x0 ) + ( x − x0 ) 2 + ... + ( x − x0 ) n + ( x − x0 ) n +1 + ...
2! n! (n + 1)!
 
R

the n -ci derivative are omitted in the Taylor series, the truncation error can be
expressed as

f ( n +1) ( x0 ) f ( n+1) ( )
R= n +1
( x − x0 ) + ... = ( x − x0 ) n+1 x0    x
(n + 1)! (n + 1)!

from the above expression that the order of the truncation error ( x − x0 ) n +1 can be
expressed as . The truncation error is a controllable error since any number of
terms can be selected from the series.


Example 3.5 : Calculate a) e the value of b) sin the value of by taking a
2
4
different number of terms from the Maclurin series?

x2 x3 x 4 xn
a) It is expressed as a function e x = 1 + x + + + + ... + of the Maclurin
2! 3! 4! n!
series . e
x

2 2 23 2 4 2n
In this case, e the value e 2 = 1 + 2 + + + + ... + can be expressed as
2
2! 3! 4! n!

x3 x5 x7
b) It is expressed as a function sin x = x − + − + ... of the Maclurin series
3! 5! 7!
. sin x

 ( / 4) 3 ( / 4) 5 ( / 4) 7
In this case, sin the value sin( / 4) = ( / 4) − + − + ... can be
4 3! 5! 7!
expressed as


When a different number of terms are taken from the Maclurin series e and sin
2
4
for their values, the values in Table 3.5 are obtained.


Table 3.5: Calculation of e and sin values with Taylor series using different term
2
4
numbers.

2 sin =0.707106781186547 (True)
e = 7.389056098930650 (True) 4

Num e 2 value Cutting Error  Cutting Error


sin value
ber of (True - e 2
Value) 4 
terms (True- sin Value)
4
one one 6.389056098930650 0.785398163397448 0.785398163397448
2 3 4.389056098930650 0.704652651209168 0.002454129977380
3 5 2.389056098930650 0.707143045779360 -0.000036264592813
4 6.333333333333333 1.055722765597317
5 7 0.389056098930650
6 7.266666666666667 0.122389432263984
7 7.355555555555555 0.033500543375095
5
8 7.380952380952381 0.008103717978270
9 7.387301587301587 0.001754511629064
10 7.388712522045855 0.000343576884796


from Table 3.5 e that 9-10 terms from the series and sin
2
2-3 terms from the series
4
give very close results to the accepted value.

3.3 ITERATION ERROR

Linear, nonlinear and optimization problems are usually solved by numerical


methods and iteratively (step by step). Iterative methods use simple methods that
give approximate solutions. They try to achieve the real solution by applying simple
methods one after the other. Iterative methods start from an estimated solution,
called the initial value, and try to bring it closer to the real solution by correcting
it at each step. In iterative methods, the error in each iteration is called the
iteration error. In iterative methods, it is understood that the real solution is
reached by the difference of the solution values in the last two iterations.

the current iteration k represents the previous iteration k -1 and f the solution
value, the iteration error at the k -th iteration can be expressed as:

1- with the difference of the solution values in the two iterations: E = f k − f k −1


2- with the normalized differences of the solution values in the two iterations:

f k − f k −1
E= (3.14)
f k −1

The iteration error in Equation 1.14 is more commonly used in iterative solutions.

the E value in Equation 1.14 is less than a tolerance value as E   selected (


 = 0.001 if), it is considered that the real solution has been reached (converged).
E   The condition is called the convergence condition to the true solution, or
briefly the convergence condition, and is expressed in more detail as follows:
f k − f k −1
 (3.15)
f k −1

in Equation 1.15  is never zero due to rounding, clipping and truncation errors in
computers.

Depending on the iterative method chosen in iterative solutions, the solution error
in each iteration will also be different. While some methods reduce the errors in
iterations rapidly, some can reduce them slowly or increase the errors even more
if certain initial conditions are not met.

The iteration error in solving engineering problems is usually larger than the
rounding, trimming, and truncation errors. For this reason, the most critical step
in solving engineering problems is to determine the most appropriate iterative
method that will solve the problem accurately and quickly. The iteration error can
be reduced or kept under control by choosing an appropriate method for the
solution.

Example 3.6 : x + 2 x = 15 Iteratively obtain the solution of the equation with


2

Simple Iteration and Newton-Raphson methods and indicate the errors in each
iteration?

This equation x = −5 , x = 3 There are two real solutions. Let's try to obtain these
solutions with numerical methods (Simple Iteration and Newton-Raphson
methods). These methods are described in detail in Chapter 4. They will only be
briefly stated here.

a) Simple iteration

In this method, an iterative equation as follows is obtained by leaving the x in the


equation alone.

15 15
x 2 + 2 x = 15 ➔ x( x + 2) = 15 ➔ x = ➔ xk =
x+2 xk −1 + 2

15
x0 = 2 the initial value is selected and the above xk = iterative solution
xk −1 + 2
expression is used, the results in Table 3.6 are obtained.

b) Newton-Raphson method

In this method, the equation is first f ( x) = 0 converted to the root-finding form.


Then f (x) , by using the derivative of and, an iterative equation is obtained as
follows.

f ( xk −1 ) xk2−1 + 2 xk −1 − 15
xk = xk −1 − ➔ x = xk −1 −
2 xk −1 + 2
k
f ' ( xk −1 )
xk2−1 + 2 xk −1 − 15
x0 = 2 the initial value is selected and the above xk = xk −1 − iterative
2 xk −1 + 2
solution expression is used, the results in Table 3.6 are obtained.

Table 3. Iterative solution of equation 6: x + 2 x = 15 Simple Iteration (Substitution)


2

and Newton-Raphson methods.

Simple Iteration Newton-Raphson


iteration xk −1 xk xk − xk −1 xk −1 xk xk − xk −1
E= E=
xk −1 xk −1
one 2 3.7500 0.8750 2 3.1667 0.5833
2 3.7500 2.6087 0.3043 3.1667 3,00033 0.0516
3 2.6087 3.2547 0.2476 3,00033 3.0000 0.0011
4 3.2547 2.8546 0.1229 3.0000 3.0000 4.6258e-07
5 2.8546 3.0899 0.0824
6 3.0899 2.9470 0.0462
7 2.9470 3.0321 0.0289
8 3.0321 2.9809 0.0169
9 2.9809 3.0115 0.0103
10 3.0115 2.9931 0.0061
11th 2.9931 3,00041 0.0037
12 3,00041 2.9975 0.0022
13 2.9975 3.0015 0.0013
14 3.0015 2,9991 7.9574e-04

It is seen from Table 3.6 that the Newton-Rapson method causes lower errors in
each iteration (step) and converges to the correct result faster than the Simple
Iteration method.

SECTION SUMMARY

- A number of errors are encountered from modeling of engineering problems


to their solution.
- These errors can be grouped as 1) Modeling Error, 2) Operational Error, 3)
Iteration Error (Solution Method Error).
- Modeling error is the type of error made when expressing an engineering
problem. It arises from simplifying assumptions made on the problem to
facilitate the expression and solution of the engineering problem and to
reduce the solution time.
- Process errors are the types of errors that occur as a result of mathematical
operations in the solution of engineering problems. These errors are divided
into 2 groups as 1) Rounding errors, 2) Cutting errors.
- Errors caused by rounding or trimming variable values to fit the allocated
digits in the computer. Rounding errors can be reduced or controlled by
using double precision in mathematical operations.
- All functions can be expressed in polynomial series form with Taylor or
Maclurin series.
- is the type of error that occurs because of using a limited number of terms
from the series in the variables expressed with the series . The truncation
error can be reduced or controlled by taking more terms from the series.
- Iteration error (Solution method error) is the type of error that occurs due
to the use of simple methods in numerical methods using iterative methods.
It can be controlled by choosing the appropriate solution method.

You might also like