Professional Documents
Culture Documents
Numerical and Statistical Methods For Computer Engineering Gujarat Technological University 2017 2Nd Edition Ravish R Singh Full Chapter
Numerical and Statistical Methods For Computer Engineering Gujarat Technological University 2017 2Nd Edition Ravish R Singh Full Chapter
Ravish R Singh
Academic Advisor
Thakur Educational Trust
Mumbai, Maharashtra
Mukul Bhatt
Assistant Professor
Department of Humanities and Sciences
Thakur College of Engineering and Technology
Mumbai, Maharashtra
Information contained in this work has been obtained by McGraw Hill Education (India), from sources
believed to be reliable. However, neither McGraw Hill Education (India) nor its authors guarantee the accuracy
or completeness of any information published herein, and neither McGraw Hill Education (India) nor its
authors shall be responsible for any errors, omissions, or damages arising out of use of this information. This
work is published with the understanding that McGraw Hill Education (India) and its authors are supplying
information but are not attempting to render engineering or other professional services. If such services are
required, the assistance of an appropriate professional should be sought.
Typeset at APS Compugraphics, 4G, PKT 2, Mayur Vihar Phase-III, Delhi 96, and printed at
Cover Printer:
4. Interpolation 4.1–4.100
4.1 Introduction 4.1
4.2 Finite Differences 4.2
4.3 Different Operators and their Relations 4.6
4.4 Interpolation 4.19
4.5 Newton’s Forward Interpolation Formula 4.19
4.6 Newton’s Backward Interpolation Formula 4.30
4.7 Central Difference Interpolation 4.39
4.8 Gauss’s Forward Interpolation Formula 4.40
4.9 Gauss’s Backward Interpolation Formula 4.44
4.10 Stirling’s Formula 4.48
4.11 Interpolation with Unequal Intervals 4.55
4.12 Lagrange’s Interpolation Formula 4.56
4.13 Divided Differences 4.70
4.14 Newton’s Divided Difference Formula 4.71
4.15 Inverse Interpolation 4.84
4.16 Cubic Spline Interpolation 4.86
Points to Remember 4.99
5. Curve Fitting 5.1–5.27
5.1 Introduction 5.1
5.2 Least Square Method 5.2
5.3 Fitting of Linear Curves 5.2
5.4 Fitting of Quadratic Curves 5.10
5.5 Fitting of Exponential and Logarithmic Curves 5.18
Points to Remember 5.26
6. Numerical Integration 6.1–6.41
6.1 Introduction 6.1
6.2 Newton–Cotes Quadrature Formula 6.1
6.3 Trapezoidal Rule 6.2
6.4 Simpson’s 1/3 Rule 6.9
6.5 Simpson’s 3/8 Rule 6.19
6.6 Gaussian Quadrature Formulae 6.31
Points to Remember 6.40
7. Ordinary Differential Equations 7.1–7.64
7.1 Introduction 7.1
7.2 Taylor’s Series Method 7.2
7.3 Euler’s Method 7.9
7.4 Modified Euler’s Method 7.16
7.5 Runge–Kutta Methods 7.28
7.6 Milne’s Predictor-Corrector Method 7.53
Points to Remember 7.63
Contents ix
Index I.1–I.3
Preface
Mathematics is a key area of study in any engineering course. A sound knowledge
of this subject will help engineering students develop analytical skills, and thus
enable them to solve numerical problems encountered in real life, as well as apply
mathematical principles to physical problems, particularly in the field of engineering.
Users
This book is designed for the 4th semester GTU Computer Engineering students
pursuing the course Numerical and Statistical Methods (CODE 2140706). It covers
the complete GTU syllabus for the course on Numerical and Statistical Methods for
computer engineering branches.
Objective
The crisp and complete explanation of topics will help students easily understand the
basic concepts. The tutorial approach (i.e., teach by example) followed in the text will
enable students develop a logical perspective to solving problems.
Features
Each topic has been explained from the examination point-of-view, wherein the theory
is presented in an easy-to-understand student-friendly style. Full coverage of concepts
is supported by numerous solved examples with varied complexity levels, which is
aligned to the latest GTU syllabus. Fundamental and sequential explanation of topics
is well aided by examples and exercises. The solutions of examples are set following a
‘tutorial’ approach, which will make it easy for students from any background to easily
grasp the concepts. Exercises with answers immediately follow the solved examples
enforcing a practice-based approach. We hope that the students will gain logical
understanding from solved problems and then reiterate it through solving similar
exercise problems themselves. The unique blend of theory and application caters to
the requirements of both the students and the faculty. Solutions of GTU examination
questions are incorporated within the text appropriately.
xii Preface
Highlights
∑ Crisp content strictly as per the latest GTU syllabus of Numerical and Statistical
Methods (Regulation 2014)
∑ Comprehensive coverage with lucid presentation style
∑ Each section concludes with an exercise to test understanding of topics
∑ Solutions of GTU examination papers from 2010 to 2015 present appropriately
within the chapters
∑ Solution of 2016 GTU examination paper can be accessible through weblink.
∑ Rich exam-oriented pedagogy:
ã Solved Examples within chapters: 420
ã Solved GTU questions tagged within chapters: 112
ã Unsolved Exercises: 148
Chapter Organization
The content spans the following ten chapters which wholly and sequentially cover
each module of the syllabus.
o Chapter 1 introduces Error Analysis.
o Chapter 2 discusses Roots of Equations.
o Chapter 3 presents Systems of Linear Algebraic Equations.
o Chapter 4 covers Interpolation.
o Chapter 5 deals with Curve Fitting.
o Chapter 6 presents Numerical Integration.
o Chapter 7 explains Ordinary Differential Equations.
o Chapter 8 discusses Statistical Methods.
o Chapter 9 deals with Correlation and Regression.
o Chapter 10 introduces Trend Analysis.
Acknowledgements
We are grateful to the following reviewers who reviewed various chapters of the script
and generously shared their valuable comments:
We would also like to thank all the staff at McGraw Hill Education (India), especially
Piyali Chatterjee, Anuj Kr. Shriwastava, Koyel Ghosh, Satinder Singh Baveja,
and Vibha Mahajan for coordinating with us during the editorial, copyediting, and
production stages of this book.
Our acknowledgements would be incomplete without a mention of the contribution of
all our family members. We extend a heartfelt thanks to them for always motivating
and supporting us throughout the project.
Constructive suggestions for the improvement of the book will always be welcome.
Ravish R Singh
Mukul Bhatt
Publisher’s Note
Remember to write to us. We look forward to receiving your feedback,
comments, and ideas to enhance the quality of this book. You can reach us at
info.india@mheducation.com. Please mention the title and authors’ name as the
subject. In case you spot piracy of this book, please do let us know.
RoAdmAP to the SyllAbuS
This text is useful for
Numerical and Statistical Methods (Code 2140706)
For Computer Engineering
Module 1: Mathematical Modelling and Engineering Problem-Solving
Approximations and errors; Significant figures; Accuracy and precision; Errors;
Round-off and truncation errors; Error propagation
GO TO
CHAPTER 1: Error Analysis
GO TO
CHAPTER 2: Roots of Equations
GO TO
CHAPTER 3: Systems of Linear Algebraic Equations
GO TO
CHAPTER 4: Interpolation
CHAPTER 5: Curve Fitting
xvi Roadmap to the Syllabus
GO TO
CHAPTER 6: Numerical Integration
GO TO
CHAPTER 7: Ordinary Differential Equations
GO TO
CHAPTER 8: Statistical Methods
CHAPTER 9: Correlation and Regression
CHAPTER 10: Trend Analysis
CHAPTER
1
Error Analysis
chapter outline
1.1 Introduction
1.2 Accuracy and Precision
1.3 Types of Errors
1.4 Sources of Errors
1.5 Significant Figures
1.1 IntroductIon
The main goal of numerical analysis is to develop efficient algorithms for computing
precise numerical values of mathematical quantities, including functions, integrals,
solutions of algebraic equations, solutions of differential equations, etc. Often the
numerical data and the methods used are approximate ones. Hence, the error in a
computed result may be caused by the errors in the data, or the errors in the method, or
both. In any numerical computation, there are four key sources of errors:
(i) Inexactness of mathematical model for the underlying physical phenomenon
(ii) Errors in measurements of parameters entering the model
(iii) Round-off errors in computer arithmetic
(iv) Approximations used to solve the mathematical systems
Measurements and calculations can be characterized with regard to their accuracy and
precision. Accuracy refers to how closely a computed or measured value agrees with
the true value. Precision refers to how closely individually computed or measured
values agree with each other. Inaccuracy is the systematic deviation from the truth.
Imprecision refers to the magnitude of scatter. Figure 1.1 illustrates the concepts of
accuracy and precision.
1.2 Chapter 1 Error Analysis
Fig. 1.1
The term error represents the imprecision and inaccuracy of a numerical
computation.
relative error It is the ratio of absolute error and true value of the quantity.
dx xexact - xapprox
Œr = =
x xexact
There are three sources of errors, namely, inherent error, truncation error, and round-
off error.
Inherent error It is the error that pre-exist in the problem statement itself before
its solution is obtained. Such errors arise in the values of data from the real world or
1.5 Significant Figures 1.3
x3 x5 x7 x9
sin x = x - + - + - • = xexact
3! 5! 7! 9!
The significant figures of a number are digits that carry meaning contributing to its
measurement resolution. This includes all digits except (i) all leading zeros, and (ii) all
trailing zeros when they are merely placeholders to indicate the scale of the number.
(iii) Leading zeros are not significant, e.g., 0.00075 has two significant figures,
7 and 5.
(iv) Trailing zeros in a number containing a decimal point are significant, e.g.,
13.4000 has six significant figures, i.e., 1, 3, 4, 0, 0, and 0. The number
0.000134000 still has only six significant figures (the zeros before the 1 are
not significant). The number 120.00 has five significant figures since it has
three trailing zeros. The number of significant figures in 8200 is at least two,
but it could be three or four because it is not clear if the zeros are significant
or not. To avoid uncertainty, scientific notation is used to place zeros behind a
decimal point, i.e., 8.200 × 103 has four significant figures, whereas 8.2 × 103
has two significant figures.
example 1
Find the relative error and percentage error if 0.005998 is truncated to
three decimal digits.
Solution
xexact = 0.005998
xapprox = 0.005
xexact - xapprox
Relative error =
xexact
0.005998 - 0.005
=
0.005998
= 0.1664
xexact - xapprox
Percentage error = ¥ 100
xexact
= 0.1664 ¥ 100
= 16.64%
example 2
For a = 3.141592 and an approximation value of a as 3.14, evaluate
absolute error, relative error, and percentage error.
Solution
aexact = 3.141592, aapprox = 3.14
Absolute error = da = aexact – aapprox = 3.141592 – 3.14 = 0.001592
d a 0.001592
Relative error = = = 5.0675 ¥ 10 -4
a 3.141592
da
Percentage error = ¥ 100 = 5.0675 ¥ 10 -4 ¥ 100 = 0.05067%
a
1.5 Significant Figures 1.5
example 3
If the approximate solution of a problem is x0 = 35.25 with relative error
of at the most 2%, find the range of values correct up to four decimal
digits in which the exact value of the solution lies.
Solution
x0approx = 35.25
Œr = 2% of 35.25 = 0.705
x0exact - x0approx
Œr =
x0exact
x0exact - 35.25
0.705 =
x0exact
(1 - 0.705) x0exact = 35.25
x0exact = 119.4915
The range of values correct up to four decimal digits in which the exact value of the
solution lies is [119.4915, 119.50].
example 4
The approximate solution of a problem is 3.436. If the absolute error in
the solution is less than 0.01 then find the interval within which the exact
solution lies.
Solution
xapprox = 3.436
d x < 0.01
xexact - xapprox
dx =
xexact
xexact - 3.436
< 0.01
xexact
xexact (1 - 0.01) < 3.436
xexact < 3.4707
example 5
If u = 2v6 – 5v, find the percentage error in u at v = 1 if the error in v is
0.05.
Solution
u = 2 v 6 - 5v
d u = 12 v 5 d v - 5d v
du 1
¥ 100 = ÈÎ12 v 5 d v ¥ 100 - 5 d v ¥ 100 ˘˚
u u
1 ÈÎ12 v 5 d v ¥ 100 - 5 d v ¥ 100 ˘˚
= 6
2 v - 5v
Putting dv = 0.05, v=1
du 1 ÈÎ12 (1)5 (0.05) (100) - 5(0.05) (100)˘˚
¥ 100 = 6
u 2(1) - 5(1)
= -11.67%
Hence, the percentage error in u = –11.67%.
example 6
Given the trigonometric function f (x) = sin x,
(i) expand f (x) about x = 0 using the Taylor series
(ii) truncate the series to n = 6 terms
p
(iii) find the relative error at x = due to truncation.
4
Solution
(i) f (x) = sin x
By the Taylor series,
x3 x5 x7 x9
f ( x ) = sin x = x - + - + -
3! 5! 7! 9!
(ii) Truncation of the Taylor series to n = 6 terms
x3 x5
f6 ( x ) = x - +
3! 5!
p
(iii) Relative error at x = due to truncation
4
Êpˆ Êpˆ
f Á ˜ = sin Á ˜
Ë 4¯ Ë 4¯
1.5 Significant Figures 1.7
3 5
Êpˆ Êpˆ
Á ˜ ÁË ˜¯
Êp ˆ p Ë 4¯ 4
f6 Á ˜ = - +
Ë 4¯ 4 3! 5!
Êpˆ Êpˆ
f Á ˜ - f6 Á ˜
Ë 4¯ Ë 4¯
Œr =
Êpˆ
fÁ ˜
Ë 4¯
Ê p ˆ Ê p p3 p5 ˆ
sin Á ˜ - Á - +
Ë 4 ¯ Ë 4 384 122880 ˜¯
=
Êpˆ
sin Á ˜
Ë 4¯
= 5.1286 ¥ 10 -5
example 7
Given the function f (x) = e–x,
(i) expand f (x) about x = 0 using the Taylor series
(ii) truncate the series to n = 5 terms
(iii) find the relative error at x = 1 due to truncation.
Solution
(i) f (x) = e–x
By the Taylor series,
x2 x3 x 4 x5
e- x = 1 - x + - + - +
2! 3! 4! 5!
(ii) Truncation of the Taylor series to n = 5 terms
x2 x3 x 4
f5 ( x ) = 1 - x + - +
2! 3! 4!
(iii) The relative error at x = 1 due to truncation
1 1 1 3
f5 (1) = 1 - 1 + - + =
2! 3! 4! 8
f (1) = e -1
f (1) - f5 (1)
Œr =
f (1)
3
e -1 -
= 8
e -1
= 0.0194
= 1.94%
1.8 Chapter 1 Error Analysis
example 8
If R = x3 y2 z2 and 0.03, 0.01, 0.02 are errors in x, y, z respectively at
x = 1, y = 1, z = 2. Calculate the absolute error and percentage error in
calculation of R.
Solution
R = x3 y2 z2
Taking logarithm on both the sides,
log R = log x 3 + log y 2 + log z 2
= 3 log x + 2 log y + 2 log z
1 3 2 2
dR = d x + d y + d z
R x y z
dR dx dy dz
=3 +2 +2
R x y z
Putting dx = 0.03, dy = 0.01, dz = 0.02, x = 1, y = 1, z = 2,
R = (1)3(1)2(2)2 = 4
dR Ê 0.03 ˆ Ê 0.01ˆ Ê 0.02 ˆ
= 3Á ˜¯ + 2 ÁË ˜¯ + 2 ÁË ˜
4 Ë 1 1 1 ¯
dR
= 0.15
4
d R = 0.6
Hence, absolute error = 0.6.
dR
Percentage error in R = ¥ 100
R
= 0.15 ¥ 100
= 15%
example 9
Find the percentage error in calculating the area of a rectangle when an
error of 3% is made in measuring each of its sides.
Solution
Let a and b be the sides of the rectangle and A be its area.
A = ab
Taking logarithm on both the sides,
log A = log a + log b
1.5 Significant Figures 1.9
1 1 1
d A = da + db
A a b
dA da db
× 100 = × 100 + × 100
A a b
da db
Putting × 100 = 3, × 100 = 3,
a b
δA
× 100 = 3 + 3
A
=6
Hence, percentage error in calculating area = 6%.
example 10
Find the percentage error in the area of an ellipse when errors of 2%
and 3% are made in measuring its major and minor axes respectively.
Solution
Let 2a and 2b be the major and minor axes of the ellipse and A be its area.
A = p ab
Taking logarithm on both the sides,
log A = log p + log a + log b
1 1 1
d A = 0 + da + db
A a b
dA da db
× 100 = × 100 + × 100
A a b
da db
Putting × 100 = 2, × 100 = 3,
a b
dA
¥ 100 = 2 + 3
A
=5
Hence, percentage error in area of ellipse = 5%.
example 11
2 1 1
The focal length of a mirror is found from the formula = - . Find
f v u
the percentage error in f if u and v are both in error by 2% each.
1.10 Chapter 1 Error Analysis
Solution
2 1 1
= -
f v u
2 1 1
− 2
δ f = − 2 δv + 2 δu
f v u
2δf 1 δv 1 δu
− × 100 = − × 100 + × 100
f f v v u u
du dv
Putting ¥ 100 = 2, ¥ 100 = 2,
u v
2df 1 1
- ¥ 100 = - (2) + (2)
f f v u
Ê 1 1ˆ Ê 2ˆ
= -2 Á - ˜ = -2 Á ˜
Ë v u¯ Ë f¯
df
¥ 100 = 2
f
Hence, percentage error in f = 2%.
example 12
Find the possible percentage error in computing the parallel resistance
R of two resistances R1 and R2 if R1, R2 are each in error by 2%.
Solution
1 1 1
= +
R R1 R2
1 1 1
- 2
dR = - d R1 - d R2
R R12 R22
1 dR 1 d R1 1 d R2
¥ 100 = ¥ 100 + ¥ 100
R R R1 R1 R2 R2
d R1 dR
Putting ¥ 100 = 2, 2 ¥ 100 = 2,
R1 R2
1 dR 1 1
¥ 100 = (2) + (2)
R R R1 R2
Ê 1 1 ˆ
= 2Á + ˜
Ë R1 R2 ¯
Ê 1ˆ
= 2Á ˜
Ë R¯
1.5 Significant Figures 1.11
dR
\ ¥ 100 = 2
R
Hence, percentage error in R = 2%
example 13
The resonant frequency in a series electrical circuit is given by
1
f = . If the measurement of L and C are in error by 2% and
2p LC
−1% respectively, find the percentage error in f.
Solution
1
f =
2p LC
Taking logarithm on both the sides,
1 1 1
log f = log - log L - log C
2p 2 2
1 11 1 1
df = 0 - dL - dC
f 2L 2C
df 1 dL 1 dC
¥ 100 = - ¥ 100 - ¥ 100
f 2 L 2 C
dL dC
Putting ¥ 100 = 2, ¥ 100 = -1
L C
df 1 1
¥ 100 = - (2) - (-1)
f 2 2
= - 0.5
Hence, percentage error in f = − 0.5%
example 14
In calculating the volume of a right circular cone, errors of 2% and
1% are made in the height and radius of base respectively. Find the
percentage error in the calculating the volume.
Solution
Let r and h be the radius of base and height of the right circular cone and V be its
volume.
1
V = p r2h
3
1.12 Chapter 1 Error Analysis
example 15
In calculating the volume of a right circular cylinder, errors of 2% and
1% are found in measuring the height and base radius respectively. Find
the percentage error in the calculated volume of the cylinder.
Solution
Let r and h be the base radius and height of the right circular cylinder and V be its
volume.
V = p r2 h
Taking logarithm on both the sides,
log V = log p + 2 log r + log h
1 2 1
dV = 0 + d r + d h
V r h
dV dr dh
¥ 100 = 2 ¥ 100 + ¥ 10
00
V r h
dr dh
Putting ¥ 100 = 1, ¥ 100 = 2,
r h
dV
¥ 100 = 2(1) + 2
V
=4
Hence, percentage error in volume = 4%.
1.5 Significant Figures 1.13
example 16
1
Evaluate [(3.82)2 + 2(2.1)3 ] 5 using the theory of approximation.
Solution
1
2 3
Let z = (x + 2y )5
4 4
1 2 - 1 -
dz = ( x + 2 y3 ) 5 (2 x ) d x + ( x 2 + 2 y3 ) 5 (6 y 2 )d y
5 5
4
1 2 -
= 2 x d x + 6 y 2 d y)
( x + 2 y3 ) 5 (2
5
Putting x = 4, y = 2,
d x = 3.82 − 4 = − 0.18,
d y = 2.1 − 2 = 0.1
(x2 + 2y3) = 42 + 2(2)3
= 32
4
1 -
and d z = ◊ (32) 5 [2 (4)(-0.18) + 6 (2)2 (0.1)]
5
= 0.012
Approximate value = z + d z
= (32)1/5 + 0.012
= 2.012
example 17
1
Find the approximate value of ÈÎ(0.982 + (2.01)2 + (1.94)2 ˘˚ 2 .
Solution
Let u = x 2 + y2 + z2
u2 = x2 + y2 + z2
2ud u = 2xd x + 2yd y + 2zd z
ud u = xd x + yd y + zd z
Putting x = 1, y = 2, z = 2,
d x = 0.98 − 1 = − 0.02,
d y = 2.01 − 2 = 0.01,
d z = 1.94 − 2 = − 0.06
1.14 Chapter 1 Error Analysis
u = 12 + 22 + 22
=3
and ud u = 1(-0.02) + 2(0.01) + 2(-0.06)
= - 0.12
d u = - 0.04
Approximate value = u + d u
= 3 − 0.04
= 2.96
example 18
1
2 3 10
Evaluate (1.99) (3.01) (0.98) using approximation.
Solution
1
Let u = x 2 y3 z 10
1
log u = 2 log x + 3 log y +
log z
10
1 1 1 1 1
du = 2 d x + 3 d y + dz
u x y 10 z
Putting x = 2, y = 3, z = 1,
d x = 1.99 − 2 = − 0.01,
d y = 3.01 − 3 = 0.01,
d z = 0.98 − 1 = − 0.02
1
u = 22 33 110 = 108
1 Ê 1ˆ Ê 1ˆ 1 Ê 1ˆ
and du = 2 ◊ Á ˜ (- 0.01) + 3 Á ˜ (0.01) + Á ˜ (- 0.02)
108 Ë 2¯ Ë 3¯ 10 Ë 1¯
du = -0.216
Approximate value = u + d u
= 108 − 0.216
= 107.784.
1.5 Significant Figures 1.15
eXercIse 1.1
1. Round off the following numbers to 4-significant digits:
(i) 2.36345 (ii) 0.34176 (iii) 3.40087 (iv) 0.000143479
[Ans.: (i) 2.363 (ii) 0.3417 (iii) 3.401 (iv) 0.0001435]
2. Find the error and relative error in the following cases:
(i) xexact = 1000000, xapprox = 999996
(ii) xexact = 0.000012, xapprox = 0.000009
[Ans.: (i) 4, 0.000004 (ii) 0.000003, 0.25]
3. Find the relative error of x – y for x = 12.05 and y = 0.802 having
absolute error dx = 0.005 and dy = 0.001.
[Ans.: 0.00029]
2
4. Find absolute error, relative error, and percentage error if is
3
approximated to 4-significant digits.
[Ans.: 0.000033, 0.0000495, 0.005%]
p
5. If the approximate value of is 0.7854, calculate (i) absolute error,
4
(ii) relative error, and (iii) percentage error.
[Ans.: (i) 0.00031, (ii) 0.00039, (iii) 0.04%]
6. If dx = 0.005 and dy = 0.001 be the absolute errors in x = 2.11 and
y = 4.15, find the relative error in computation of x + y.
[Ans.: 0.000958]
7. In calculating the volume of right circular cone, errors of 2.75% and
1.25% are made in height and radius of the base. Find the percentage
error in volume.
[Ans.: 5.25%]
8. The height of a cone is H = 30 cm, the radius of base R = 10 cm. How
will the volume of the cone change if H is increasing by 3 mm while R
is decreasing by 1 mm?
[Ans.: decreased by 10p cm3]
9. Find the percentage error in calculating the area of a rectangle when
an error of 2% is made in measuring each of its sides.
[Ans.: 4%]
1.16 Chapter 1 Error Analysis
1
18. If f = x 2 y 3 z 10 , find the approximate value of f when x = 1.99, y = 3.01
and z = 0.98.
[Ans.: 107.784]
19. If f = x3 y2 z4, find the approximate value of f when x = 1.99, y = 3.01,
z = 0.99.
1
[Ans.: 68.5202]
3 3 3
20. If f = (160 − x − y ) , find the approximate value of f (2.1, 2.9) − f (2, 3)
[Ans.: 0.016]
xyz
21. If f = e , find the approximate value of f when x = 0.01, y = 1.01,
z = 2.01. [Ans.: 1.02]
1
1
[Ans.: 2.96]
2 2 2
23. Find [(11.99) + (5.01) ] approximately by using the theory of
approximation. [Ans.: 12.99]
24. Find (1.04)3.01 by using theory of approximation.
[Ans.: 1.1253]
1
25. If f(x, y) = (50 – x2 – y 2) find the approximate value of [f(3, 4) – f(3.1, 3.9)]
2
[Ans.: – 0.018]
26. Find log ÈÎ 3 1.04 + 4 0.97 - 1˘˚ approximately by using the theory of
approximation. [Ans.: 0.0058]
Points to remember
Accuracy and Precision
Accuracy refers to how closely a computed or measured value agrees with the true
value. Precision refers to how closely individually computed or measured values
agree with each other.
Types of Errors
Absolute Error It is the difference between the measured or calculated value and
true value.
Œa = d x = xexact - xapprox
1.18 Chapter 1 Error Analysis
Relative Error It is the ratio of absolute error and true value of the quantity.
dx xexact - xapprox
Œr = =
x xexact
Sources of Errors
Inherent Error It is the error that pre-exist in the problem statement itself before
its solution is obtained.
Truncation Error It is the error that results from using an approximation in place
of exact mathematical expressions.
Round-off Error It is the error that results due to chopping or rounding or
arithmetic operations using normalized floating-point numbers.
Significant Figures
The significant figures of a number are digits that carry meaning contributing to its
measurement resolution. This includes all digits except (i) all leading zeros, and
(ii) all trailing zeros when they are merely placeholders to indicate the scale of the
number.
CHAPTER
2
Roots of Equations
chapter outline
2.1 Introduction
2.2 Bisection Method
2.3 Regula Falsi Method
2.4 Newton–Raphson Method
2.5 Secant Method
2.6 Successive Approximation Method
2.7 Descartes’ Rule of Signs
2.8 Budan’s Theorem
2.9 Bairstow’s Method
2.1 IntroductIon
n n -1 n-2
An expression of the form f ( x ) = a0 x + a1 x + a2 x + + an -1 x + an , where a0,
a1, a2, ..., an are constants and n is a positive integer, is called an algebraic polynomial
of degree n if a0 π 0. The equation f (x) = 0 is called an algebraic equation if f (x)
is an algebraic polynomial, e.g., x3 – 4x – 9 = 0. If f (x) contains functions such as
trigonometric, logarithmic, exponential, etc., then f (x) = 0 is called a transcendental
equation, e.g., 2x3 – log (x + 3) tan x + ex = 0.
In general, an equation is solved by factorization. But in many cases, the method of
factorization fails. In such cases, numerical methods are used. There are some methods
to solve the equation f (x) = 0 such as
(i) Bisection method
(ii) Regula Falsi method
(iii) Newton–Raphson method
(iv) Secant method
2.2 Chapter 2 Roots of Equations
example 1
Find the positive root of x3 – 2x – 5 = 0, correct up to two decimal
places.
Solution
Let f (x) = x3 – 2x – 5
2.25 + 2
x3 = = 2.125
2
f ( x3 ) = f (2.125) = 0.3457
Since f (2.125) > 0 and f (2) < 0, the root lies between 2.125 and 2.
2.125 + 2
x4 = = 2.0625
2
f ( x4 ) = f (2.0625) = -0.3513
Since f (2.0625) < 0 and f (2.125) > 0, the root lies between 2.0625 and 2.125.
2.0625 + 2.125
x5 = = 2.09375
2
f ( x5 ) = f (2.09375) = -0.0089
Since f (2.09375) < 0 and f (2.125) > 0, the root lies between 2.09375 and 2.125.
2.09375 + 2.125
x6 = = 2.109375
2
f ( x6 ) = f (2.109375) = 0.1668
Since f (2.109375) > 0 and f (2.09375) < 0, the root lies between 2.109375 and
2.09375.
2.109375 + 2.09375
x7 = = 2.10156
2
Since x6 and x7 are same up to two decimal places, the positive root is 2.10.
example 2
Find a root of x3 – 5x + 3 = 0 by the bisection method correct up to four
decimal places. [Summer 2015]
Solution
Let f (x) = x3 – 5x + 3
f (0) = 3 and f (1) = –1
Since f (0) > 0 and f (1) < 0, the root lies between 0 and 1.
0 +1
x1 = = 0.5
2
f ( x1 ) = f (0.5) = 0.625
Since f (0.5) > 0 and f (1) < 0, the root lies between 0.5 and 1.
0.5 + 1
x2 = = 0.75
2
f ( x2 ) = f (0.75) = -0.3281
2.4 Chapter 2 Roots of Equations
Since f (0.75) < 0 and f (0.5) > 0, the root lies between 0.75 and 0.5.
0.75 + 0.5
x3 = = 0.625
2
f ( x3 ) = f (0.625) = 0.1191
Since f (0.625) > 0 and f (0.75) < 0, the root lies between 0.625 and 0.75.
0.625 + 0.75
x4 = = 0.6875
2
f ( x4 ) = f (0.6875) = -0.1125
Since f (0.6875) < 0 and f (0.625) > 0, the root lies between 0.6875 and 0.625.
0.6875 + 0.625
x5 = = 0.65625
2
f ( x5 ) = f (0.65625) = 0.00137
Since f (0.65625) > 0 and f (0.6875) < 0, the root lies between 0.65625 and 0.6875.
0.65625 + 0.6875
x6 = = 0.67188
2
f ( x6 ) = f (0.67188) = -0.0561
Since f (0.67188) < 0 and f (0.65625) > 0, the root lies between 0.67188 and 0.65625.
0.67188 + 0.65625
x7 = = 0.66407
2
f ( x7 ) = f (0.66407) = -0.02750
Since f (0.66407) < 0 and f (0.65625) > 0, the root lies between 0.66407 and 0.65625.
0.66407 + 0.65625
x8 = = 0.66016
2
f ( x8 ) = f (0.66016) = -0.01309
Since f (0.66016) < 0 and f (0.65625) > 0, the root lies between 0.66016 and 0.65625.
0.66016 + 0.65625
x9 = = 0.65821
2
f ( x9 ) = f (0.65821) = -0.00589
Since f (0.65821) < 0 and f (0.65625) > 0, the root lies between 0.65821 and 0.65625.
0.65821 + 0.65625
x10 = = 0.65723
2
f ( x10 ) = f (0.65723) = -0.0023
Since f (0.65723) < 0 and f (0.65625) > 0, the root lies between 0.65723 and 0.65625.
2.2 Bisection Method 2.5
0.65723 + 0.65625
x11 = = 0.65674
2
f ( x11 ) = f (0.65674) = -0.00044
Since f (0.65674) < 0 and f (0.65625) > 0, the root lies between 0.65674 and 0.65625.
0.65674 + 0.65625
x12 = = 0.6565
2
f ( x12 ) = f (0.6565) = 0.00044
Since f (0.6565) > 0 and f (0.65674) < 0, the root lies between 0.6565 and 0.65674.
0.6565 + 0.65674
x13 = = 0.6566
2
f ( x13 ) = f (0.6566) = 0.00075
Since f (0.6566) > 0 and f (0.65674) < 0, the root lies between 0.6566 and 0.65674.
0.6566 + 0.65674
x14 = = 0.65667
2
Since x13 and x14 are same up to four decimal places, the root is 0.6566.
example 3
Perform the five iterations of the bisection method to obtain a root of the
equation f(x) = x3 – x – 1 = 0.
Solution
Let f (x) = x3 – x – 1
f (1) = –1 and f (2) = 5
Since f (1) < 0 and f (2) > 0, the root lies between 1 and 2.
1+ 2
x1 = = 1.5
2
f ( x1 ) = f (1.5) = 0.875
Since f (1.5) > 0 and f (1) < 0, the root lies between 1.5 and 1.
1.5 + 1
x2 = = 1.25
2
f ( x2 ) = f (1.25) = -0.2968
Since f (1.25) < 0 and f (1.5) > 0, the root lies between 1.25 and 1.5.
1.25 + 1.5
x3 = = 1.375
2
f ( x3 ) = f (1.375) = 0.2246
2.6 Chapter 2 Roots of Equations
Since f (1.375) > 0 and f (1.25) < 0, the root lies between 1.375 and 1.25.
1.375 + 1.25
x4 = = 1.3125
2
f ( x4 ) = f (1.3125) = -0.0515
Since f (1.3125) < 0 and f (1.375) > 0, the root lies between 1.3125 and 1.375.
1.3125 + 1.375
x5 = = 1.3438
2
Hence, the root is 1.3438 up to five iterations.
example 4
Find the approximate solution of x3 + x – 1 = 0 correct to three decimal
places. [Winter 2013]
Solution
Let f (x) = x3 + x – 1
f (0) = –1 and f (1) = 1
Since f (0) < 0 and f (1) > 0, the root lies between 0 and 1.
0 +1
x1 = = 0.5
2
f ( x1 ) = f (0.5) = -0.375
Since f (0.5) < 0 and f (1) > 0, the root lies between 0.5 and 1.
0.5 + 1
x2 = = 0.75
2
f ( x2 ) = f (0.75) = 0.1719
Since f (0.75) > 0 and f (0.5) < 0, the root lies between 0.75 and 0.5.
0.75 + 0.5
x3 = = 0.625
2
f ( x3 ) = f (0.625) = -0.1309
Since f (0.625) < 0 and f (0.75) > 0, the root lies between 0.625 and 0.75.
0.625 + 0.75
x4 = = 0.6875
2
f ( x4 ) = f (0.6875) = 0.01245
Since f (0.6875) > 0 and f (0.625) < 0, the root lies between 0.6875 and 0.625.
0.6875 + 0.625
x5 = = 0.6563
2
f ( x5 ) = f (0.6563) = -0.0644
2.2 Bisection Method 2.7
Since f (0.6563) < 0 and f (0.6875) > 0, the root lies between 0.6563 and 0.6875.
0.6563 + 0.6875
x6 = = 0.6719
2
f ( x6 ) = f (0.6719) = -0.0248
Since f (0.6719) < 0 and f (0.6875) > 0, the root lies between 0.6719 and 0.6875.
0.6719 + 0.6875
x7 = = 0.6797
2
f ( x7 ) = f (0.6797) = -0.0141
Since f (0.6797) < 0 and f (0.6875) > 0, the root lies between 0.6797 and 0.6875.
0.6797 + 0.6875
x8 = = 0.6836
2
f ( x8 ) = f (0.6836) = 0.0031
Since f (0.6836) > 0 and f (0.6797) < 0, the root lies between 0.6836 and 0.6797.
0.6836 + 0.6797
x9 = = 0.6817
2
f ( x9 ) = f (0.6817) = -0.0015
Since f (0.6817) < 0 and f (0.6836) > 0, the root lies between 0.6817 and 0.6836.
0.6817 + 0.6836
x10 = = 0.6827
2
f ( x10 ) = f (0.6827) = 0.00089
Since f (0.6827) > 0 and f (0.6817) < 0, the root lies between 0.6827 and 0.6817.
0.6827 + 0.6817
x11 = = 0.6822
2
Since x10 and x11 are same up to three decimal points, the root is 0.682.
example 5
Find a root of the equation x3 – 4x – 9 = 0 using the bisection method in
four stages.
Solution
Let f (x) = x3 – 4x – 9
f (2) = –9 and f (3) = 6
Since f (2) < 0 and f (3) > 0, the root lies between 2 and 3.
2.8 Chapter 2 Roots of Equations
2+3
x1 = = 2.5
2
f ( x1 ) = f (2.5) = -3.375
Since f (2.5) < 0 and f (3) > 0, the root lies between 2.5 and 3.
2.5 + 3
x2 = = 2.75
2
f ( x2 ) = f (2.75) = 0.7969
Since f (2.75) > 0 and f (2.5) < 0, the root lies between 2.75 and 2.5.
2.75 + 2.5
x3 = = 2.625
2
f ( x3 ) = f (2.625) = -1.4121
Since f (2.625) < 0 and f (2.75) > 0, the root lies between 2.625 and 2.75.
2.625 + 2.75
x4 = = 2.6875
2
Hence, the root is 2.6875 up to four stages.
example 6
Find the negative root of x3 – 7x + 3 by the bisection method up to three
decimal places.
Solution
Let f (x) = x3 – 7x + 3
f (–2) = 9 and f (–3) = –3
Since f (–2) > 0 and f (–3) < 0, the root lies between –2 and –3.
-2 - 3
x1 = = -2.5
2
f ( x1 ) = f (-2.5) = 4.875
Since f (–2.5) > 0 and f (–3) < 0, the root lies between –2.5 and –3.
-2.5 - 3
x2 = = -2.75
2
f ( x2 ) = f (-2.75) = 1.4531
Since f (–2.75) > 0 and f (–3) < 0, the root lies between –2.75 and –3.
-2.75 - 3
x3 = = -2.875
2
f ( x3 ) = f (-2.875) = -0.6387
2.2 Bisection Method 2.9
Since f (–2.875) < 0 and f (–2.75) > 0, the root lies between –2.875 and –2.75.
-2.875 - 2.75
x4 = = -2.8125
2
f ( x4 ) = f (-2.8125) = 0.4402
Since f (–2.8125) > 0 and f (–2.875) < 0, the root lies between –2.8125 and –2.875.
-2.8125 - 2.875
x5 = = -2.8438
2
f ( x5 ) = f (-2.8438) = - 0.0918
Since f (–2.8438) < 0 and f (–2.8125) > 0, the root lies between –2.8438 and –2.8125.
-2.8438 - 2.8125
x6 = = -2.8282
2
f ( x6 ) = f (-2.8282) = 0.1754
Since f (–2.8282) > 0 and f (–2.8438) < 0, the root lies between –2.8282 and –2.8438.
-2.8282 - 2.8438
x7 = = -2.836
2
f ( x7 ) = f (-2.836) = 0.0423
Since f (–2.836) > 0 and f (–2.8438) < 0, the root lies between –2.836 and –2.8438.
-2.836 - 2.8438
x8 = = -2.8399
2
f ( x8 ) = f (-2.8399) = - 0.0246
Since f (–2.8399) < 0 and f (–2.836) > 0, the root lies between –2.8399 and –2.836.
-2.8399 - 2.836
x9 = = -2.838
2
f ( x9 ) = f (-2.838) = 0.0081
Since f (–2.838) > 0 and f (–2.8399) < 0, the root lies between –2.838 and –2.8399.
-2.838 - 2.8399
x10 = = -2.8389
2
Since x9 and x10 are same up to three decimal places, the negative root is –2.838.
example 7
Perform three iterations of the bisection method to obtain the root of the
equation 2 sin x – x = 0, correct up to three decimal places.
[Summer 2015]
2.10 Chapter 2 Roots of Equations
Solution
Let f (x) = 2 sin x – x
f (1) = 0.6829 and f (2) = – 0.1814
Since f (1) > 0 and f (2) < 0, the root lies between 1 and 2.
1+ 2
x1 = = 1.5
2
f ( x1 ) = f (1.5) = 0.4949
Since f (1.5) > 0 and f (2) < 0, the root lies between 1.5 and 2.
1.5 + 2
x2 = = 1.75
2
f ( x2 ) = f (1.75) = 0.2179
Since f (1.75) > 0 and f (2) < 0, the root lies between 1.75 and 2.
1.75 + 2
x3 = = 1.875
2
Hence, the root is 1.875 up to three iterations.
example 8
Solve x = cos x by the bisection method correct to two decimal places.
[Summer 2014]
Solution
Let f (x) = x – cos x
f (0) = –1 and f (1) = 0.4597
Since f (0) < 1 and f (1) > 0, the root lies between 0 and 1.
0 +1
x1 = = 0.5
2
f ( x1 ) = f (0.5) = - 0.3776
Since f (0.5) < 0 and f (1) > 0, the root lies between 0.5 and 1.
0.5 + 1
x2 = = 0.75
2
f ( x2 ) = f (0.75) = 0.0183
Since f (0.75) > 0 and f (0.5) < 0, the root lies between 0.75 and 0.5.
0.75 + 0.5
x3 = = 0.625
2
f ( x3 ) = f (0.625) = - 0.186
2.2 Bisection Method 2.11
Since f (0.625) < 0 and f (0.75) > 0, the root lies between 0.625 and 0.75.
0.625 + 0.75
x4 = = 0.6875
2
f ( x4 ) = f (0.6875) = - 0.0853
Since f (0.6875) < 0 and f (0.75) > 0, the root lies between 0.6875 and 0.75.
0.6875 + 0.75
x5 = = 0.71875
2
f ( x5 ) = f (0.71875) = - 0.0338
Since f (0.71875) < 0 and f (0.75) > 0, the root lies between 0.71875 and 0.75.
0.71875 + 0.75
x6 = = 0.7344
2
f ( x6 ) = f (0.7344) = - 0.0078
Since f (0.7344) < 0 and f (0.75) > 0, the root lies between 0.7344 and 0.75.
0.7344 + 0.75
x7 = = 0.7422
2
f ( x7 ) = f (0.7422) = 0.0052
Since f (0.7422) > 0 and f (0.7344) < 0, the root lies between 0.7422 and 0.7344.
0.7422 + 0.7344
x8 = = 0.7383
2
f ( x8 ) = f (0.7383) = -0.0013
Since f (0.7383) < 0 and f (0.7422) > 0, the root lies between 0.7383 and 0.7422.
0.7383 + 0.7422
x9 = = 0.74025
2
f ( x9 ) = f (0.74025) = 0.00195
Since f (0.74025) > 0 and f (0.7383) < 0, the root lies between 0.74025 and 0.7383.
0.74025 + 0.7383
x10 = = 0.7393
2
f ( x10 ) = f (0.7393) = 0.0004
Since f (0.7393) > 0 and f (0.7383) < 0, the root lies between 0.7393 and 0.7383.
0.7393 + 0.7383
x11 = = 0.7388
2
Since x 10 and x11 are the same up to two decimal places, the root is 0.73.
Another random document with
no related content on Scribd:
performance, is as a whole only the intensification of this being-
human. Henceforward all that resists our sensations is not mere
resistance or thing or impression, as it is for animals and for children
also, but an expression as well. Not merely are things actually
contained in the world-around but also they possess meaning, as
phenomena in the world-view. Originally they possessed only a
relationship to men, but now there is also a relationship of men to
them. They have become emblems of his existence. And thus the
essence of every genuine—unconscious and inwardly necessary—
symbolism proceeds from the knowledge of death in which the
secret of space reveals itself. All symbolism implies a defensive; it is
the expression of a deep Scheu in the old double sense of the word,
[179]
and its form-language tells at once of hostility and of reverence.
Every thing-become is mortal. Not only peoples, languages, races
and Cultures are transient. In a few centuries from now there will no
more be a Western Culture, no more be German, English or French
than there were Romans in the time of Justinian. Not that the
sequence of human generations failed; it was the inner form of a
people, which had put together a number of these generations as a
single gesture, that was no longer there. The Civis Romanus, one of
the most powerful symbols of Classical being, had nevertheless, as
a form, only a duration of some centuries. But the primitive
phenomenon of the great Culture will itself have disappeared some
day, and with it the drama of world-history; aye, and man himself,
and beyond man the phenomenon of plant and animal existence on
the earth’s surface, the earth, the sun, the whole world of sun-
systems. All art is mortal, not merely the individual artifacts but the
arts themselves. One day the last portrait of Rembrandt and the last
bar of Mozart will have ceased to be—though possibly a coloured
canvas and a sheet of notes may remain—because the last eye and
the last ear accessible to their message will have gone. Every
thought, faith and science dies as soon as the spirits in whose
worlds their “eternal truths” were true and necessary are
extinguished. Dead, even, are the star-worlds which “appeared,” a
proper world to the proper eye, to the astronomers of the Nile and
the Euphrates, for our eye is different from theirs; and our eye in its
turn is mortal. All this we know. The beast does not know, and what
he does not know does not exist in his experienced world-around.
But if the image of the past vanishes, the longing to give a deeper
meaning to the passing vanishes also. And so it is with reference to
the purely human macrocosm that we apply the oft-quoted line,
which shall serve as motto for all that follows: Alles Vergängliche ist
nur ein Gleichnis.
From this we are led, without our noticing it, back to the space-
problem, though now it takes on a fresh and surprising form. Indeed,
it is as a corollary to these ideas that it appears for the first time as
capable of solution—or, to speak more modestly, of enunciation—
just as the time-problem was made more comprehensible by way of
the Destiny-idea. From the moment of our awakening, the fateful and
directed life appears in the phenomenal life as an experienced
depth. Everything extends itself, but it is not yet “space,” not
something established in itself but a self-extension continued from
the moving here to the moving there. World-experience is bound up
with the essence of depth (i.e., far-ness or distance). In the abstract
system of mathematics, “depth” is taken along with “length” and
“breadth” as a “third” dimension; but this trinity of elements of like
order is misleading from the outset, for in our impression of the
spatial world these elements are unquestionably not equivalents, let
alone homogeneous. Length and breadth are no doubt,
experientially, a unit and not a mere sum, but they are (the phrase is
used deliberately) simply a form of reception; they represent the
purely sensuous impression. But depth is a representation of
expression, of Nature, and with it begins the “world.”
This discrimination between the “third” and the other two
dimensions, so called, which needless to say is wholly alien to
mathematics, is inherent also in the opposition of the notions of
sensation and contemplation. Extension into depth converts the
former into the latter; in fact, depth is the first and genuine dimension
in the literal sense of the word.[180] In it the waking consciousness is
active, whereas in the others it is strictly passive. It is the symbolic
content of a particular order as understood by one particular Culture
that is expressed by this original fundamental and unanalysable
element. The experiencing of depth (this is a premiss upon which all
that follows is dependent) is an act, as entirely involuntary and
necessary as it is creative, whereby the ego keeps its world, so to
say, in subordination (zudiktiert erhält). Out of the rain of impressions
the ego fashions a formal unit, a cinematic picture, which as soon as
it is mastered by the understanding is subjected to law and the
causality principle; and therefore, as the projection of an individual
spirit it is transient and mortal.
There is no doubt, however reason may contest it, that this
extension is capable of infinite variety, and that it operates differently
not merely as between child and man, or nature-man and townsman,
or Chinese and Romans, but as between individual and individual
according as they experience their worlds contemplatively or alertly,
actively or placidly. Every artist has rendered “Nature” by line and by
tone, every physicist—Greek, Arabian or German—has dissected
“Nature” into ultimate elements, and how is it that they have not all
discovered the same? Because every one of them has had his own
Nature, though—with a naïveté that was really the salvation of his
world-idea and of his own self—every one believed that he had it in
common with all the rest. Nature is a possession which is saturated
through and through with the most personal connotations. Nature is
a function of the particular Culture.
III
IV
MAKROKOSMOS
II
MAKROKOSMOS
II
APOLLINIAN, FAUSTIAN AND MAGIAN SOUL