numerical methods i - university-books.euuniversity-books.eu/nummet1/sample_ade.pdf · sometimes,...

24
ISBN 978-953-7919-25-2 In colour by Ingram Digital Boris Obsieger NUMERICAL METHODS I Basis and Fundamentals Including 76 examples and 13 algorithms šgyM C C X X X M C V I I 1 0010 1100 1001 0000 0011

Upload: others

Post on 18-Sep-2019

1 views

Category:

Documents


0 download

TRANSCRIPT

  • ISBN 978-953-7919-25-2 In ccoolloouurr by Ingram Digital

    Boris Obsieger

    NUMERICAL METHODS I Basis and Fundamentals

    Including 76 examples and 13 algorithms

    ♦š

    ♦g

    ♦y

    M C C X X X M C V I I 1 0010 1100 1001 0000 0011

  • 11

    1. NUMERAL SYSTEMS There are three basic concepts of a number representation:

    • sign-value notation, • subtractive sign-value notation, • positional notation (place-value notation).

    A sign-value notation represents numbers by a series of numerals whose sum show up the represented number. In the Ancient Egyptian numeral system, for example, means hundred and means ten (Tab. 1.1), so means three hundred and ten (100 + 100 + 100 + 10). Tab. 1.1. Ancient Egyptian numerals Value 1 10 100 1000

    Hieroglyph

    Description Single stroke Heel bone Coil of rope Water lily (Lotus)

    Value 10 000 100 000 1 000 000

    Hieroglyph

    Description Finger Tadpole or Frog Man with both hands raised

  • 12 Numerical Methods I, Basis and Fundamentals

    Egyptian hieroglyphs were written in both directions (and even vertically). The main disadvantage of the Ancient Egyptian numeral system was that large numbers require a lot of hieroglyphs. For example, a large number like 999 needs 27 hieroglyphs ( ). Acrophonic Greek numerals A little bit shorter form of sign-value notation was based on Acrophonic Greek numerals1, innovated in the first millennium BC. Beside the symbols for 1, 10, 100, 1000 and 10000, the system had intermediate symbol for 5 and compound symbols for 50, 500, 5000 and 50000. The compound symbols were made by combining the symbol 5 with the symbols 10, 100, 1000 and 10000, Tab. 1.2. Tab. 1.2. Acrophonic Greek numerals Value 1 5 10 5⋅10 100 5⋅100 1000

    Symbol I Γ or Π Δ Γ H Γ X Value 5⋅1000 10 000 5⋅10 000 Example: 2064

    Symbol Γ M Γ X X Γ Δ I I I I Alphabetic Greek numerals Further improvements in a sign-value notation were achieved in the fifth century BC in the Alphabetic Greek numerals. Instead of using the separate set of symbols for numbers, values were assigned to lowercase letters of the old Greek alphabet based on their native alphabetic order, Tab. 1.3.

    Tab. 1.3. Values assigned to symbols in the old Greek alphabet Value 1 2 3 4 5 6 7 8 9

    Symbol α β γ δ ε ς ζ η ϑ Value 10 20 30 40 50 60 70 80 90

    Symbol ι κ λ μ ν ξ ο π Value 100 200 300 400 500 600 700 800 900

    Symbol ρ c τ υ ϕ χ ψ ω ϡ Value 1000 2000 3000 4000 5000 Example: 2064

    Symbol ,α ,β ,γ ,δ ,ε ,βξδ’ 1 The reason why this system is called acrophonic is because the numerals for 5, 10, 100, 1000 are the first letters of the Greek words for these numbers, namely ΠΕΝΤΕ, ΔΕΚΑ, ΗΕΚΑΤΟΝ, and ΧΙΛΙΟΝ.

    Δ H

    X M Δ

  • 1. Numeral Systems 13

    Of the 27 letters, nine were for units (1, 2, …, 9), nine for tens (10, 20, …, 90) and nine for hundreds (100, 200, …, 900). To mark that a sequence of letters is in fact a number (and not a text), a special sign like a vertical dash or accent assign is placed after the numerals, i.e., σνζʹ which represents 200+50+7=257. To write numbers larger than 1000, a similarly vertical dash sign is placed before the numerals and below the line of writing, such as ͵αϡπϑʹ representing 1000+900+80+9=1989. Glagolitic numerals The Glagolitic1 numeral system is similar to the Alphabetic Greek numeral system. To Glagolitic letters were assigned values based on their native alphabetic order, Tab. 1.4. Nine letters were for units (1, 2, …, 9), nine for tens (10, 20, …, 90), nine for hundreds (100, 200, …, 900) and remainder for thousands (1000, 2000,…). Numbers were distinguished from text by small square marks ♦, one before and one after each symbol.

    Tab. 1.4. Values assigned to symbols in the Glagolitic alphabet2 Value 1 2 3 4 5 6 7 8 9

    Symbol a b v g d e ž ѕ z Value 10 20 30 40 50 60 70 80 90

    Symbol y i j k l m n o p Value 100 200 300 400 500 600 700 800 900

    Symbol r s t u f H Ѡ ć c Value 1000 2000 3000 4000 5000 Example: 2064

    Symbol č š Ⱜ я ю ♦š♦m♦g♦ 1 The Glagolitic is the oldest known Slavic alphabet. It was invented during the 9th century by the Byzantine missionaries St Cyril (827-869 AD) and St Methodius (826-885 AD) in order to translate the Bible and other religious works into the language of the Great Moravia region. It is probably modelled on a cursive form of the Greek alphabet while their translations are based on a Slavic dialect of the Thessalonika area, which formed the basis of the literary standard known as Old Church Slavonic. This old Slavic scripts had remained in use by Croats up to 19th century. 2 The Croation version of symbols which was used about 14th century .

  • 14 Numerical Methods I, Basis and Fundamentals

    For example, a denotes a letter, while ♦a♦ denotes the numeral “1”. If needed, to represent numbers which are not assigned to any letter, two or more symbols would have to be adjoined together. For example, the number 2014 may be written as 2000+4+10 = ♦š♦g♦y♦. Subtractive sign-value notation Some improvements were made by subtractive sign-value notation. Roman numerals, for example, are generally written in descending order from left to right, but where a symbol of a smaller value precedes a symbol of a larger value, a smaller value is subtracted from a larger value, and the result is added to the total1. For example, M means thousand and I means one (Tab. 1.5), so MI denotes number 100111000 =+ , while IM denotes number 99910001 =+− . Tab. 1.5. Roman numerals2 Value 1 5 10 50 100 500 1000 Symbol I V X L C D M

    Value 5 000 10 000 50 000 100 000 500 000 1 000 000 Symbol V X L C D M

    Note that there is no need for the zero in a sign-value notation. Sign-value notation was the pre-historic way of writing numbers and only gradually evolved into the positional notation, also known as place-value notation, in which the value of a particular digit depends both on the digit itself and its position within the number. Positional notation In the positional notation, a number is represented by a sign (plus or minus) and digits, while the digital coma or the digital point (depending on a country) separates an integer part of a number from its fraction. Unlike the sign-value

    1 The notation of Roman numerals has varied through the centuries. Originally, it was common to use IIII instead of IV to represent four, because IV are the first two letters and consequently abbreviation for IVPITER, the Latin script spelling for the Roman god Jupiter. The notation which uses IV instead of IIII has become the standard notation in modern time, but with some exceptions. For example, Louis XIV, the king of France, who preferred IIII over IV, ordered his clockmakers to produce clocks with IIII and not IV, and thus it has remained [1]. 2 Roman numerals have remained in use mostly for the notation of Anno Domini years, and for numbers on clockfaces. Sometimes, Roman numerals are still used for enumerating the lists (as an alternative to alphabetical enumeration), and for numbering pages in prefatory material in books.

  • 1. Numeral Systems 15

    notation, there is an explicit need for zero in the positional notation. The number of digits with integer values zero, one, two, … that form a positional numeral system is called the base of the numeral system (e.g. if there are 10 digits with values from zero to nine, the base is 10). An integer number can be represented in a positional numeral system in base B with a sum of digits }1 ..., ,one ,zero{ −∈ Bdk multiplied by powers k of the base B as

    001

    101 ...)...( BdBdBddddinumbern

    nBn ⋅+⋅++⋅== . (1.1)

    A real number can be represented in base B as

    .........),...( 110

    010 +⋅+⋅++⋅==−

    −− BdBdBddddrnumbern

    nBn . (1.2)

    In both cases the leading zeroes are usually omitted assuming that nd is first non-zero digit. Sexsagesimal system Possibly the oldest positional numeral system is a sexsagesimal system, used around 3100 B.C., in Babylon. It is a combination of the sign-value and the positional notation in base 60 [2]. In Babylon, digits up to 59 were noted by using two symbols in the sign- -value notation: symbol to count units and symbol to count tens. These symbols and and their values were combined to form 59 digits in a notation similar to that of Roman numerals; for example, the combination represented the digit with a value of 23 (Fig. 1.1).

    Fig. 1.1. Digits used in Babylonian numeral system

    3 13 23 33 43 53

    4 14 24 34 44 54

    1 11 21 31 41 51

    2 12 22 32 42 52

    5 15 25 35 45 55

    6 16 26 36 46 56

    9 19 29 39 49 59

    7 17 27 37 47 57

    8 18 28 38 48 58

    10 20 30 50 40

  • 16 Numerical Methods I, Basis and Fundamentals

    These 59 digits are then used in positional numeral system in base 60 as it is illustrated in Example 1.1.

    Example 1.1. Babylonian numerals:

    231111010 =++++= , 30101010 =++= , 211 =+= , (1.3) 0160 6016022)"1" 22"(" ⋅+⋅== , .6030602)"30" 2"(" 0160 ⋅+⋅==

    The Babylonians did not have a digit for zero. What the Babylonians used instead was a space (and later a disambiguating placeholder symbol ) to indicate a place without value, similar to zero. In addition, Babylonians did not have any mark to separate integer from the fractional part of a number, but they calculated with real numbers, as it is illustrated in Example 1.2.

    Example 1.2. The Babylonian approximation of the square root of 2 in the context of Pythagoras’ theorem for an isosceles triangle. The approximation is illustrated on the round tablet that was, we believe, an education tablet from Ancient Babylonia, dated 1800 B.C. [3]. The tablet, Fig. 1.2, has a square with both diagonals drawn in. On one side of the square is written 03 = , the length of the square side. If this is treated as a fraction of the number (i.e., as the first figure of the fraction), then

    2/16003 1 =⋅= − . (1.4)

    Along one of the diagonals, the number is written

    2...41421296,160/1060/5160/241 32 ≈=+++= (1.5)

    and below it is the number

    1/2...0,70710648/6035/605242/60 32 ≈=++= . (1.6)

  • 1. Numeral Systems 17

    Fig. 1.2. Round tablet illustrating approximation of square root [3]

    In fact, the number is a remarkably good approximation of

    ... 1,414213562 = in four sexagesimal figures, which is about six decimal figures. Moreover, it is easy to see that 2≈ multiplied by 2/1 is

    2/1≈ , the diagonal length of the square of the side = 2/1 . Hexagesimal system This system must be distinguished from the sexsagesimal system, although both systems have the same base (and that is 60). One digit in the hexagesimal system is a decimal number from 0 to 59. Today, the hexagesimal system is used to express time (hours, minutes and seconds). Vigesimal system Another interesting positional system is a vigesimal system (base-twenty) used by the Pre-Columbian Maya civilization. The Maya numerals were made up by combining three symbols in signed value notation: zero (shell shape ), one (a dot ) and five (a bar ). The construction of 20 numerals (starting from zero) is shown in Tab. 1.6. For example, seventeen ( ) is written as two dots in a horizontal row above three horizontal bars stacked upon each other.

  • 18 Numerical Methods I, Basis and Fundamentals

    Tab. 1.6. Digits used in numeral system of Pre-Columbian Maya

    Value 0 1 2 3 4

    Glyph

    Value 5 6 7 8 9

    Glyph

    Value 10 11 12 13 14

    Glyph

    Value 15 16 17 18 19

    Glyph

    Because the base of the numeral system was 20, larger numbers were written down in powers of 20 from bottom to top. Fig. 1.3 shows how the number 2402 was written.

    2400206 2 =⋅ 0 200 1 =⋅ 2 202 0 =⋅

    sum 2402=

    Fig. 1.3. Number 2402 in Maya numeral system As it can be seen, the addition is just a matter of adding up dots and bars. Maya merchants often used cocoa beans, which they laid out on the ground to do these calculations. Addition is performed by combining the numeric symbols at each level

    + = ( 1367 =+ ). (1.7)

  • 1. Numeral Systems 19

    If five or more dots result from the combination, then five dots are replaced by a bar. If four or more bars result from the combination, then four bars are replaced by a shell and a dot is added to the next higher row. In subtraction, elements of the subtrahend symbol are removed from the minuend symbol:

    − = ( 012 20162019205239662402 ⋅+⋅+⋅==− ). (1.8)

    If there are not enough dots in a minuend position, then a bar is replaced by five dots. If there are not enough bars, then a dot is removed from the next higher minuend symbol in the column and four bars are added to the minuend symbol being worked on. Note that this corresponds almost exactly to the traditional addition and subtraction in the common base 10. Counting rods As one of ancient decimal systems, counting rods were used by mathematicians for calculation in ancient China, Japan, Korea, and Vietnam for more than two thousand years. They are small bars, typically 3-14 cm long and placed either horizontally or vertically (Tab. 1.7). The written forms based on them are called rod numerals. That was a true positional numeral system with digits for 1 to 9, and later for 0. Tab. 1.7. Counting roads (traditional version)

    Ver

    tical

    Value 0 1 2 3 4

    Symbol Value 5 6 7 8 9

    Symbol

    Hor

    izon

    tal

    Value 0 1 2 3 4

    Symbol Value 5 6 7 8 9

    Symbol

  • 121

    4. RANDOM VARIABLES AND PROCESSES Numerical analyses in the engineering practice and sciences are performed over random variables. Roughly speaking, random variable is such a variable whose value is an outcome from an observation of a random process. A typical random variable is the temperature, i.e., a measure of the average kinetic energy of molecules, whose chaotic moving is a random process. Unlike the temperature, some other physical quantities are not random, but the random process is inherent to their observation. An example is the measured value of a mass. Although the mass of a body (in the non-relativistic physics) is a constant variable (Chapter 3), the random process is inherent to its measurement. Values observed by repeated measurements fluctuate randomly about some average1 so that each observed value of the mass, as well as an average of observed values, has a random component. Those random variables whose observed values fluctuate about some average may be expressed in the form similar to that in expression (3.2):

    xxx Δ±= @ C.L. (in %), (4.1)

    but with different interpretation of x and xΔ . Herein, x is either an average of the observed values or just a single observed value. The magnitude of indeterminacy in x is quantified by the random error (or uncertainty) xΔ with some trust referred to as a confidence level C.L. (in %). Before a detailed 1 Fluctuations around some average can be observed only if the scale of measuring equipment is precise enough.

  • 122 Numerical Methods I, Basis and Fundamentals

    explanation of the random error (uncertainty) and its propagation (the subject of Chapter 5) it is necessary to make brief introduction to random processes, probability distributions, probability density, expected values and averages, variances, co-variances and correlations. 4.1 RANDOM PROCESSES A random (or stochastic) process is such a process which has some indeterminacy in its behaviour. There are various kinds of random processes. An example of a simple random process is illustrated in Fig. 4.1.

    Fig. 4.1. An example of a simple random process

    A blue ball is falling down through the labyrinth. At some crossings the ball can continue falling either left or right with equal probability, while at other crossings there is only one possible direction. This means that even when the initial condition (or starting point) is known, there are many (less or more probable) possibilities a random process might go to. The blue ball leaves the labyrinth at the one of nine exits A , B , C , …, H or J (in Fig. 4.1 at the exit E ), what is then referred to as the one of nine elementary events A , B , C , …, H and J . Events are described in Appendix A.1.

    EA B C D F G H J

  • 4. Random Variables and Processes 123

    4.1.1 Definition of random variables A set of all possible outcomes of an observation can consist of countably many1 (finite or infinite) or in uncountably many2 (infinite) elementary events. Assigning numbers to elementary events defines random variable. If there are countably many events, the random variable is discrete, otherwise it is continuous. Since events are occurring randomly, every random variable X can be considered as a quantity that takes its value x randomly from some (discrete or continuous) set of numbers kx ( nk ,...,2,1= ).

    It should be emphasized that random variable in statistics is denoted with italic uppercase letter, while its values as well as constant variables are denoted with italic lowercase letter. On the contrary, in engineering practice and science both types of variables are denoted either with italic lowercase or italic uppercase letters. Most of these variables are random, while other are non-random.

    Every system of elementary events can be described either by a scalar random variable or by a random vector, whose components are several independent random variables. This must be distinguished from redundant random variables that are related to each other (see Example 4.1). Discrete random variables Events of the countable system of elementary events may be associated with natural numbers from some (finite or infinite) subset of natural numbers, or possibly with real numbers from some countable subset of real numbers. Assigning these numbers to the events of the countable system of elementary events defines a discrete random variable, Example 4.1.

    Example 4.1. Discrete random variables. A discrete random variable X in Tab. 4.1 is defined by its values

    }{1,2,...,9∈x associated with the elementary events A , B , …, J of the random process described with Fig. 4.1. Another discrete random variable

    XY = in Tab. 4.1 is defined by its values }9,...,3,2{1,∈y on the same events.

    1 The elements of a countable set can be counted one at a time – although the counting may never finish. For example, natural numbers and rational numbers can be counted. 2 Uncountable set is an infinite set that contains too many elements to be countable. For example, irrational numbers can not be counted even in a finite interval.

  • 124 Numerical Methods I, Basis and Fundamentals

    Tab. 4.1. Random variables associated to the labyrinth in Fig. 4.1. Event A B C D E F G H J X 1 2 3 4 5 6 7 8 9 Y 1 2 3 4 5 6 7 8 9

    Random variables X and XY = are strictly dependent, so that only one of them is sufficient; the second one is redundant. However, there are many other random variables that can be defined on the given system of events. The results of the observation given in Fig. 4.1 (blue ball leaves the labyrinth at the exit E ) are 5=x and 5=y .

    Sometimes, events have “coordinates” in a multidimensional space. In such a case, a system of countably many elementary events will be described with a vector whose components are independent discrete random variables. A typical example for that is a countable system of elementary events zxy...A , denoted by indices

    zyx ,...,, , which are the possible values of independent random variables ZYX ,...,, . These random variables X to Z are then components of a random vector.

    Continuous random variables Elementary events of the uncountable system of events may be associated with real numbers from some uncountable set of real numbers. Assigning these numbers to the elementary events of the uncountable system of events defines a continuous random variable in the form of a scalar or a vector. Typically, a continuous random variable takes all the possible values in a continuous m-dimensional real domain Ω in which it is defined. In the one-dimensional space ( 1=m ), this domain may be either a finite interval ],[ ba , a semi-infinite interval as )[0,+∞ , or the infinite interval ),( +∞−∞ . Although there are uncountably many possible values in an interval ],[ ba (either finite or infinite), only the finitely many rounded values may be observed and then recorded in a finite precision, even when the scale of measuring equipment is analogue (what in theory implies infinite precision). That is, if the used format is a B bit wide binary format, then B2 different values kx (

    Bk 2,...,3,2,1= ) may be recorded. The number of possible values can be very large (e.g. if 32=B , then 296 967 294 4232 = ), but it is still countable and finite, Fig. 4.2.

  • 4. Random Variables and Processes 125

    Fig. 4.2 Ranges in the floating-point formats

    If recorded value kx were rounded by truncation, then each of them would represent the finite interval ),[ 1+=Ω kkk xx ( }12,...,3,2,1{ −∈

    Bk ). If the lowest possible value 1x denotes negative overflow ( −∞=1x ) and if the highest possible value Bx2 denotes positive overflow ( +∞=Bx2 ), then the complete set of all possible intervals

    ),[ 1+kk xx ( 12,...,3,2,1 −=Bk ) builds the continuous and infinite interval ),( ∞−∞ .

    Although the values of continuous random variables cannot be used as indices in denoting elementary events (like discrete random variables), they can be used in describing uncountably many events by using a logical statement which includes inequalities with random variables and their values, Example 4.2.

    Example 4.2. Continuous random variables. The lifetime T of light-bulbs is a continuous random variable. An elementary event tT = that the lifetime T of randomly selected light-bulb is exactly t is unobservable, because a real number can have an infinite number of nonzero decimal places. The scale of any measuring equipment has finite precision so that an event 21 tTt

  • 126 Numerical Methods I, Basis and Fundamentals

    Population in statistics is an entire group (or collection) of entities (people, animals, things, etc.) or events that have something in common and about which some descriptions or conclusions are made. Examples of populations are: members of a club, all textbooks published last year by some publisher, all possible paths in the labyrinth, etc. More widely, population is every set of data that consists of all conceivably possible (or hypothetically possible) observations of a given phenomenon. Minimal population is a part of whole population with a minimal number of members required to quantify a random process. For example, the minimal population in the simple random process in Fig. 4.3a consists of all possible paths (eight of them), Fig. 4.3b.

    Fig. 4.3. Simple labyrinth, a – single path, b – population of paths

    A whole population may consist of a lot of equal minimal populations. A collection of several equal minimal populations quantify the same random process as only one of them. Population frequency Minimal population for the labyrinth in Fig. 4.3a consists of 8=n paths (Fig. 4.3b) that are ending at the exits A, B, C and D respectively in the quantities 1A =ϕ , 3B =ϕ , 3C =ϕ and 1D =ϕ . (4.2) Quantities Aϕ , Bϕ , … are called population frequencies. It is obvious that n

  • 4. Random Variables and Processes 127

    quotient

    nPP /)path()A( AA ϕϕ == , (4.4)

    where ...BA ++= ϕϕn is the sum of the population frequencies ... , , BA ϕϕ for all events in the complete set of elementary events },...B,{A . In the given example (Fig. 4.3), 8=n , 125,0)path( =P so that

    125,0)A( =P , 375,0)B( =P , 375,0)C( =P and 125,0)D( =P . (4.5)

    Unfortunately, random processes are not always that simple so that quantification of random processes by studying their minimal populations can not be applied to all of them. 4.1.3 Equivalent non-random process A possible way to quantify a random process is to simulate it by an equivalent non-random process. Consider that some quantity (e.g. 1024) of equal balls1 starts simultaneously falling down through the labyrinth in Fig. 4.4.

    Fig. 4.4. Streams of balls in the upper part of labyrinth in Fig. 4.1

    1 Although the balls are initially equal, after passing through the labyrinth, each ball will have a path associated to it. Thus, after leaving the labyrinth, the balls will differ by their history. However, some balls can share the same history so that they can be equal.

    1024

    512 512

    256

    128 128

    256 256 256

    128

    64

    128 128 128

    192 192 128 128

    320 192

    64

    64 160 32 160 64 32 256 256

    x

  • 128 Numerical Methods I, Basis and Fundamentals

    At those crossings where the single ball can continue falling either left or right with equal probability, the incoming stream of balls is divided into two equal streams: one going left and another going right. In this way, the random process in the labyrinth can be simulated by the equivalent non-random process. Consider now the non-random process equivalent to the random process in Fig. 4.1, in which all balls start falling down through the labyrinth, as it is illustrated in Fig. 4.4. Each ball can pass up to 10 crossings before it reaches an exit so that the stream of balls will be cut in two up to 10 times. Since a single ball cannot be divided, the results of those dividings must be integers greater or equal to the number 1. In the given example, this can be achieved by the minimal quantity of

    1024210 = balls. Numbers between crossings in Fig. 4.4 represent the quantity of passed balls. At the entrance of the labyrinth the 1024=n balls are divided into two streams of 512 balls. Each stream is then divided into two sub-streams of 256 balls, etc. However, when two streams come to the same crossing, they are first merged and then divided. For example, two incoming streams of 320192128 =+ balls are merged at the crossing marked with “x” and then divided into two equal streams each containing 1602/320 = balls. Finally, the balls are leaving the observed labyrinth at the exits (events A , B , C , …, H and J ) in the quantities that are equal to the population frequencies Aϕ , Bϕ , …, Hϕ , Jϕ (Tab. 4.2). Probability Probability )A(P that an elementary event A will occur is the quotient

    nP /)A( Aϕ= , (4.6)

    where ...BA ++= ϕϕn is the sum of the population frequencies ... , , BA ϕϕ for all events in the complete set of elementary events },...B,{A , Example 4.3.

    Example 4.3. Some properties of probability. Probabilities that a blue ball in the random process depicted in Fig. 4.1 will leave the labyrinth at the corresponding exit (elementary events A , B , …, J ) are

    nP /)A( Aϕ= , nP /)B( Bϕ= , …, nP /)J( Jϕ= . (4.7)

    The obtained probabilities are listed in Tab. 4.2.

  • 171

    6. REGRESSION Regression consists in fitting a function to a set of data points by finding such parameters in the function that provide the best fit. The fitted function is referred to as a regression model, while their graphical representation is referred to as a trendline. Regarding the applied function, the most popular regressions are

    • Linear regression • Polynomial regression • Exponential regression • Logarithmic regression • Power regression

    Other methods of fitting a function to a set of data points are described in Volume III and Volume IV of Numerical Methods. There are two approaches in performing regressions: the first approach when the variance in residual of a function is minimised, and the second approach when the variance in residuals of all variables is minimised. Regressions based on the first approach may be referred to as the “simple” so as to distinguish them from regressions based on the second approach, which are referred to as the “orthogonal”. 6.1 LINEAR REGRESSION The most popular types of linear regressions are

    • Simple linear regression • Linear regression through a fixed point • Orthogonal linear regression

  • 172 Numerical Methods I, Basis and Fundamentals

    6.1.1 Simple linear regression In the regression model, the linear function bxaxF +=)( (6.1) is fitted to a set of N data points ),( yx by finding those values of constants a and b that minimise the variance in residual. The residual yε in each data point ),( yx

    )(xFyy −=ε (6.2)

    is the difference between the value y and the value )(xF predicted by the regression model for the given x. It represents a "vertical" distance between the observed data point and the fitted curve. This is illustrated in Fig. 6.1.

    Fig. 6.1. Residual in simple linear regression

    To explain the meaning of the residual yε , the function )(xF should be eliminated from the expressions (6.1) and (6.2), giving ybxay ε++= . (6.3) If x and y are both constant variables, then the residual yε may be

    • the nonlinear component of the true function )(xy , which is excluded from the linear regression model, or

    • the function ,...),( 21 zzyy εε = of independent variables ,..., 21 zz , whose influence to y is unknown, whether or no the function ,...),( 21 zzyε be unknown or variables ,..., 21 zz are not observed together with x and y.

    In both cases, the regression model bxaxF +=)( is just an approximation of the true function )(xy . If y is just a random variable, then the residual yε is merely an observation error in y, while )(xF predicts the expected value )(E y of y for the given x. The

    y

    x0

    ))(,( xFx

    ),( yx

    )()(E xFy =

    )(E y

    Trendline

  • 6. Regression 173

    argument x in )(xF is assumed to be a constant variable, otherwise orthogonal linear regression should be performed (Chapter 6.1.3). It is convenient to introduce notation for averages in x and y:

    ,)(1 ,)(1

    11∑∑==

    ==N

    i

    N

    i

    iyN

    yixN

    x (6.4)

    and for average residual

    ).(]))(()([1)(1

    11

    xbayixFiyN

    iN

    N

    i

    N

    iyy +−=−== ∑∑

    ==

    εε (6.5)

    The sample variance in residual

    2))((1

    1 2221

    22xxyy

    N

    i

    sbbssiN

    s +−=−−

    = ∑=

    εεε , (6.6)

    where xs and ys (4.72) are sample variances in x and y, while xys (4.52) is their covariance. Two unknown constant coefficients a and b can be determined by the conditions 0=ε , 0/2 =∂∂ bsε , (6.7) that minimises both: the magnitude of average residual ( 0||min =ε ) and the empirical variance 2εs . These two conditions give

    xbya −= and 2/ xxy ssb = . (6.8)

    The final form of the regression model

    2/ )()( xxy ssxxyxF −+= . (6.9)

    Therefore, a trendline in the simple linear regression is the straight line passing through the point ( yx, ) with the slope 2/ xxy ss . The minimal sample variance in residual for given b has a value

    )1)(1()/)(/(min rrssssssss yxxyyxxyy +−=+−=ε , (6.10)

    where yxxy sssr /= (4.88) is the sample coefficient of regression. Simple linear regression is illustrated with Example 6.1. The practical application is supported by Algorithm 6.1.

  • 174 Numerical Methods I, Basis and Fundamentals

    Example 6.1. Simple linear regression. Simple linear regression is performed using data in Tab. 6.1. Results are illustrated by diagrams in Fig. 6.2.

    Tab. 6.1. Data for linear regression (example)

    i 1 2 3 4 5 6 7 x(i) 0,1 0,2 0,4 0,5 0,6 0,8 0,95 y(i) 1,115 1,115 1,38 1,6 1,5 1,82 1,93

    Average values and variances are

    286. 214 0,095 238, 320 0,101 476, 690 0,093

    714,2851,494 857,142 0,50722 ===

    ==

    xyyx sss

    yx (6.11)

    Constants

    .9789,0 ,0163,1/ 2 =−=== xbyassb xxy (6.12)

    The regression model (trendline) is determined by the function xxF 0163,19789,0)( += . (6.13) The squared correlation coefficient 955,0)/( 2222 == yxxy sssr (Chapter 4.2.7).

    1

    1,2

    1,4

    1,6

    1,8

    2

    0 0,2 0,4 0,6 0,8 1x

    y

    Trendline

    Limits for confidence level 99%

    Fig. 6.2. Example of simple linear regression

    Sample variance and standard deviation in residual are

    00456,0 2 2222 =+−= xxyy sbbsssε and 0,0675=εs . (6.14)

  • 6. Regression 175

    Uncertainties in residual NstMy /εαε =Δ (5.22) for several confidence levels (Chapter 5.3), 7=N and 1−= NM are given in Tab. 6.2. Tab. 6.2. Uncertainties in residual (example)

    1−α 50% 70% 90% 95% 99% tMα 0,718 1,134 1,943 2,447 3,707

    Δεy 0,0183 0,0289 0,0495 0,0624 0,0945

    Algorithm 6.1. Simple linear regression Input data: )(ix , )(iy , N Output data: a, b, r2 // Averages 0== aveyavex for 1=i to N )(ixavexavex += )(iyaveyavey += endfor Navexavex /= Naveyavey /=

    // Sample variances and covariance 022 === sxysysx for 1=i to N 2))((22 avexixsxsx −+= 2))((22 aveyiysysy −+= ))()()(( aveyiyavexixsxysxy −−+= endfor )1/(22 −= Nsxsx )1/(22 −= Nsysy )1/( −= Nsxysxy

    // Coefficients 2/ sxsxyb = , avexbaveya ⋅−= )22/(2 sysxsxysxyr ⋅⋅= end

    // ∑=

    =N

    i

    ixN

    x1

    )(1

    // ∑=

    =N

    i

    iyN

    y1

    )(1

    // ∑=

    −−

    =N

    ix xixN

    s1

    22 ))((1

    1

    // ∑=

    −−

    =N

    iy yiyN

    s1

    22 ))((1

    1

    // ∑=

    −−−

    =N

    ixy yiyxixN

    s1

    ))()()((1

    1

    // 2/ xxy ssb = // xbya −= // 2222 / yxxy sssr =

  • About author Boris Obsieger, D.Sc., professor at the Universityof Rijeka, Croatia. Head of Section for MachineElements at the Faculty of Engineering in Rijeka.Holds lectures on Machine Elements Design,Robot Elements Design, Numerical Methods inDesign and Boundary Element Method. Severalinvited lectures. President of CADAM Confe-rences. Main editor of international journalAdvanced Engineering. Author of several booksand a lot of scientific papers.

    Boris Obsieger NUMERICAL METHODS I Basis and Fundamentals The series of books Numerical Methods iswritten primarily for students at technicaluniversities, but also as a useful handbook forengineers, PhD students and scientists. This volume introduces the reader into nume-ral systems and representation of numbers indigital computers. Possibly the most importantpart of this book are descriptions of differencesbetween constant and random variables, relatedtypes of errors and error propagations. Thesetopics are supplemented with various types ofregression analyses. Finally, direct and iterativemethods for finding roots of polynomials areexplained. Practical application is supported by 76 exam-ples and 13 algorithms. For reasons of simplicity,algorithms are written in pseudo-code, so they caneasily be included in any computer program.

    Printed in ccoolloouurrISBN 978-953-6326-66-2 ISBN 978-953-57117-1-1

    ISBN 978-953-7919-25-2 Adobe® Digital Editions by Ingram Digital

    eBook in ccoolloouurrfàtÇwtÜw ÉÑà|ÉÇ

    Front covereBook in EnglishObsieger, NUMERICAL METHODS IAuthor & ReviewersTitle PageCopyright ©PrefaceCONTENTSSome mathematical symbolsEvents

    1. NUMERAL SYSTEMSSign-value notationAncient Egyptian numeralsAcrophonic Greek numeralsAlphabetic Greek numeralsGlagolitic numerals

    Subtractive sign-value notationPositional notationSexsagesimal systemHexagesimal systemVigesimal systemCounting rodsModern numeral systems

    1.1 DECIMAL SYSTEMDecimal mark

    1.2 BINARY SYSTEM1.2.1 Conversions from the binary to the decimal system1.2.2 Conversions from the decimal to the binary system

    1.3 OCTAL SYSTEM1.4 HEXADECIMAL SYSTEMExamples in Chapter 1.Example 1.1. Babylonian numeralsExample 1.2. The Babylonian approximation of the square root of 2Example 1.3. Decimal systemExample 1.4. Conversion of a binary number into a decimal number bynumerical operations in the decimal systemExample 1.5. Conversion of a binary number into a decimal number bynumerical operations in the binary system.Example 1.6. Conversion of a decimal number into a binary number bynumerical operations in the decimal system.Example 1.7. Conversion of a decimal number into a binary number bynumerical operations in the binary systemExample 1.8. Conversion of octal numbersExample 1.9. Conversion of hexadecimal numbers

    Tables in Chapter 1.Tab. 1.1. Ancient Egyptian numeralsTab. 1.2. Acrophonic Greek numeralsTab. 1.3. Values assigned to symbols in the old Greek alphabetTab. 1.4. Values assigned to symbols in the Glagolitic alphabetTab. 1.5. Roman numeralsTab. 1.6. Digits used in numeral system of Pre-Columbian MayaTab. 1.7. Counting roads (traditional version)Tab. 1.8. Octal digitsTab. 1.9. Hexadecimal digits

    Figures in Chapter 1.Fig. 1.1. Digits used in Babylonian numeral systemFig. 1.2. Round tables illustrating approximation of square rootFig. 1.3. Number 2402 in Maya numeral system

    2. NUMBERS IN DIGITAL COMPUTERS2.1 BINARY CODED DECIMAL (BCD)2.2 DENSELY PACKED DECIMAL (DPD)2.3 NEGATIVE INTEGERS2.3.1 Second complement2.3.2 Biased integers

    2.4 FORMATS OF NUMBERS IN DIGITAL COMPUTERS2.5 BINARY INTEGER FORMATS2.5.1. Binary integer in byte2.5.2 Short integer (16 bits)2.5.3 Integer (32 bits)2.5.4 Long integer (64 bits)2.5.5 Double long integer (128 bits)

    2.6 DECIMAL INTEGER FORMATS2.7 INTRODUCTION TO FLOATING-POINT FORMATS2.7.1 Types of floating-point formats2.7.2 Binary significand2.7.3 Decimal significand

    2.8 BINARY FLOATING-POINT FORMATS2.8.1 Bynary16 (Half-precision binary format)2.8.2 Bynary32 (Single-precision binary format)2.8.3 Bynary64 (Double-precision binary format)2.8.4 Binary80 (Extended double-precision binary format)2.8.5 Binary128 (Quadruple-precision binary format)

    2.9 DECIMAL FLOATING-POINT FORMATS2.9.1 Decimal32 (Single-precision decimal format)2.9.2 Decimal64 (Double-precision decimal format)2.9.3 Decimal128 (Quadruple-precision decimal format)

    Examples in Chapter 2.Example 2.1. Conversion of binary coded decimal numbersExample 2.2. Second complement in the binary notation.Example 2.3. Second complement in the decimal notation.Example 2.4. Signed and unsigned representation of a number.Example 2.5. Possible representations and coding of the significand.Example 2.6. Conversion of integer number 314 in base 10 to the half-precision floating point number.Example 2.7. Conversion of decimal number 0,333 in base 10 to the half-precision floating point number.Example 2.8. Conversion of number 314,333 in base 10 to the half-precision floating point number.Example 2.9. Some characteristic numbers in the half-precision binary formatExample 2.10. Some characteristic numbers in the single-precision binaryformat in the hexadecimal numeral systemExample 2.11. Some characteristic numbers in the double-precision binaryformat in the hexadecimal numeral systemExample 2.12. Some characteristic numbers in the extended double-precisionbinary format in a hexadecimal numeral systemExample 2.13. Multiple possible representations in the decimal32 format.Example 2.14. Multiple possible representations in the decimal64 format.Example 2.15. Multiple possible representations in the decimal32 format.

    Tables in Chapter 2.Tab. 2.1. Binary coded decimal (BCD) conversion tableTab. 2.2. Densely packed decimal (DPD) encoding rulesTab. 2.3. Formats of numbers in computersTab. 2.4. Range of unsigned and signed integersTab. 2.5. Some characteristic values of 8-bit integersTab. 2.6. Possible representations of number 13 with 4-digit significandTab. 2.7. Main types of binary floating-point formatsTab. 2.8. Ranges of the exponent in binary floating-point formatsTab. 2.9. Main types of decimal floating-point formatsTab. 2.10. Ranges of exponent in decimal floating-point formats

    Figures in Chapter 2.Fig. 2.1. Comparison of standard memory framesFig. 2.2. Formats of numbers in 8 and 16-bit framesFig. 2.3. Binary integers in 8-bit frameFig. 2.4. Binary integers in 16-bit frameFig. 2.5. Binary integers in 32-bit frameFig. 2.6. Binary integers in 64-bit frameFig. 2.7. Binary integers in 128-bit frameFig. 2.8. BCD integers in 8 and 16 bit framesFig. 2.9. An omitted bit in IEEE 754 binary floating-point formatsFig. 2.10. A comparison of IEEE 754 binary floating-point formatsFig. 2.11 Positive and negative zero according to IEEE 754 StandardFig. 2.12 Positive and negative infinity according to IEEE 754 StandardFig. 2.13. The fields in 16-bit binary floating-point numberaccording to IEEE 754 StandardFig. 2.14 The fields in 32-bit binary floating-point numberaccording to IEEE 754 StandardFig. 2.15. The fields in 64-bit binary floating-point numberaccording to IEEE 754 StandardFig. 2.16. Extended double-precision floating-point format(80 bits) according IEEE 754 StandardFig. 2.17. The fields in 128-bit binary floating-point numberaccording to IEEE 754 StandardFig. 2.18. The fields in IEEE 754 decimal floating-point numbers – type IFig. 2.19. The fields in IEEE 754 decimal floating-point numbers – type IIFig. 2.20. A comparison of decimal floating-point formats of type IFig. 2.21. A comparison of decimal floating-point formats of type IIFig. 2.22. The significand in an IEEE 754 decimal floating-point – type IIFig. 2.23 Positive and negative infinity according to IEEE 754StandardFig. 2.24. The fields in decimal32 floating-point format – type IFig. 2.25. The fields in decimal32 floating-point format – type IIFig. 2.26. The fields in Decimal64 floating-point format – type IFig. 2.27. The fields in Decimal64 floating-point format – type IIFig. 2.28. The fields in Decimal128 floating-point format – type IFig. 2.29. The fields in Decimal128 floating-point format – type II

    3. VARIABLES AND NUMERICAL ERRORS3.1 COMMON TERMINOLOGY3.1.1 Errors and uncertaintyNumerical errorsRandom errors

    3.1.2 Precision vs accuracyIn the computer terminology ...In engineering and science ...

    3.1.3 Significant digits vs accuracy

    3.2 NUMERICAL ERRORS3.2.1 Rounding errorsDouble Rounding

    3.2.2 Representation error

    3.3 PROPAGATION OF NUMERICAL ERRORFunction of a single variableFunction of more than one variableFunction of one nested functionFunction of multiple nested functionsCondition number3.3.1 Propagated error of a single variablePower ruleExponential functionsExponential functions in base eLogarithmic functions

    3.3.2 Propagated error of multiple variablesAdding and subtractingSubtractive cancellationAdding and subtracting with weighting constantsAdding and subtracting integer with floating-point numbersMultiplying and dividingMultiplying and dividing with a weighting constantMultiplying and dividing integer by floating-point number

    3.4 PROPAGATED ERROR VS REPRESENTATION ERROR3.5 NUMERICAL INSTABILITY3.6 METHOD ERROR3.7 APPROXIMATION ERRORExamples in Chapter 3.Example 3.1. Error in the average of constant and random variables.Example 3.2. Rounding to the nearest value.Example 3.3. Double-rounding.Example 3.4. Conversion of number “0,1” in the decimal numeral system to the single precision binary floating-point format.Example 3.5. Error-free representation of a decimal number.Example 3.6. Floating-point representation of integer numbers.Example 3.7. Propagated error of multiple nested functions.Example 3.8. Condition number of a function.Example 3.9. Rearranging the formulaExample 3.10. Power rule.Example 3.11. Condition number of the square root.Example 3.12. Propagated error in adding.Example 3.13. Subtractive cancellation.Example 3.14. Adding with the error-free weighting constants.Example 3.15. Propagated error of the product.Example 3.16. Propagated error of the weighted product.Example 3.17. Numerical error of the IEEE 754 floating point addition.Example 3.18. Numerical error in the natural logarithm.Example 3.19. Numerically instable summation algorithm.Example 3.20. Comparison of errors in expressions

    Algorithms in Chapter 3.Algorithm 3.1. Stable and accurate summation algorithm

    Tables in Chapter 3.Tab. 3.1. Representation errors of binary floating-point formatsTab. 3.2. Representation errors of decimal floating-point formatsTab. 3.3. Condition number for tan xTab. 3.4. Condition numbers CN1 (for Δ1 = Δx ) and CN2Tab. 3.5. Comparison of errors for 6-digit precision

    Figures in Chapter 3.Fig. 3.1. Precision and accuracy in engineering and scienceFig. 3.2. Comparison of errors

    4. RANDOM VARIABLES AND PROCESSES4.1 RANDOM PROCESSES4.1.1 Definition of random variablesDiscrete random variablesContinuous random variables

    4.1.2 Quantification of random processesPopulationMinimal populationPopulation frequencyProbability

    4.1.3 Equivalent non-random processProbability

    4.1.4 Probability distribution4.1.5 Probability density4.1.6 Probability function4.1.7 SamplingSampleSampling the discrete random variableSample frequency and estimated probabilitySampling the continuous random variable

    4.2 PARAMETERS AND STATISTICS4.2.1 Expected valueProperties of expected valuesExpected value of a constantMonotonicity.Symmetry.Linearity.

    4.2.2 Arithmetical average and meanMeanPopulation meanSample meanSample mean vs population mean

    4.2.3 Population covarianceCorrelated and uncorrelated random variablesDependent and independent random variablesBasic properties of covariance

    4.2.4 Sample covarianceExpected value of sample covariance

    4.2.5 VarianceBasic properties of varianceSum of uncorrelated random variablesProduct of independent variablesVariance of a functionSample varianceEstimated value of sample variance

    4.2.6 Standard deviationsStandard population deviationStandard deviation of averageStandard sample deviation

    4.2.7 Correlation coefficientVariance of average vs correlation coefficientSample correlation coefficient

    4.2.8 Linear combinations of random variables4.2.9 Non-linear combinations of random variables

    Examples in Chapter 4.Example 4.1. Discrete random variables.Example 4.2. Continuous random variables.Example 4.3. Some properties of probability.Example 4.4. Population mean of a random variableExample 4.5. Dependent and uncorrelated random variables.

    Tables in Chapter 4.Tab. 4.1. Random variables associated to the labyrinth in Fig. 4.1.Tab. 4.2. Distribution of n = 1024 balls in labyrinth in Fig. 4.1.Tab. 4.3. Parameters and statistics

    Figures in Chapter 4.Fig. 4.1. An example of a simple random processFig. 4.2 Ranges in the floating-point formatsFig. 4.3. Simple labyrinthFig. 4.4. Streams of balls in the upper part of labyrinth in Fig. 4.1Fig. 4.5. Probability distribution for the labyrinth in Fig. 4.1.Fig. 4.6. Continuous distributionFig. 4.7. Probability density functionFig. 4.8. Probability functionFig. 4.9. Simple labyrinthFig. 4.10. Example of sample frequency distributionFig. 4.11. Correlation of two random variables

    5. RANDOM ERRORS AND UNCERTAINTY5.1 NORMAL DISTRIBUTIONDensity function of normal distributionDistribution function

    5.2 ERROR IN THE MEAN (REPEATED OBSERVATIONS)5.3 UNCERTAINTY VS SAMPLE DEVIATION5.4 PROPAGATION OF UNCERTAINTY5.4.1 Function of a single variable5.4.2 Propagated random error of multiple variablesAddition and SubtractionAddition and Subtraction with ConstantsThe Product and Quotient RulesMultiplication and Division with Weighting constant

    5.5 RANDOMISATION OF CONSTANT VARIABLESExamples in Chapter 5.Example 5.1 Diameter of a ball.Example 5.2. Volume of a ball.Example 5.3. Comparison of a propagated measured uncertainty and apropagated numerical error in summation.Example 5.4. Perimeter of a rectangle.Example 5.5. Volume of a room is given by the length, width and heightExample 5.6. Area of a triangle.

    Tables in Chapter 5.Tab. 5.1. Density function of normal distributionTab. 5.2. Values for tα for single observation and various confidence levelsTab. 5.3. Values t for Student continuous distributions with the M degrees of freedomTab. 5.4. Example of measured values

    Figures in Chapter 5.Fig. 5.1. Histogram of the normal distribution for 1000 observationsFig. 5.2. Density function of the normal distributionFig. 5.3. Confidence limits for single measurementFig. 5.4. Confidence limits for averageFig. 5.5. Construction of uncertainty in 80-bit binary FP format

    6. REGRESSION6.1 LINEAR REGRESSION6.1.1 Simple linear regression6.1.2 Simple linear regression through a fixed point6.1.3 Simple linear regression in multiple variables6.1.4 Orthogonal linear regression in two variables6.1.5 Orthogonal linear regression in multiple variables

    6.2 POLYNOMIAL REGRESSION6.3 LOGARITHMIC REGRESSION6.4 EXPONENTIAL REGRESSION6.5 POWER REGRESSIONExamples in Chapter 6.Example 6.1. Simple linear regression.Example 6.2. Comparison of the simple and the orthogonal linear regression.Example 6.3. Logarithmic regression.Example 6.4. Exponential regression.Example 6.5. Power regression.

    Algorithms in Chapter 6.Algorithm 6.1. Simple linear regressionAlgorithm 6.2. Simple linear regression trough the fixed pointAlgorithm 6.3. Orthogonal linear regressionAlgorithm 6.4. Logarithmic regressionAlgorithm 6.5. Exponential regressionAlgorithm 6.6. Power regression

    Tables in Chapter 6.Tab. 6.1. Data for linear regression (example)Tab. 6.2. Uncertainties in residual (example)Tab. 6.3. Data for logarithmic regression (example)Tab. 6.4. Data for exponential regression (example)Tab. 6.5. Data for power regression (example)

    Figures in Chapter 6.Fig. 6.1. Residual in simple linear regressionFig. 6.2. Example of simple linear regressionFig. 6.3. Simple linear regression through a fixed pointFig. 6.4. Orthogonal linear regressionFig. 6.5. Orthogonal linear regression in two variablesFig. 6.6. Two solutions in orthogonal linear regressionFig. 6.7. A comparison of simple and orthogonal linear regressionFig. 6.8. Orthogonal linear regressionFig. 6.9. Residual in polynomial regressionFig. 6.10. Residual in the logarithmic regressionFig. 6.11. Example of the logarithmic regressionFig. 6.12. Trendline in the logarithmic diagramFig. 6.13. Residual in the exponential regressionFig. 6.14. Example of the exponential regressionFig. 6.15. Exponential regression in logarithmic diagramFig. 6.16. Residual in the power regressionFig. 6.17. Example of the simple power regressionFig. 6.18. Power regression in the logarithmic diagram

    7. ROOTS OF UNIVARIATE POLYNOMIALS7.1 DESCARTES’ RULE OF SIGNS7.2 ROOTS OF SECOND DEGREE POLYNOMIALS7.2.1 Floating-point implementation

    7.3 ROOTS OF THIRD DEGREE POLYNOMIALS7.3.1 Polynomials with three real roots7.3.2 Polynomials with two equal real roots7.3.3 Polynomials with three equal real roots7.3.4 Algorithm for finding three real rootsApplication

    7.3.5 Polynomials with one real and a pair of complex roots7.3.6 Algorithm for finding real and complex roots

    7.4 ROOTS OF FORTH DEGREE POLYNOMIALS7.4.1 Real roots7.4.2 Complex-conjugated roots

    7.5 NEWTON’S METHOD7.6 WEIERSTRASS METHODExamples in Chapter 7.Example 7.1. Application of Descartes’ rule of signs to a polynomialExample 7.2. Accuracies of roots of the second degree polynomialExample 7.3. Accuracies of roots of the second degree polynomial in the Example 7.2Example 7.4. Finding roots of the third degree polynomialExample 7.5. Finding roots of the third degree polynomialExample 7.6. Finding roots of the third degree polynomialExample 7.7. Finding roots of the third degree polynomial with one real and apair of complex-conjugated rootsExample 7.8. Finding roots of the forth degree polynomialExample 7.9. Finding roots of the forth degree polynomialExample 7.10. Finding roots of the forth degree polynomialExample 7.11. Application of the Weierstrass method to finding roots of thethird degree polynomial

    Algorithms in Chapter 7.Algorithm 7.1. Real roots of the third degree polynomialAlgorithm 7.2. Principal stresses in the 3D spaceAlgorithm 7.3. Roots of the third degree polynomialAlgorithm 7.4. Roots of the fourth degree polynomialAlgorithm 7.5. Finding one real root of polynomial by iterationAlgorithm 7.6. Weierstrass method

    Tables in Chapter 7.Tab. 7.1. Possible type of roots in the given exampleTab. 7.2. Type of rootsTab. 7.3. Application of the Weierstrass method

    Figures in Chapter 7.Fig. 7.1. Polynomial of third degreeFig. 7.2. Third degree polynomial with one real anda pair of complex-conjugated rootsFig. 7.3. Polynomial of the forth degree

    APPENDIXA.1 EVENTSElementary operations with eventsInclusionExclusionNeutral componentCertain eventComplete system of events

    Events in multiple observationsConditional eventProduct of second kind

    A.2 PROBABILITYConditional probabilityThe general multiplication ruleIndependent eventsTotal probability theoremBayes theorem

    A.3 TYPICAL PROBABILITY DISTRIBUTIONSUniform distributionBilinear distributionBinomial distribution

    A.4 SUM OF BINOMIALLY DISTRIBUTED RANDOM VARIABLESExamples in AppendixExample A.1. Events.Example A.2. Application of the total probability theorem and Bayes theorem.Example A.3. Uniform distribution.Example A.4. Bilinear distribution.Example A.5. Sum of two random variables with binomial distribution

    Tables in AppendixTab. A.1. Values of random variable for a pair of six-sided diceTab. A.2. Probability distribution for two rolled dice

    Figures in AppendixFig. A.1. Classifications of eventsFig. A.2. Venn diagrams for elementary operationsFig. A.3. Example of uniform distribution (a rolled die)Fig. A.4. Example of bilinear distributionFig. A.5. Comparison of binomial distributionsFig. A.6. Sum of binomially distributed random variables

    INDEXESINDEX OF EXAMPLESINDEX OF ALGORITHMSINDEX

    REFERENCESOther volumes of Numerical MethodsNUMERICAL METHODS II - Roots and Equation SystemsNUMERICAL METHODS III - Approximation of functionsNUMERICAL METHODS IV - Interpolation and Shape FunctionsNUMERICAL METHODS V - Derivation and IntegrationNUMERICAL METHODS VI Optimisation

    Back cover