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

0% found this document useful (0 votes)
6 views24 pages

Numerical Methods

Chapter 6 discusses numerical methods used in engineering mathematics for solving problems where analytical solutions are unavailable. It covers concepts such as accuracy, precision, types of errors, and various numerical techniques including root-finding methods and numerical integration. The chapter emphasizes the importance of approximations and the errors associated with numerical solutions.

Uploaded by

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

Numerical Methods

Chapter 6 discusses numerical methods used in engineering mathematics for solving problems where analytical solutions are unavailable. It covers concepts such as accuracy, precision, types of errors, and various numerical techniques including root-finding methods and numerical integration. The chapter emphasizes the importance of approximations and the errors associated with numerical solutions.

Uploaded by

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

telegram- Hmara college

Chapter 6
Numerical Methods
@getstudyfeverbot
CHAPTER HIGHLIGHTS

☞ Numerical methods ☞ Numerical solutions of ordinary differential


☞ Accuracy and precision equations
☞ Curve fitting ☞ Multi-step methods
☞ Numerical integration ☞ Runge–Kutta methods
☞ Predictor-corrector methods

Numerical Methods Accuracy: Accuracy refers to how closely a computed


value agrees with the true value.
We encounter problems in Engineering mathematics for
which analytical methods are not available to find solutions. Precision: Precision refers to how closely computed values
Further, it may be sufficient in engineering applications to agree with each other after repeated iterations. The follow-
find approximate solutions. The numerical methods offer us ing figures illustrate the difference between accuracy and
approximate solutions. precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
1. Methods for finding roots of algebraic or transdental values computed by a numerical method.
equations
2. Solutions to system of linear equation True True
value value
3. Numerical Integration
4. Numerical solutions of ordinary differential equation.
value

value

Accuracy and Precision


Solutions of problems computed by numerical methods are
Time Time
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision. Accurate but not precise Precise but not accurate

telegram- Hmara college

@getstudyfeverbot

Chapter 06.indd 119 5/31/2017 10:59:22 AM


2.120 | Part II ■ Engineering Mathematics

True value Possibility Procedure to Follow


The (n + 1)th digit is less than 5 Discard all the digits to the
(OR) right of nth digit and leave
The (n + 1)th digit is equal to 5 and the nth digit as it is
the nth digit is even
The (n + 1)th digit is greater than 5 Discard all the digits to
value

(OR) the right of nth digit and


The (n + 1)th digit is equal to 5 and increase the nth digit by 1.
the nth digit is odd.
Time
For example,
Neither accurate nor precise Consider the number 25.31465.
When written in floating point form
Errors in the solutions obtained by numerical methods: 25.31465 = 0.2531465 × 102
As the numerical methods give approximate solutions, these ≈ 0.253146 × 102 (Rounded off to six significant digits)
solutions contain errors. ≈ 0.25315 × 102 (Rounded off to five significant digits)
Let x denote the actual value (or) true value and let x denote ≈ 0.2532 × 102 (Rounded off to four significant digits)
an approximate value of the solution obtained by a numeri- ≈ 0.253 × 102 (Rounded off to three significant digits)
cal method.
Definition The difference between the true value and its
Error = ∈ = x - x
rounded off value is called the rounded off error.
Absolute error = |∈| =| x − x |
•• If x is the true value and x* is its rounded off value such
x−x that |x - x*| ≤ 0.5 × 10-m (OR) |x - x*| ≤ 5 × 10-(m+1) then
Relative error =∈r = |∈| = x* is said to denote x correct to m significant digits.
| x| |x|
Truncation Error The error in a method, which occurred
|x − x| because some series (finite or infinite) is truncated to a ­fewer
Percentage error =∈p =∈r × 100 = × 100.
x (and finite) number of terms is called the truncation error.
For instance,
Types of Errors ( x − x0 ) 2
Let f ( x ) = f ( x0 ) + ( x − x0 ) f ′( x0 ) + f ′′( x0 ) +  +
Inherent Error 2!
( x − x0 ) m −1 ( x − x0 ) m ( m )
The error which is already present in the statement of the f ( m − 1)( x0 ) + f ( x0 ) +  ∞
problem before its solution, is called the inherent error. ( m − 1) m
(1)
This type of errors arise due to any one or more of the denote the Taylor’s series expansion of f(x) about x = x0.
following reasons.
If we retain the first m terms, we get
•• Wrong formulation of the problem f(x) ≈
•• Unsuitable solution procedure ( x − x0 ) 2
•• Invalid assumptions in the formulation f ( x0 ) + ( x − x0 ) f ′( x0 ) + f ′′( x0 ) +  +
2!
•• Inaccurate data
( x − x0 ) m −1 ( m −1)
f ( x0 ) (2)
( m − 1)!
Round off Error
( x − x0 ) m
5 where the series of infinite terms
Real numbers such as , 2 , π , etc., contain an infinite num-

m!
6 m −1
ber of digits when expressed in decimal form. In general, in ( x − x )
f ( m ) ( x0 ) + 0
f ( m +1) ( x0 ) +  ∞ (3)
scientific and engineering computations, a real number x is ( m + 1)!
represented as x = ± 0. d1d2d3 … dn … × 10k, known as float- is neglected.
ing point form of x. The first term in this neglected part of the series is called
(where d1, d2, … dn … are all digits from 0 to 9 and k is a the principal part of the truncation error or simply the trun-
non zero integer). Each digit d1, d2 … other than the leading cation error.
zeros (the zeros that occur before the first non-zero digit) is ( x − x0 ) m ( m )
\Truncation error = TE = f (ξ ); x0 < ξ < x
called a significant digit. As its not possible to retain infinite m!
number of digits in a number, we round off the number to, As x is an unknown function of x, we have
say n significant digits. 1
| TE | ≤ max[|( x − x0 ) m | M m ]
To round off a number to n significant digits, proceed as m!
follows: where Mm = [a, b] max|f (m)(x)|

Chapter 06.indd 120 5/31/2017 10:59:24 AM


Chapter 6 ■ Numerical Methods | 2.121

SOLVED EXAMPLES 3 3
f ′( x ) = ⇒ f ′(0) =
2 1 + 3x 2
Example 1
π 11 −9 −9
If the number = 0.785398163 is approximated by , f ′′( x ) = 3
⇒ f ′′(0) =
4 14 4
then 4(1 − 3 x ) 2
  (i) Find the number of digits upto which, this approxima- 27 1
tion is accurate. and f ′′′( x ) = × 5
8
(ii) Find the absolute and the percentage errors. (1 + 3 x ) 2
\ Substituting these in (2), we get
Solution
3 9 x2
π f ( x) = 1 + 3x ≈ 1 + × −
Given = 0.785398163 2 4 2!
4
π 11 3 9
Let x = = 0.785398163 (Exact value) and x = = 1 + × − x2
4 14 2 8
 π x3
= 0.785714285  Approximate value of  Truncation error = f ′′′(0)
 4 3!
π 11 1  Max x3 
  (i) | x − x | = − ≤  
4 14 3!  0 ≤ x ≤ 1 
= | 0.785398163 - 0.785714285 |
 27 
= 3.16122 × 10-4  Max 
 0 ≤ x ≤1 8(1 + 3 x ) 
5 / 2
≤ 5 × 10-4
11 π 1  27 
\ The approximation to is accurate upto three = (1)
3!  8 

14 4
significant digits
= 0.5625.
(ii) Absolute error = | x − x |
11 π Methods for Finding the Real Roots
=− = 3.16122 × 10 −4
14 4 (Zeros) of f (x) = 0
|x−x | The equation of the form f (x) = 0 is called an Algebraic
Percentage error = × 100 = 0.04%. or Transcendental according as f (x) is purely a polynomial
x
in x or contains some other functions such as exponential,
logarithmic and trigonometric functions etc.
Example 2
Examples:
Using the Taylor’s series expansion about x = 0, find a s­ econd
degree polynomial approximation to f ( x ) = 1 + 3x . Also 1. x9 + 8x5 - 4x3 - 11x + 3 = 0 → Algebraic equation
find the maximum error for this approximation when 2. 10x4 - log(x2 - 3) + e-xsin x + tan2 x = 0 → Transcen­
x ∈ [0, 1]. dental equation
In this chapter, we obtain the solution of an equation f (x)
Solution
= 0, i.e., we mean to find the zeros of f (x).
We know that the Taylor’s series expansion of f(x) about x We shall now discuss few methods to find the real roots
= 0 is of both algebraic (with numerical coefficients) and tran-
x2 scendental equations.
f ( x ) = f (0) + xf ′(0) + f ′′(0) We first find an approximate value of the root of the given
2!
equation and then successively improve it to some desired
x3
+ f ′′′(0) +  +  ∞ (1) degree of accuracy.
3! We start with an initial approximate value, say x0, and
\ Considering the terms upto second degree, we have then find the better approximations successively x1, x2, x3 …,
x2 xn by repeating the same method.
f ( x ) ≈ f (0) + x f ′(0) + f ′′(0)  (2) If the successive approximations at each step of a method
2!
approach the root more and more closely, we say that the
Here f ( x ) = 1 + 3 x ⇒ f (0) = 1 method converges.

telegram- Hmara college

Chapter 06.indd 121 5/31/2017 10:59:26 AM


2.122 | Part II ■ Engineering Mathematics

The Intermediate Value Theorem a0


=
\ Sn α=
1α 2α 3 …α n (–1) n
If a function f (x) is continuous between a and b and f (a) and an
f (b) are of opposite signs, then there exists at least one root For example, consider the polynomial equation
say a between a and b of the equation
f (x) = 0, i.e., f (a) = 0 (x – 1)(x – 2)(x – 3) = x3 – 6x2 + 11x – 6 = 0

NOTE (We can see immediately that the roots are 1, 2, 3)


Root ‘a’ of f (x) = 0, will be unique in (a, b) if f ′ (x) has the ( − 6)
The sum of roots = (1 + 2 + 3) = −
same sign in (a, b) (i.e., f ′(x) > 0 or f ′(x) < 0 in a < x < b) 1
The sum of the products of the roots, taken two at a time
11
Relations between Roots and Coefficients S2 = 1( 2) + 1(3) + 2(3) = 11 =
1
An nth order equation has n roots. Corresponding to every We can drop the word ‘sum’ and ‘products’ for the last
root, there is a factor. If a is a root of f (x) = 0, then x - a is relation, because there is only one term (only one product).
a factor of f (x). Sometimes (x – a)2 may also be a f­ actor. In ( − 6)
such a case, a is said to be a double root. Similarly equa- The product = 1( 2)(3) = 6 = − .
1
tions can have triple roots, quadruple roots and roots of
multiplicity m. If m is the greatest value of k, for which
(x – a)k is a factor of f (a), then a is said to be a root of
Roots of Equations and Descartes’ Rule
multiplicity m. If all the roots are counted by taking their If the coefficients are all real and the complex number z1, is
multiplicity into account, the number of roots is equal to n, a root of f (x) = 0, then the conjugate of z1, viz, z1 is also a
the degree of the equation. root of f (x) = 0. Thus, for equations with real, coefficients,
If a1, a2,…, an (not necessarily distinct) are the roots of complex roots occur in pairs.
f (x) = 0, then A consequence of this is that any equation of an odd
degree must have at least one real root.
f (x) = an(x – a1) (x – a2) … (x – an)
The number of roots is related to very simple properties
= a [xn – S xn–1 + S xn–2 + … + (–1) n S ]
n 1 2 n of the equation as illustrated below.
Where Let a1 be a positive root, i.e., x – a1, is a factor.
S1 = The sum of the roots Let a2 be another positive root, i.e., x2 – (a1 + a2)x + a1
S2 = The sum of the products of the roots taken 2 at a time a2 is a factor.
S3 = The sum of the product of the roots taken 3 at a time Let a3 be another positive root i.e., x3 – (a1 + a2 + a3)x2
and so on. + (a1 a2 + a2 a3 + a3 a1)x – a1 a2 a3 is a factor.
Sn = The ‘sum’ of the product of the roots taken n (or all) We note that every positive root introduces a sign change
at a time. Thus, Sn is a single term. in the polynomial. For 1 root, there is 1 sign change (the
Sn = a1 a2 … an coefficient of x is positive and –a1 is negative)
Let us write down the polynomial f (x) in two forms: The second root results in a second sign change [x2 – (a1
The standard form + a2)x + a1 a2 has 2 sign changes] and so on.
But every sign change need not correspond to a real posi-
f (x) = a xn + a xn–1 + a xn–2 + … +a x + a
n n–1 n–2 1 0 tive root. (For example, x2 - 2x + 4 has two sign changes but
In terms of the roots of the corresponding equation. the corresponding equation x2 – 2x + 4 = 0 has no real roots.
The number of positive roots is at the most equal to the
f (x) = an [xn – S1xn–1 + S2xn–2 + … + (–1) x–1 Sn–1x + (–1) nSn] number of sign changes. It could also be less than that by 2,
These polynomials are identically equal, i.e., equal for 4…, i.e., if there are k sign changes in f (x), the number of
all values of x. Therefore the corresponding coefficients are positive roots could be k, k – 2, k – 4, …
a This is called Descartes’ Rule of Signs. This rule can be
equal. The sum of the roots S1 = − n –1 . extended to negative roots as follows. The number of nega-
an
The sum of the products of the roots, taken two at a time, tive roots of f (x) = 0 is equal to the number of positive roots
a of g(x) = f (–x) = 0
S2 = n – 2 . For example, consider f (x) = x5 – 3x3 + 6x2 – 28x
an
+ 24. There are 4 sign changes in f (x)
The sum of the products of the roots, taken three at a \ The number of positive roots could be 4, 2 or 0.
a
time, S3 = − n −3 and so on. Consider g(x) = f (–x)(–x) 5 – 3(–x) 3 + 6(–x) 2 – 28(–x) + 24
an = –x5 + 3x3 + 6x2 + 28x + 24
The ‘sum’ of the ‘products’ of the roots taken m(m ≤ n) There is only one sign change in f (–x).
a \ The number of negative roots of f (x) = 0 is 1. (It can’t
at a time Sm = Σα1α 2α 3 …α m = ( −1) m n − m .
an be –1, –3, …).

Chapter 06.indd 122 5/31/2017 10:59:28 AM


Chapter 6 ■ Numerical Methods | 2.123

The following table shows the various possibilities for Solution


the roots. Given p – q, p, p + q are the roots of the equation.
Negative Positive Complex \ The sum of the roots is (p – q) + p + (p + q) = 18
1 4 0 ⇒ 3p = 18 ⇒ p = 6
1 2 2
1 0 4
and the product of the roots is (p – q) p(p + q) = 162

We have considered one specific equation and this 162


p2 – q2 = = 27 ⇒ 36 – q 2 = 27
specific equation has 5 specific roots. We can use more 6
advanced techniques to find the actual roots. But even with-
out that, using only Descartes rule, we expect exactly one of ⇒ q = ±3 \ p = 6 and q = ±3.
the 3 situations shown in the table above.
Bisection Method (Bolzano Method)
Example 3 or (Halving Method)
Find the nature of roots of the equation, f (x) = x3 + x - 2 = 0. Consider the equation f (x) = 0 (1)
If f (x) is continuous between a and b and f (a) f (b) > 0,
Solution then there exists one root between a and b. Let f (a) be nega-
There is only 1 change of sign in f (x). tive and f (b) be positive. The bisection method isolates the
root in [a, b] by halving process, approximately dividing the
We know that when f (x) has r changes of sign then f (x) has
given interval [a, b] into two, four, eight, etc. equal parts.
r, r – 2, r – 4, … positive roots.
Thus, the first approximation to the root is given by:
\ f (x) = 0 has one positive root.
Now f (-x) ≡ -x3 - x - 2 = 0. q = 0 a+b
x0 =
2
Since there is no change of sign in f (-x), f (x) has no nega-
tive roots. The number of complex roots is even. a b
a+b
\ The equation has one positive root, and two complex roots. 2
Hence f (x) = 0 has 1 real root and two complex roots. If f (x0) = 0, then x0 is a root, otherwise the root lies either
between a and x0 or x0 and b depending on whether f (x0) is
Example 4 positive or negative. We again bisect the interval and repeat
How many non real-roots does the equation x4 – 2x2 + 3x – 2 the process until the root is obtained to desired accuracy.
= 0 have?
Example 4
Solution Find a real root of the equation f (x) = x3 - 2x2 + 3x - 1 on the
Let f (x) = x4 – 2x2 + 3x – 2 interval (0, 1) using bisection method with four iterations.
f (x) = 0 has 3 sign changes
Solution
\ f (x) has 3 or 1 positive roots.
We have f (0) = -1 < 0 and
f (–x) = x4 – 2x2 – 3x – 2
\ f (–x) has one sign change f (1) = 1 - 2 + 3 - 1 = 1 > 0
\ f (x) has exactly one negative root. \ A root lies between 0 and 1
As the sum of the co-efficient of f (x) is zero, 0 +1
\ The first approximation to the root is = 0.5. Now
x = 1 is a root of f (x) = 0 2
f (0.5) = (0.5)3 - 2(0.5)2 + 3(0.5) - 1 = 0.125 > 0 and f (0) < 0
\ f (x) = (x – 1)(x3 + x2 – x + 2) = (x – 1) f1(x). By trial, f1
\ The root lies between 0 and 0.5. The second
(–2) = 0
0 + 0.5
\ f1(x) = (x + 2)(x2 – x + 1) approximation to the root is = 0.25.
2
We can see that x2 – x + 1 = 0 has two non-real roots.
Now f (0.25) = (0.25)3 - 2(0.25)2 + 3(0.25) - 1
\ f (x) has one positive, one negative and two non-real roots.
= -0.359 < 0 and f (0.5) > 0
\ The root lies between 0.25 and 0.5.
Example 3 0.25 + 0.5 0.75
If p – q, p, p + q are the roots of the equation x3 – 18x2 + 99x \ The third approximation to the root is =
2 2
– 162 = 0, then find the values of p and q. = 0.375.

Chapter 06.indd 123 5/31/2017 10:59:29 AM


2.124 | Part II ■ Engineering Mathematics

Now f (0.375) = (0.375)3 - 2(0.375)2 + 3(0.375) - 1 y A[a, f (a)]

= -0.103 < 0 and f (0.5) > 0


\ The root lies between 0.375 and 0.5.
0.375 + 0.5
\ The fourth approximation to the root is
2 x3 x2 x1
x
o a b
0.875 f
= = 0.4375. e
2
d
y = f (x) B[b, f(b)]
Convergence of Bisection Method
If x1, x2, x3,…, xn is the sequence of midpoints obtained
b−a NOTE
by bisection method, then | c − xn | ≤ n , n = 1, 2, 3 …
2 This method is faster than the first order fixed point
where ‘c’ is between a and b. iteration.

NOTE
In bisection method, the convergence is very slow but Convergence of Regula Falsi Method
­definite. The order of convergence is linear or of first order. The order of convergence of the method of false position is
greater than 1.

Regula Falsi Method or (The Method


of False Position) The Secant Method
In this method, to find the real root of the equation f (x) = 0, This method is quite similar to that of Regula–Falsi method
we consider a sufficiently small interval (a, b), a < b such except for the condition f (a) f (b) < 0. The interval at each
that f (a) and f (b) will have opposite signs. This implies a iteration may not contain the root. Let the initial limits of
root lies between a and b according to intermediate value the interval be ‘a’ and ‘b’.
theorem. Also the curve y = f (x) will meet the X-axis at The formula for successive approximation general form is
some point between A [a, f (a)] and B [b, f (b)]. The equation
of the chord joining A [a, f (a)] and B [b, f (b)] is given by: ( xn − xn −1 ) f ( xn )
xn +1 = xn +
f ( xn −1 ) − f ( xn )
f ( b) − f ( a)
y − f ( a) = ( x − a) (1)
b−a In case at any stage f (xn) = f (xn-1) the method fails.
The point of intersection of the chord (1) with X-axis is
given by y = 0 in Eq. (1) NOTES
1. This method does not converge always, but Regula–
f ( b) − f ( a) Falsi method always converges.
− f ( a) = ( x − a), 2. If it converges, it converges with order 1.62 approxi-
b−a
mately, which is more rapidly than the Regula–Falsi
af (b) − bf ( a) method.
⇒ x=
f ( b) − f ( a)
Example 7
af (b) − bf ( a)
\ The first approximation x1 = (2) Find a root for 2ex sin x = 3 using Regula–Falsi method and
f ( b) − f ( a)
correct to three decimal places with three iterations.
If f (x1) = 0, then x1 is the root. If f (x1) ≠ 0 and if f (x1)
and f (a) have opposite signs, the second approximation Solution
af ( x1 ) − x1 f ( a) Let f (x) = 2exsin x - 3
x2 = (3)
f ( x1 ) − f ( a) f (0) = -3 < 0, f (1) = 2e′sin 1 - 3
Proceeding in the same way, we get x3, x4 and so on. = 1.5747 > 0
Geometrically, the required root is shown in the figure
below. \ A root lies between 0 and 1.

telegram- Hmara college

Chapter 06.indd 124 5/31/2017 10:59:30 AM


Chapter 6 ■ Numerical Methods | 2.125

Here a = 0 and b = 1 Geometrical Interpretation of


\ The first approximation Newton–Raphson Formula
af (b) − bf ( a) 0(1.5747) − 1( −3) y
x1 = = y = f(x)
f ( b) − f ( a) 1.5747 − ( −3)

3
= = 0.6557.
4.5747 f(x 0)

Now f (0.6557) = 2e0.6557sin (0.6557) - 3


= - 0.6507 < 0 and f (1) > 0
\ The root lies between 0.6557 and 1.
f(x1)
The second approximation x2
f(x 2)
(0.6557)(1.5747) − 1( − 0.6507)
= x2 x1 x0
x
1.5747 − ( − 0.6507) O

1.0325 + 0.6507 1.6832 The geometrical meaning of Newton–Raphson method is a


= = = 0.7563
2.2254 2.2254 tangent is drawn at the point [x0, f (x0)] to the curve y = f (x).
It cuts the x-axis at x1 which will be a better approximation
Now f (0.7563) = -0.0761 < 0 and f (1) > 0 of the root. Now drawing another tangent at [x1, f (x1)] which
\ The root lies between 0.7563 and 1 cuts the x-axis at x2 which is a still better approximation and
\ The third approximation to the root x3 the process can be continued till the desired accuracy has
been achieved.
(0.7653)(1.5747) − 1( − 0.0761)
= Convergence of Newton–Raphson Method
1.5747 − ( − 0.0761)
The order of convergence of Newton–Raphson method is 2
1.1909 + 0.0761 or the convergence is quadratic. It converges if |f (x). f ″(x)| <
= = 0.7675 |f ′(x) |2. Also this method fails if f ′(x) = 0
1.6508

\ The best approximation to the root upto three decimal


Newton’s Iterative Formula to Find bth Root
places is 0.768 of a Positive Real Number a
The iterative formula is given by xn+1

Newton–Raphson Method 1  a 
= (b − 1) xn + b −1 
Let x0 be the approximate root of f (x) = 0 and let x1 = x0 + h b  xn 
be the correct root. Then f (x1) = 0
⇒ f (x0 + h) = 0 (1) Newton’s Iterative Formula to Find a
Expanding Eq. (1) using Taylor’s theorem, Reciprocal of a Number N
We get f (x0) + hf ′ (x0) + … = 0 The iterative formula is given by
− f ( x0 ) xi+1 = xi (2 - xiN)
⇒ h= ,
f ′( x0 )
Example 8
f ( x0 )
\ x1 = x0 − Find a real root of the equation -4x + cos x + 2 = 0, by
f ′( x0 )
Newton–Raphson method upto four decimal places assum-
Now x1 is the better approximation than x0. Proceeding ing x0 = 0.5
this way, the successive approximations x2, x3,…, xn+1 are
f ( xn ) Solution
given by xn +1 = xn −
f ′( xn ) Let f (x) = -4x + cos x + 2 and
This is called Newton–Raphson formula. f ′(x) = -4 - sin x

@getstudyfeverbot

Chapter 06.indd 125 5/31/2017 10:59:31 AM


2.126 | Part II ■ Engineering Mathematics

Also f (0) = 1 + 2 = 3 > 0 and Let x0 = 0.041. Then x1 = x0(2 - x0 (24))


f (1) = -4 + cos 1 + 2 = -1.4596 < 0 ⇒ x1 = (0.041) (2 - (24) (0.041))
So, a root lies between 0 and 1. = 0.04165
Given x0 = 0.5 x2 = (0.0416) {2 - (24) (0.04165)} = 0.04161, similarly
\ The first approximation proceeding we get x3 = 0.041666
f ( x0 ) \ The reciprocal of 24 is 0.04166.
x1 = x0 −
f ′( x0 )
Curve Fitting
[− 4(0.5) + cos( 0.5) + 2
= 0.5 − In engineering applications, many a times, we need to find
−4 − sin(0.5)
a suitable relation or law that may exist between the vari-
[−2 + 2 + cos(0.5) ables x and y from a given set of observed values (x1, y1),
= (0.5) −
− 4 − sin 0.5 (x2, y2), …, (xn, yn), The relation connecting x and y is called
as empirical law.
0.8775
= 0.5 − The process of finding the equation of the curve of best
− 4.4794 fit which may be most suitable for predicting the value of y
= 0.5 + 0.1958 = 0.6958. for a given value of x is known as curve fitting.

Example 9
Least Squares Approximation
Obtain the cube root of 14 using Newton–Raphson method,
with the initial approximation as 2.5. Least squares approximation method is one of the best
methods available for curve fitting.
Solution Let (x1, y1), (x2, y2), …, (xn, yn) be the pairs of observed
We know that, the iterative formula to find b
a is set of values of x and y. Let y = f (x) be the functional rela-
tionship sought between the variables x and y where f (x)
1  a  consists of some unknown parameters. We need to find the
xn +1 = (b − 1) xn + b −1 
b  xn  relationship y = f (x) by using the observed values.
Here b = 3 and a = 14 and let x0 = 2.5 Procedure
1  14  1. Find the residual di = yi - f (xi) (i = 1, 2, …, n) for
∴ x1 = 2 x0 + 2 
3  x0  every pair of observed value yi and f(xi), the value of
1 14  the functional relation f (x) at x = xi
x1 = 2( 2.5) + 
3 ( 2.5) 2  2. Find the sum of the squares of residuals corresponding
to all pairs of values of yi and f(xi) and let it be S
1 14  1
= 5 +  = {5 + 2.24} = 2.413 n
3  6.25  3 i.e., S = ∑ ( yi − f ( x )) 2 .

i =1
1 14 
x2 = 2( 2.413) +  3. Find the values of the parameters in f(x) such that S is
3 ( 2.413) 2  minimum.
1 14 
= 4.826 + . Fitting a Straight Line Let y = a + bx be a straight line to
3 5.822569  . be fitted to the data (x1 y1), (x2 y2), …, (xn yn).
1 \ Residual = di = yi - (a + bxi), i = 1, 2, …, n
= {4.826 + 2.4044} = 2.410
3 Sum of the squares of the residuals = S = ∑(yi - (a + bxi ))2
\ The approximate cube root of 14 is 2.41. Now we have to find the parameters a and b such that S is
minimum
Example 10
∂S
Find the reciprocal of 24 using Newton–Raphson method = ∑ 2[ yi − ( a + bxi )( −1)] and
∂a
with the initial approximation as 0.041.
∂S
= ∑ [2( yi − ( a + bxi ))( − xi )]
Solution ∂b
1 For S to be minimum,
The iterative formula to find is,
N
∂S ∂S
= 0 and =0
xn+1 = xn(2 - xnN) ∂a ∂a

Chapter 06.indd 126 5/31/2017 10:59:33 AM


Chapter 6 ■ Numerical Methods | 2.127

⇒ ∑ [−2( yi − ( a + bxi ))] = 0 and The required values in the normal equations can be found
using the following table
∑ [2( yi − (a + bxi ))(− xi )] = 0 xi yi xi  yi xi2
⇒ ∑ yi = n a + b∑ xi (1) 1 4 4 1
2 11 22 4
and ∑ xi yi = a∑ xi + b∑ xi 2  (2)
3 35 105 9
Eqs. (1) and (2) are known as normal equations.
4 100 400 16
By solving these equations, we get the values of ‘a’ and b

Fitting a Parabola (Quadratic Equation) ∑ xi = 10; ∑ yi = 150; ∑ xi yi = 531; ∑ xi2 = 30


To fit a parabola of the type y = a + bx + cx2 to the set of data Substituting these values in Eqn. (1) and (2), we get
points (x1, y1), (x2, y2), …, (xn, yn), by proceeding as above, we 150 = 4a +10b and 531 = 10a + 30b
get the normal equations as ⇒ 4a +10b = 150
10a + 30b = 531
∑ yi = na + b∑ xi + c∑ xi2 (1)
Solving these linear equations, we get
∑ xi yi = a∑ xi + b∑ xi 2 + c∑ xi3  (2) a = -40.5 and b = 31.2
\ The straight line that fits to the given data is y = a + bx
∑ xi2 yi = a∑ xi2 + b∑ xi3 + c∑ xi4  (3)
⇒ y = -40.5 + 31.2x
By solving Eqs. (1), (2) and (3), we can get the values of The value of y at x = 5 is
the parameters a, b and c
y = -40.5 +31.2 × 5 ⇒ y = 115.5.
Fitting of various exponential curves that can be brought
into the form of a straight line: Exponential curves of the Example 12
type y = axb, y = abx and y = aebx can be fitted to the given Fit a quadratic equation y = a + bx + cx2 to the following
data by transforming it into the form of a straight line by data by the method of least squares.
applying logarithm as follows.
x -2 -1 0 1 2
y 1 5 10 22 38
Equation of Equation obtained Transformed ­equation
the curve to after applying into the form
be fitted loge(= ln) of a straight line Solution
y = axb
lny = lna + blnx Y = A + bX where Y = lny; We have to fit the curve y = a + bx + cx2 to the given data.
A = lna and X = lnx
Here the normal equations are
y = abx lny = lna + xlnb Y = A + Bx where Y = lny;
A = lna and B = lnb ∑ yi = na + b ∑ xi + c ∑ xi2 (1)
y = aebx lny = lna +bx Y = A + bx where Y = lny; ∑ xi yi = a∑ xi + b∑ xi2 + c∑ xi3(2)
A = lna
∑ xi2yi = a∑ xi2 + b∑ xi3 + c∑ xi4(3)
The values required in the normal equations can be obtained
Example 11
by the following table:
Using the method of least squares, fit a straight line y = a +
bx to the following data. xi yi xi yi xi2 x3i xi4 xi2 yi
-2 1 -2 4 -8 16 4
x 1 2 3 4
-1 5 -5 1 -1 1 5
y 4 11 35 100 0 10 0 0 0 0 0
1 22 22 1 1 1 22
Hence find the value of y at x = 5. 2 38 76 4 8 16 152

Solution ∑ xi = 0; ∑ yi = 76; ∑ xi yi = 91; ∑ xi2 = 10; ∑ xi3 = 0; ∑ xi4 = 34;


We have to fit the line y = a + bx to the given data. ∑ xi2 yi = 183
The normal equations are
Substituting these values in the normal equation we have
∑ yi = n a + b ∑ xi (1)
76 = 5a + b × 0 + c × 10
∑ xi yi = a ∑ xi + b ∑ xi2 (2) 91 = a × 0 + b × 10 + c × 0

telegram- Hmara college

Chapter 06.indd 127 5/31/2017 10:59:35 AM


2.128 | Part II ■ Engineering Mathematics

183 = a × 10 + b × 0 + c × 34 \ D2y0 = Dy1 - Dy0


⇒ 5a + 10c = 76 D2y1 = Dy2 - Dy1
10b = 91 D2yn-2 = Dyn-1 - Dyn-2
10a + 34c = 183 where D2y0 , D2y1,…, D2yn-2 are called the second order
forward differences.
Solving these equations for a, b and c we get
And in general, the nth order forward differences
a = 10.77, b = 9.1 and c = 2.21 are given by
Substituting these in y = a + bx + cx2, we get the required Dny = Dn[  f(x)] = Dn-1[  f(x + h)] - Dn-1[  f(x)]
parabola as \ Dny0 = Dn-1y1 - Dn-1y0
y = 10.77 + 9.1x + 2.21x2. Dny1 = Dn-1y2 - Dn-1y1
.
Interpolation .
The process of finding the most appropriate estimate for .
the unknown values of a function y = f (x) at some values
of x by using the given pairs of values (x, f(x)) is called These forward differences of various orders can be
interpolation. found and represented in a table called the forward
difference table as shown below
Assumptions in Interpolation x y = f(x) Dy D2y D3y D4y D5y
1. The frequency distribution is normal and not marked x0 y0
by sudden ups and downs. Dy0
x1 = x0 + h y1 D2y0
2. The changes in the series are uniform within a period. Dy1 D3y0
Before looking into interpolation, let us get x2 = x0 + 2h y2 D2y1 D4y0
Dy2 D y1
3
D5y0
familiarity with the finite differences which we use in
x3 = x0 + 3h y3 D2y2 D4y1
interpolation. Dy3 D3y2
x4 = x0 + 4h y4 D2y3
Finite Differences Dy4
x5 = x0 + 5h y5
1. Forward differences: Consider a function y = f(x).
Let we were given the following table representing 2. Backward differences: Consider a function y = f (x).
the values of y = f(x) corresponding to the values xi , Let we were given the following table representing
x2 , …, xn of x that are equally spaced (i.e., xi = x0 + ih; the values of y = f (x) corresponding to the values x1,
i = 1, 2, …, n). x2 , …, xn of x that are equally spaced (i.e; xi = x0 + ih,
x = xi x1 x2 x3 … xn
i = 1, 2, … n)
y = f(xi  ) y1 y2 y3 yn x = xi x1 x2 x3 … xn
yi = f(xi) y1 y2 y3 … yn
The forward difference of f(x) denoted by Dy = D[ f(x)]

The backward difference of f(x) denoted by ∇y (or)

can be defined as
∇[  f(x)] can be defined as
Dy = D[ f(x)] = f(x +h) - f(x) ∇y = ∇[  f(x)] = f(x) - f(x - h)
\ Dy0 = f(x0 + h) - f(x0) = y1 - y0 \ ∇y1= y1 - y0
Dy1 = y2 - y1 ∇y2 = y2 - y1
Dy2 = y3 - y2 ∇y3 = y3 - y2
. .
. . @getstudyfeverbot
. .
Dyn-1 = yn - yn-1 ∇yn = yn - yn-1
where D is called the forward difference operator and
where ∇ is called the backward difference operator and
D y0, D y1, …, D yn-1 are called the first order forward ∇y1, ∇y2, …, ∇yn are called the first order backward
differences of y = f(x) differences of y = f(x)
Similarly, D2y = D[  f(x + h)] - D[  f(x)]
Similarly, ∇2y = ∇2[  f(x)] = ∇[f(x) - ∇[  f(x - h)]
  

Chapter 06.indd 128 5/31/2017 10:59:35 AM


Chapter 6 ■ Numerical Methods | 2.129

\ ∇2y2 = ∇y2 - ∇y1


.
∇ y3 = ∇y3 - ∇y2
2
.
.
.
. yn − yn −1
[ xn −1, xn ] =

. xn − xn −1
∇2yn = ∇yn - ∇yn-1
The second order divided differences are given by:
where ∇ y2, ∇ y3, …, ∇ yn are called the second order
2 2 2
| x1 , x2 | − | x0 , x1 |
backward differences. [ x0 , x1 , x2 ] =
x3 − x0
And in general, the nth order backward differences [ x2 , x3 ] − [ x1 , x2 ]
are given by [ x1 , x2 , x3 ] =
x3 − x1
∇ny = ∇n[  f(x)] = ∇n-1[  f(x)] - ∇n-1[  f(x - h)]

Similarly, the third order divided differences are given
\ ∇nyn = ∇n-1yn - ∇n-1yn-1
by

These backward differences of various orders can be | x1 , x2 , x3 | − | x0 , x1 , x2 |
found and represented in a table called the backward [ x0 , x2 , x3 , x4 ] =

x3 − x0
difference table as shown below
| x2 , x3, x4 | − | x1, x2 , x3 |
x y = f(x) ∇y ∇2y ∇3y ∇4y ∇5y [ x1 , x2 , x3 , x4 ] =

x4 − x1
x0 y0
∇y1 Note that [x0, x1] = [x1, x0]

x1 = x0 + h y1 ∇2y2
∇y2 ∇3y3 And [x0, x1, x2] = [x1, x2, x0] = [x2, x0, x1]

x2 = x0 + 2h y2 ∇2y3
∇y3 ∇3y4 ∇4y4
x3 = x0 + 3h y3 ∇2y4
∇y4 ∇3y5 ∇4y5 ∇5y5
Interpolation Formulae
x4 = x0 + 4h y4 ∇2y5
∇y5
1. Newton’s forward interpolation formula: If the
x5 = x0 + 5h Y5 function y = f (x) takes the values y0, y1, y2, …, yn
respectively at the equally spaced points x0, x1, x2,
…, xn (i.e., xi+1 = x0 + ih (OR) xi+1 = xi + h, then the
Relation between forward and backward differences: Newton’s forward interpolation formula is given by:
First order: ∇[  f(x + h)] = D[  f(x)] p( p − 1) 2 p( p − 1)( p − 2)
Second order: ∇2[  f (x + 2h)] = D2 [  f (x)] y p = y0 + p∆y0 + ∆ y0 +
2! 3!
Third order: ∇3 [  f(x + 3h)] = D3 [  f (x)]
p( p − 1)( p − 2) ( p − ( n − 1)) n
In general, the nth order forward and backward differ- ∆3 y0 +  + ∆ y0
n!
ences are connected by the relation.
∇n[f (x+ nh)] = Dn [f (x)] x − x0
where p =
(OR) x = x0 + ph.
3. Divided differences: Consider a function y = f(x). h
Let we were given a table of values of y = f (x) at x1, 2. Newton’s backward interpolation formula: If the
x2, x3,…, xn, (need not be equally spaced) as shown function y = f(x) takes the values y0, y1, y2, …, yn
below. respectively at the equally spaced points x0, x1, x2,
x = xi x1 x2 x3 … xn …., xn (i.e., xi+1 = x0 + ih (OR) xi+1 = xi + h), then the
Newton’s backward interpolation formula is given by
yi = f( xi ) y1 y2 y3 … yn

Then the first order divided differences are given by:


p( p + 1) 2 p( p + 1)( p + 2)
Yp= ∇yn + p∇yn + ∇ yn +
2! 3!
y1 − y0
[ x0 x x ] =
p( p + 1)( p + 2) …( p + ( n − 1)) n
x1 − x0 ∇ 3 yn +  + ∇ yn
n!
y2 − y1
[ x1 x2 ] =
x − xn
x2 − x1 where p =
(OR ) x = xn + ph.
h

Chapter 06.indd 129 5/31/2017 10:59:37 AM


2.130 | Part II ■ Engineering Mathematics

NOTES and D4 y0 = D3 y1 - D3 y0
= (y4 - 3y3 + 3y2 - y1) - (y3 - 3y2 + 3y1 - y0)
1. Newton’s forward interpolation formula is
used to interpolate (estimate) the values y = \ D4 y0 = y4 - 4y3 + 6y2 - 4y1 + y0
f(x) near the beginning of the set of tabulated From the above discussion, one can observe that the coef-
values given or for estimating the value of y = ficients of yi s are nothing but the binomial coefficients with
f(x) to the left of the beginning. positive and negative signs alternatively.
2. Newton’s backward interpolation formula is \ Dn y0 = yn - nC1 yn-1 + nC2 yn-2 + … + (-1)ny0 .
used to interpolate (estimate) the values y =
f(x) near the end of the set of tabulated values Example 14
or for estimating the values of y = f(x) to the A function y = f (x) is given by the following table
right of the last tabulated value yn.
x 5 10 15 20 25
When the values x0, x1, x2, …, xn of x are not equally y = f(x) 31 42 51 62 76
spaced, then we can’t make use of Newton’s forward
as well as backward interpolation formulae. In such Using Newton’s forward interpolation formula, find the
situations, the following two interpolation formulae value of y at x = 7.
will be helpful.
Solution
3. Newton’s divided difference formula: If the function
First let us form the forward difference table:
y = f(x) takes the values y0, y1, y2, …, yn corresponding
to the values x0, x1, x2, …, xn (need not be equally x y = f(x) Dy D2y D3y D4y
spaced) of x, then the Newton’s divided difference 5 31
interpolation polynomial is given by 11
10 42 -2
y (x) = f (x) = y0 + (x - x0) [x0, x1] + (x - x0) (x - x1) 9 4
[x0, x1, x2] +…+ (x - x0)(x - x1)…(x - xn-1) [x0, x1, … 15 51 2 -3
11 -1
xn]
20 62 3
4. Lagrange’s interpolation formula: If the function y 14
= f (x) takes the values y0, y1, …, yn respectively at the 25 76
points x0, x1, x2, …, xn (need not be equally spaced)
of x, then the Lagrange’s interpolation polynomial is By Newton’s forward difference formula,
given by y (x) = f(x) = p( p −1) 2 p( p − 1)( p − 2) 3
yp = y0 + pD y0 + D y0 + D y0 +
( x − x1 )( x − x2 ) ( x − xn ) 2! 3!
y0 p( p − 1)( p − 2)( p − 3) 4
( x0 − x1 )( x0 − x2 ) ( x0 − xn ) ∆ y0 +  (1)
4!
( x − x0 )( x − x2 ) ( x − xn )
+
y1 Here x0 = 5; h = 5 and x = 7
( x1 − x0 )( x1 − x2 ) ( x1 − xn )
x − x0 7 − 5
( x − x0 )( x − x1 ) ( x − xn −1 ) ∴p= = = 0.4
+ +
yn . h 5
( xn − x0 )( xn − x1 ) ( xn − xn −1 )
Substituting these in Eq. (1), we have
y(7) = 31 + (0.4) × 11 +
Example 13
(0.4)(0.4 − 1) (0.4)(0.4 − 1)(0.4 − 2)
If D denotes the forward difference operator, then show that × ( −2) +
2! 3!
D4 y0 = y4 - 4y3 + 6y2 - 4y1 + y0
(0.4)(0.4 − 1)(0.4 − 2)(0.4 − 3)
Hence find the general expression for Dny0 in terms of y0, y1, ×4+ × ( −3)
4!
…, yn that does not involve the difference operators.
= 31 + 4.4 + 0.24 + 0.256 + 0.1248 = 36.0208
Solution \ The value of y at x = 7 is 36.0208.
We know that Dy0 = y1 - y0 Example 15
D2 y0 = Dy1 - D y0 Following table shows the values of a function y = f(x) at 0,
= (y2 - y1) - (y1 - y0) 2, 5 and 9
= y2 - 2y1 + y0 x 0 2 5 9
D y0 = D y1 - D y0
3 2 2 y = f(x) 6 15 27 40

= (y3 - 2y2 + y1) - (y2 - 2y1 + y0) = y3 - 3y2 + 3y1 - y0 Using the Lagrange’s interpolation formula, find y(6).

Chapter 06.indd 130 5/31/2017 10:59:38 AM


Chapter 6 ■ Numerical Methods | 2.131

Solution dy 1  ( 2 p − 1) 2
∴ = ∆y0 + ∆ y0
Given values of y = f (x) are dx h  2!
x 0 2 5 9 (3 p 2 − 6 p + 2) 3 
+ ∆ y0 + 
Y = f(x) 6 15 27 40 3! 
By Lagrange’s interpolation formula, we have  dy 
∴   at x = x0

( x − x1 )( x − x2 )( x − x3 )  dx 
f ( x) = y0
( x0 − x1 )( x0 − x2 )( x0 − x3 ) 1 1 1 1 1 
=  ∆y0 − ∆ 2 y0 + ∆3 y0 − ∆ 4 y0 + ∆50 …

( x − x0 ( x − x2 )( x − c3 ) h 2 3 4 5 
+ y1
( x1 − x0 )( x1 − x2 )( x1 − x3 ) ( At i = x0; p = 0)

( x − x0 )( x − x1 )( x − x3 ) d2 y d  dy  d  dy  dp 1
+ y2
And = = =
( x2 − x0 )( x2 − x1 )( x2 − x3 ) dx 2 dx  dx  dp  dx  dx h
( x − x0 )( x − x1 )( x − x2 )
+ y3  2 6p−6 3 12 p 2 − 36 p + 22 4 1
( x3 − x0 )( x3 − x1 )( x3 − x2 )  ∆ y0 + ∆ y0 + ∆ y0 
 3! 4! h

( x − 2)( x − 5)( x − 9) ( x − 0)( x − 5)( x − 9)
∴ f ( x) = ×6 + ×  d2 y  1  2 6p−6 3 12 p 2 − 36 p + 22
(0 − 2)(0 − 5)(0 − 9) ( 2 − 0))( 2 − 5)( 2 − 9)  2  = 2  ∆ y0 + ∆ y0 +
 dx  h  3! 1!
( x − 0)( x − 2)( x − 9) ( x − 0)( x − 2)( x − 5)
15 + × 27 + × 40 
(5 − 0)(5 − 2)(5 − 9) (9 − 0)(9 − 2)(9 − 5) ∆ 4 y0 

(6 − 2)(6 − 5)(6 − 9)
Now, y(6) = f(6) =  d2 y 
( −2) × ( −5) × ( −9)
 2
 dx at x = x0
(6 − 0)(6 − 5)(6 − 9) (6 − 0)(6 − 2)(6 − 9)
×6+ × 15 + × 1  2 11 4 5 5 
2 x( −3) × ( −6) −5 x − 3 x( −4) =  ∆ y0 − ∆ y0 + 12 ∆ y0 − 6 ∆ y0 + 
3
h2  
(6 − 0)(6 − 2)(6 − 5) 4 45 162 80
2+ × 40 = − + + = 30.5807. \ By using Newton’s forward interpolation formula,
9× 7× 4 5 7 5 21 the first and second derivatives of y = f (x) at x = x0 are
 dy 
given by  
Numerical Differentiation  dx  x = x0
In numerical differentiation, we find the derivatives by using 1 1 1 1 1 
the interpolation formulae. =  ∆y0 − ∆ 2 y0 + ∆3 y0 − ∆ 4 y0 + ∆5 y0 …

h 2 3 4 5 
1. Derivatives using newton’s forward difference
interpolation formula: We know that the Newton’s and
forward difference interpolation formula is
p( p −1) 2 p( p − 1)( p − 2)  d2 y  1  2 11 4 5 5 
y = y0 + pD y0 + D y0 +  2 = 2  ∆ y0 − ∆ y0 + 12 ∆ y0 − 6 ∆ y0 + …
3

2! 3!  dx  x = x0 h  
D 3y0 +…

Differentiating both sides wrt p, 2. Derivatives using newton’s backward difference
interpolation formula: We know that the Newton’s
dy 2 p −1 2 3 p2 − 6 p + 2 3 backward difference interpolation formula is y = yn +
= ∆y0 + ∆ y0 + ∆ y0 + 
dp 2! 3! p( p +1) 2 p( p + 1)( p + 2)
p∇ yn + ∇ yn + + ∇3yn …
x − x0 dp 1 2! 3!
As p = = =
h dx h Differentiating on both sides wrt p,
dy dy dp ( 2 p − 1) 2 dy 2 p +1 2 3 p2 + 6 p + 2 3

Now = = [∆y0 + ∆ y0 = ∇yn + ∇ yn + ∇ yn + 
dx dp dx 2! dx 2 3!
3 p2 − 6 p + 2 1 x − xn dp 1
+ ∆y0 + ] As p = =
3! h h dx h

Chapter 06.indd 131 5/31/2017 10:59:42 AM


2.132 | Part II ■ Engineering Mathematics

dy dy dp Solution
∴ =

dx dp dx As we have to find the first two derivatives of y = f (x) at x
= 7, (end point of the given data), we use the derivatives’
 2 p +1 2 3 p2 + 6 p + 2 3 1 formulae obtained from Newton’s backward interpolation
= ∇yn + ∇ yn + ∇ yn +  formula.
 2 ! 3 ! h
The backward difference table for the given data is
dy 1  2 p +1 2 3 p2 + 6 p + 2
∴ =  ∇yn + ∇ yn + X y = f(x) Dy D2y D3y D4y D5y
dx h  2! 3!
2 4
 4
3 ∇ yn +  3 8 3
 7 -2
4 15 5 6
 dy 

 dx  12 -8 2
  x = xn 5 27 -3 8
9 0
1 1 1 1 1  6 36 -3
= ∇yn + ∇ 2 yn + ∇3 yn + ∇ 4 yn + ∇5 yn + ... 6
h 2 3 4 5 
7 42
( At x = xn; p = 0)

d 2 y d  dy  d  dy  dp By Newton’s backward interpolation formula, we have



And =  =  
dx 2 dx  dx  dp  dx  dx  dy 
 dx 
  x = xn =7
1 2 6p+6 3 12 p 2 + 36 p + 22
=  ∇ y n + ∇ y n +
h 3! 4! 1 1 1 1 
= ∇yn + ∇ 2 yn + ∇ 3 yn + ∇ 4 yn + ∇ 5 yn 
1 h  2 3 5 
∇ 4 yn + 
h 1 1 1 1 1  69
= 6 + × ( −3) + × 0 + × 8 + × 2  = = 6.9
1 d2 y 1 2 3 4 5  10
∴ 2 = 2

dx h  d2 y 
And  2 
 2 6p+6 3 12 p + 36 p + 22 4
2   dx  x = xn =7
 ∇ yn + ∇ yn + ∇ yn + 
 3! 4! 
1  2 11 5 5 
 d2 y  = ∇ yn + ∇ yn + 12 + ∇ yn + 6 ∇ yn 
3 4
1  2 11 4 5 5  h2  
∴ 2 
= 2 ∇ yn + ∇ yn + 12 ∇ yn + 6 ∇ yn 
3
 dx  x = x h  
n
1  11 5 
\ By using Newton’s backward difference =  −3 + 0 + 12 × 8 + 6 × 2  = 6.
12  
interpolation formula, the first and second derivatives
 dy 
of y = f (x) at x = xn are given by   Example 17
 dx  x = xn
Find the first derivative at x = 6 for a function y = f (x) with
1 1 1 1 1  the following data.
= ∇yn + ∇ 2 yn + ∇3 yn + ∇ 4 yn + ∇5 yn + 

h 2 3 4 5  x 5 7 10 11 13
 d2 y  y = f(x) 100 294 900 1210 2028
and  2 
 dx  x = xn
Solution
1  2 11 4 5 5 
= 2
∇ yn + ∇ yn + 12 ∇ yn + 6 ∇ yn + 
3 As the given values of x are not equally spaced, to find the
h   first derivative of f(x), we will make use of the Newton’s
divided difference interpolation formula, which is given by
Example 16 y = f(x) = f(x0) + (x - x0) [x0, x1] + (x - x0)(x - x1) [x0, x1, x2] +
Using the values of a function y = f (x) given in the following (x - x0)(x - x1)(x - x2) [x0, x1, x2 x3] + (x - x0)(x - x1)(x - x2)
table, find the first two derivatives of f (x) at x = 7.
(x - x3)][x0, x1, x2, x3, x4] +…(1)
x 2 3 4 5 6 7
The divided differences of various orders for the given data
y = f(x) 4 8 15 27 36 42
can be represented as shown below.

telegram- Hmara college

Chapter 06.indd 132 5/31/2017 10:59:45 AM


Chapter 6 ■ Numerical Methods | 2.133

x y = f(x) First divided differences Second divided differences Third divided differences Fourth divided differences
5 100
294 − 100
= 97 202 − 97
7−5 = 21
7 294 10 − 5 27 − 21
900 − 294 =1
= 202 11 − 5
10 − 7 310 − 202 1−1
10 900 = 27 =0
11 − 7 33 − 27 13 − 5
1210 − 900 =1
= 310
11 1,210 11 − 10 13 − 7
409 − 310
= 33
2028 − 1210 13 − 10
= 409
13 2,028 13 − 11

Substituting these in Eq. (1), we get n

y = f(x) = 100 + (x - 5) × 97 + (x - 5)(x - 7) 21 + (x - 5) (x I = h ∫ f ( x0 + mh)dm


0
- 7)(x - 10) × 1 + (x - 5)(x - 7)(x - 10)(x - 11) × 0
Applying Newton’s forward interpolation formula
\ f (x) = 100 + 97(x - 5) + 21(x2 - 12x + 35) + (x3 - 22x2
n
+ 155x - 350) m( m − 1) 2
I = h ∫ ( y0 + m∆y0 + ∆ y0 + )dm
dy 0
2!
∴ = 97 + 21(2x - 12) + (3x2 - 44x + 155)
dx
Integrating term by term and applying the limits, we get
 dy 
∴  = 97 + 21(2 × 6 - 12) + (3 × 62 - 44 × 6 +155) x0 + nh
f ( x )dx = nh  y0 + n ∆y0 + n( 2n − 3) ∆ 2 y0 + n( n − 2) ∆3 y0 + 
2
 dx  x =6 ∫ 2 12 24
= 97 + 0 + (-1) = 96. x0  
 n n( 2n − 3) 2 n( n − 2) 2 3 
 y0 + ∆y0 + ∆ y0 + ∆ y0 +  (Newton–Cotes quadrature
 2 12 24  formula)
Numerical Integration 
The numerical integration can be stated as follows: y
Given a set of (n + 1) data points (xi, yi), i = 0, 1, 2, 3, …, n y = f(x)
of the function y = f (x), where f (x) is not known explicitly,
xn
it is required to find ∫ f ( x )dx .
x
x0
x0 x0 + h x0 + 2h x0 + nh
NOTE On substituting n = 1, 2, 3, … in Newton-Cote’s quadrature
Numerical integration is also known as Numerical formula, we get various quadrature formulae.
quadrature.
Trapezoidal Rule [Two-point Quadrature]
Substituting n = 1 in the Newton–Cotes formula and taking
Newton–Cote’s Quadrature Formula the curve y = f (x) through (x0, y0) and (x1, y1) as a straight
line so that differences of order higher than one becomes
[General Quadrature formula]
b zero, we get
Consider the integral I = ∫ f ( x )dx xn x0 + h
 1 
a
Let the interval [a, b] be divided into ‘n’ equal subintervals
∫ f ( x )dx = ∫ f ( x )dx = h  y0 + ∆y0 
 2 
x0 x0
of width h so that a = x0, x1 = x0 + h, x2 = x0 + 2h…b = x0 + nh
 1  h
= h  y0 + ( y1 − y0 )  = [ y0 + y1 ]
x0 + nh  2  2
∴I= ∫ f ( x )dx Similarly,
x0
x2 x0 + 2h
 1  h
Put x = x0 + mh ⇒ dx = h ⋅ dm as x → x0, m → 0 and x → x0 ∫ f ( x )dx = ∫ f ( x )dx = h  y1 + ∆y1  = [ y1 + y2 ]
 2  2
+ nh, m → n x1 x0 + h

Chapter 06.indd 133 5/31/2017 10:59:48 AM


2.134 | Part II ■ Engineering Mathematics

x3 x0 + 3h Therefore adding all these we get when ‘n’ is even,


h
∫ f ( x )dx = ∫ f ( x )dx = ( y2 + y3 )
2
x0 + nh
h ( y0 + yn ) + 4( y1 + y3 +  + yn −1 ) 
x2 x0 + 2 h
∫ f ( x )dx = 
3  + 2( y2 + y4 +  + yn − 2 )


( x0 + nh ) x0
h
Proceeding,    ∫ f ( x )dx =
2
( yn −1 + yn ) h
=  [(sum of the first and last ordinates
x0 + ( n −1) h 3
xn + 4 (sum of the odd ordinates) + 2
h
Hence, ∫ f ( x)dx = 2 ( y0 + yn ) + 2( y1 + y2 +  + yn−1)  (sum of the even ordinates)]
x0
1
xn
This is known as Simpson’s rule.
h (sum of the first and last ordinates)  3
Thus, ∫ f ( x)dx = 2 + 2 (sum of remainning ordinates) 

x0 Simpson’s Three-eighth Rule
The above rule is known as Trapezoidal rule. Substituting n = 3 in the Newton Cotes quadrature formula
and taking curve through (x0, y0), (x1, y1), (x2, y2) and (x3, y3)
Geometrical Interpretation of Trapezoidal Rule so that the differences of order higher than three becomes
y
zero, we get
(x2, y2)
(xn, yn) x3
(x1, y1) ⎡ 3 3 1 ⎤
(x0, y0) (xn−1, yn−1) ∫ f ( x )dx = 3h ⎢ y0 + Δy0 + Δ 2 y0 + Δ 3 y0 ⎥
⎣ 2 2 8 ⎦
x0

y0 y1 y2 3h
yn−1 yn = ( y0 + 3 y1 + 3 y2 + y3 )
8
Similarly,
x
O x0 x1 x2 xn−1 xn
x6
3h
Geometrically, the curve y = f (x) is replaced by n straight ∫ f ( x )dx =
8
( y3 + 3 y4 + 3 y5 + y6 ) and so on.
line segments joining the points (x0, y0) and (x1, y1); (x1, y1) x3
and (x2, y2); …, (xn-1, yn-1) and (xn, yn). The area bounded by
the curve y = f (x) is then approximately equal to the sum of Adding all these integrals from x0 to xn where ‘n’ is a
the areas of n trapeziums as shown in the figure. multiple of 3, we get
xn
3h
∫ f ( x )dx = [(y0 + yn) + 3(y1 + y2 + y4 + y5 + …+ yn-2)
Simpson’s One-third Rule x0
8
[Three-point Quadrature] + 2(y + y + y + … + y )]
3 6 9 n-3
Substituting n = 2 in the Newton–Cotes quadrature formula
taking the curve through (x0, y0), (x1, y1) and (x2, y2) as a 3
The above rule is called Simpson’s rule which is
parabola, so that the differences of order higher than 2 8
becomes zero, we get ­applicable only when ‘n’ is a multiple of 3.
x0 + 2 h
 1  Example 18
∫ f ( x )dx = 2h  y0 + ∆y0 + ∆ 2 y0 
 6  2
x0
Evaluate: ∫ 1 + x 2 dx taking h = 0.2 using
h 0
= ( y0 + 4 y1 + y2 )
3 (i) Trapezoidal rule and
Similarly, 1
(ii) Simpson’s rd rule
x0 + 4 h
h 3
∫ f ( x )dx =
3
( y2 + 4 y3 + y4 )
Solution
x0 + 2 h
Here, a = 0, b = 2, h = 0.2
x0 + nh
h
∫ f ( x )dx =
3
( yn − 2 + 4 yn −1 + yn )
So, n =
b−a 2−0
= = 10
x0 + ( n − 2 ) h h 0.2

Chapter 06.indd 134 5/31/2017 10:59:50 AM


Chapter 6 ■ Numerical Methods | 2.135

The values of x and y are tabulated as follows:

x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

1 1.0198 1.077 1.1661 1.2806 1.414 1.562 1.7204 1.8867 2.059 2.236
y = 1 + x2 y0 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10

(i) By Trapezoidal rule, By Simpon’s three-eighth rule,


π /2
2 3h
∫ 1+
x 2 dx
h
= [( y0 + y10 ) + 2( y1 + y2 +  + y9 ) ] ∫ e cos x dx =
8
[(y0 + y3) + 3(y1 + y2)]
0
2 0
3 π
= × [(2.718 + 1) + 3(2.3774 + 1.6487)]
0.2 8 6
=  [(1 + 2.236) + 2(1.0198 + 1.077 + 1.1661 +
2 π
= [(3.718) + (12.0783)] = 3.10159.

1.2806 + 1.414 + 1.562 + 1.7204 + 1.8867 + 2.059)] 16

= 0.1 [(3.236) + 2(13.1856)]


Numerical Solutions of
= 0.1 [29.6072] = 2.96072.
Ordinary Differential Equations
1 The following methods are discussed on the numerical solu-
(ii) By Simpson’s rule,
3 tions of ordinary differential equations.

2 Single-step Methods
∫ + x 2 dx
1 1. Taylor’s series method
0
2. Picard’s method of successive approximation
h ( y0 + y10 ) + 4( y1 + y3 + y5 + y7 + y9 )  Multi-step Methods
= 

3 + 2( y2 + y4 + y6 + y8 )  1. Euler’s method
0.2 2. Modified euler’s method
=
[(1 + 2.236) + 4(1.0198 + 1.1661 + 1.414
3 3. Runge–Kutta method
+ 1.7204 + 2.059) + 2(1.077 + 1.2806 + 1.562 + 4. Predictor–Corrector methods
[Milne’s and Adam’s]
1.8867)]

0.2 Taylor’s Series Method


= [(3.236) + 29.5172 + 11.6126] Consider the differential equation
3
dy
= 2.95772. = f (x, y) with initial condition y(x0) = y0  (1)
dx
Let y = f (x) be the solution of Eq. (1)
Example 19
Writing the Taylor’s series expansion of f (x) at x0
π /2
( x − x0 ) 2
Evaluate ∫ e cos x dx ⋅ by Simpson’s three-eighth rule. f ( x ) = f ( x0 ) + ( x − x0 ) f ′( x0 ) + f ′′( x0 ) + 
0 2!
( x − x0 ) 2
Solution ⇒ y = y0 + ( x − x0 ) y0′ + y0′′ + 
2!
π
Taking h = , the range can be divided into three equal, sub

Put x = x1, we get


6
intervals with the division points. The values of x and y are ( x1 − x0 ) 2
y1 = y0 + ( x1 − x0 ) y0′ + y0′′ + 
tabulated as below. 2!
π π π If we take h = x1 − x0
x 0
6 3 2
h2
y = e cos x 2.718( y0) 2.3774( y1) 1.6487( y2) 1( y3) ⇒ y1 = y0 + hy0′ + y0′′ + 
2!

telegram- Hmara college

Chapter 06.indd 135 5/31/2017 10:59:53 AM


2.136 | Part II ■ Engineering Mathematics

∴ In general, Solution
h2 f (x, y) = 1 + xy
y n+1 = yn + hyn′ + y ″ +… will be the iterative formula. x0 = 0, y0 = 1
2! n
x
Example 22 The first approximation y1 = y0 + ∫ f ( x, y0 )dx
dy x0
Given = x - y2 with the initial condition y(0) = 1 x x
dx = 1 + ∫ 1 + xdx
1+ ∫ 1 + xy0 dx
Find y (0.1) using Taylor series method with step size 0.1. x0 0

x2
Solution y1 = 1 + x +
2
f (x, y) = x - y2 (0.1) 2
x = 0.1, x0 = 0, y0 = 1, h = 0.1 At x = 0.1, y1 = 1 + (0.1) + = 1.105
2
y′ = x - y2 ⇒ y′(0) = x0 - y02 = - 1; The second approximation y2,
y″ = 1 - 2yy′ ⇒ y″(0) = 1 - 2y0y0′ x

= 1 - 2 (1) (-1) = 3 = y0 + ∫ f ( x, y1 )dx


x0
y″′ = -2yy″ - 2(y′)2 x

⇒ y″′ (0) = -2 (1) (3) - 2 (-1) 2 ⇒ y2 = 1 + ∫ 1 + xy1dx


0
= -6 - 2 = -8 x
⎡ ⎛ x2 ⎞ ⎤
By Taylor’s formula, ⇒ y2 = 1 + ∫ ⎢1 + x ⎜⎝1 + x + ⎥ dx
2 ⎟⎠ ⎦
0 ⎣
h2 h3
y′″ (0) + …
x
y (0.1) = y1 = y0 + hy′ (0) + y″ (0) + ⎛ x3 ⎞
2! 3! =1+ ∫ ⎜⎝1 + x + x 2 + 2 ⎟⎠
dx
0
(0.1) 2 (0.1)3
⇒ y1 = 1 + (0.1) (-1) + (3) + ( −8) + …
2! 3! x 2 x3 x 4
=1+ x+ + +
= 1 - 0.1 + 0.015 - 0.0013 + … 2 3 8
y1 = 0.9137. (0.1) 2 (0.1)3 (0.1) 4
At x = 0.1, y2 = 1 + (0.1) + + +
2 3 8
Picard’s Method of Successive y(0.1) = 1.10534
x
Approximation The third approximation y3 = y0 + ∫ f ( x, y2 )dx ⋅

dy x0
Given the differential equation = f (x, y)(1) x
dx
⇒ y3 = 1 + ∫ (1 + xy2 )dx.
Integrate Eq. (1) from x0 to x, we get
0
x x
x
⎛ ⎡ x 2 x 3 x 4 ⎤⎞
∫ dy = ∫ f ( x, y)dx 1+ ∫ ⎜⎝1 + x ⎢⎣1 + x + + + ⎥⎟ dx
x0 x0
0
2 3 8 ⎦⎠
x
x
⎛ x3 x 4 x5 ⎞
⇒ y( x ) − y( x0 ) = ∫ f ( x, y)dx 1+ ∫ ⎜⎝1 + x + x 2 + + + ⎟ dx
x0
0
2 3 8⎠
x
x2 x3 x 4 x5 x6
⇒ y( x ) = y( x0 ) + ∫ f ( x, y)dx (2) =1+x+ + + + +
x0 2 3 8 15 48
Put y = y0, we get the first approximation, At x = 0.1,
x
(0.1) 2 (0.1)3 (0.1) 4 (0.1)5 (0.1)6
y3 = 1 + (0.1) +

yn = y0 + f ( x, yn −1 )dx.
2
+
3
+
8
+
15
+
48
x0
(0.1) 2 (0.1)3 (0.1) 4 (0.1)5 (0.1)6
Example 23 + +     + +
2 3 8 15 48
dy = 1 + 0.1 + 0.005 + 0.0003 + 0.0000125 +
Given = 1 + xy and y (0) = 1. Evaluate y (0.1) by Picard’s
dx 0.0000006 + 0.00000002
method upto three approximations. y3 = 1.105313

Chapter 06.indd 136 5/31/2017 10:59:56 AM


Chapter 6 ■ Numerical Methods | 2.137

Multi-step Methods Example 25


Find y for x = 0.1 using modified Euler’s method for the dif-
Euler’s Method dy
dy ferential equation = log(x + y) with y(0) = 1.
For the differential equation = f (x, y) with initial condi- dx
dx
tion y(x0) = y0, the Euler’s iteration formula is Solution
yn = yn-1 + h f (xn-1, yn-1), n = 1, 2, 3,… Given f (x, y) = log(x + y)
NOTE x0 = 0, y0 = 1, h = 0.1
The process is very slow and to obtain accuracy, h must To find y1, x1 = 0.1
be very small, i.e., we have to divide [x0, xn] into a more
number of subintervals of length ‘h’. y1(0) = y0 + h f (x0, y0)
= 1 + (0.1) log(0 + 1) = 1
Example 24
h
dy y − x y1(1) = y0 + [f (x0, y0) + f (x1, y1(0))]
Solve = , y (0) = 1, find y(0.5) by Euler’s method 2
dx y + x
choosing h = 0.25. h
= y0 + [log (x0 + y0) + log (x1 + y1(0))]
2
Solution
y−x 0.1
f (x, y) = =1+ [log (0 + 1) + log(0.1 + 1)]
y+x 2
x0 = 0, y0 = 1, h = 0.25 0.1
=1+ [log 1 + log 1.1] = 1.0047
Euler’s iteration formula, 2
yn = yn-1 + h f (xn-1, yn-1) h
y1(2) = y0 + [  f (x0, y0) + f (x1, y1(1))]
Put n = 1, 2
x1 = 0.25 ⇒ y1 = y(0.25) = y0 + h f (x0, y0)
h
= y0 + [log(0 + 1) + log(x1 + y1(1))]
= 1 + (0.25) ⎛ y0 − x0 ⎞ 2
⎜⎝ y + x ⎟⎠
0 0
0.1
1− 0 =1+ [log(0 + 1) + log(0.1 + 1.0047)]
= 1 + (0.25) = 1.25 2
1+ 0 = 1.0049
Put n = 2
x2 = 0.5 ⇒ y2 = y(0.5) = y1 + h f (x1, y1) h
y1(3) = y0 + [  f(x0, y0) + f(x1, y1(2))]
⎡y −x ⎤ 2
= (1.25) + (0.25) ⎢ 1 1 ⎥ 0.1
⎣ y1 + x1 ⎦ =1+ [log(0 + 1) + log(0.1 + 1.0049)]
2
⎡1.25 − 0.25 ⎤
= 1.25 + (0.25) ⎢ ⎥ = 1.0049
⎣1.25 + 0.25 ⎦
∴  y1 = 1.0049.
= 1.25 + 0.166666 = 1.4166
∴ y(0.5) = 1.4166

Modified Euler’s Method


Runge–Kutta Methods
dy First Order Runge–Kutta Method
For the differential equation = f (x, y) with initial condi-
dx y1 = y0 + hy01 [same as Euler’s method]
tion y(x0) = y0, the Modified Euler’s iteration formula is
h
yr(n) = yr-1 + [  f (xr -1, yr -1) + f (xr, yrn-1)] Second Order Runge–Kutta Method
2 1
The formula is y1 = y0 + (k + k )
NOTE 2 1 2
To find yn, we proceed to find the approximations yn(0), where k1 = h f (x0, y0) and k2 = h f (x0 + h, y0 + k1)
yn(1), yn(2) … until the two successive approximations are
approximately equal. Third Order Runge-Kutta Method
yn(0) is found by Euler’s method, i.e., yn( 0 ) = yn −1 + hf ( xn −1 , 1
The formula is y1 = y0 + (k + 4k2 + k3)
yn-1) 6 1
where k1 = h f (x0, y0)

Chapter 06.indd 137 5/31/2017 10:59:58 AM


2.138 | Part II ■ Engineering Mathematics

⎛ 1 1 ⎞ = (0.05) f (1 + 0.025, 1.2 + 0.066)


k2 = h f ⎜ x0 + h, y0 + k1 ⎟ and
⎝ 2 2 ⎠ = (0.05) f (1.025, 1.266)
k3 = h f (x0 + h, y0 + k′) where k′ = h f(x0 + h, y0 + k1). = (0.05) [(1.025)2 + (1.266)2] = 0.1326 and k4 = h
f (x0 + h, y0 + k3)

Fourth Order Runge–Kutta Method = (0.05) f (1 + 0.05, 1.2 + 0.1326)

1 = (0.05) f (1.05, 1.3326)


The formula is y1 = y0 + (k + 2k2 + 2k3 + k4)
6 1 = (0.05) [(1.05)2 + (1.3326)2] = 0.1439
where k1 = h f (x0, y0) 1
∴ y1 = y(1.05) = y0 + (k + 2k2 + 2k3 + k4)
6 1
⎛ 1 1 ⎞
k2 = h f ⎜ x0 + h, y0 + k1 ⎟ 1
⎝ 2 2 ⎠ = 1 .2 + [0.122 + 2(0.1320) + 2(0.1326)
6
+ 0.1439]
⎛ 1 1 ⎞
k3 = h f ⎜ x0 + h, y0 + k2 ⎟
⎝ 2 2 ⎠ 1
= 1.2 + [0.7951] = 1.3325
and k4 = h f (x0 + h, y0 + k3) 6

Example 26 Predictor–Corrector Methods


dy
Given = x2 + y2, y (1) = 1.2. Find y(1.05) applying fourth Milne’s Predictor Formula
dx
order Runge–Kutta method, with h = 0.05. 4h
ynp+1 = yn-3 + (2yn-2 - yn-1 + 2yn)
3
Solution
f (x, y) = x2 + y2, x0 = 1, y0 = 1.2, h = 0.05 Milne’s Corrector Formula
∴k1 = h f (x0, y0) = (0.05) [x0 + y0 ]
2 2
h
ync+1 = yn-1 + [y + 4yn + yn+1p]
= (0.05) [12 + (1.2)2] = 0.122 3 n-1

k2 = h f ⎛⎜ x0 + h , y0 + k1 ⎞⎟ Adams–Bashforth Predictor Formula


⎝ 2 2⎠
= (0.05) [f (x0 + 0.025, y0 + 0.061] h
ynp+1 = yn + [55yn - 59yn-1 + 37yn-2 - 9yn-3]
24
= (0.05) [f (1.025, 1.261)]
= (0.05) [(1.025)2 + (1.261)2] = 0.1320 Adams–Moulton Corrector Formula
k3 = h f ⎛⎜ x0 + h , y0 + k2 ⎞⎟ ync+1 = yn +
h
[ 9 ynp+1 + 19yn - 5yn-1 + yn-2]
⎝ 2 2⎠ 24

Exercises
1. Three of the roots of the equation x4 + lx3 + mx2 + nx + 3. If the equation x6 + 5x5 + 11x4 + 34x2 + 20x + 24 = 0 has
24 = 0 are 3, 1 and -2. Which of the following could be exactly four non-real roots, then the number of negative
the value of l + m - n? roots is
(A) 0 (B) 1 (A) 1 (B) 0
(C) 2 (D) 3 (C) 3 (D) 2
4. A student finds, by trial, two negative and one posi-
2. If one of the roots of the equation x3 + 5x2 - 12x - 36 = tive root(s) of the equation x5 + 5x4 + 2802x + 3024
0 is thrice another root, then the third root is = 103x3 + 329x2. How many non-real roots does the
(A) -6 (B) 3 equation have?
89 (A) 0 (B) 1
(C) -2 (D) −
13 (C) 2 (D) 4

telegram- Hmara college

Chapter 06.indd 138 5/31/2017 11:00:01 AM


Chapter 6 ■ Numerical Methods | 2.139

5. If the equation 3x4 - 13x3 + 7x2 + 17x + a - 10 = 0 has 15. The Newton’s iterative formula to find the value of 3
N
exactly three positive roots, then a can be is
(A) 11 (B) 4  N 
(A) xi +1 =  2 xi − 2 
(C) 13 (D) 12 xi 

6. If two of the roots of the equation x3 + 3x2 - 10x - 24 = 1 N 
0 are such that one is twice the other, then the third root (B) xi +1 =  xi − 2 
3 xi 
is
(A) -4 (B) -3 1 N 
(C) xi +1 =  2 xi + 2 
(C) -2 (D) 3 3 xi 
7. If 2.236146 is an approximation to 5, then the rela- 1 N 
(D) xi +1 =  2 xi − 2 
tive error is 3 xi 
(A) 3.4883 × 10-5 (B) 4.8383 × 10-5
16. Find the second approximation to the cube root of 24
(C) 8.3483 × 10 -4
(D) 5.8438 × 10-4
correct to three decimal places using Newton’s iterative
8. The least number of terms required to be considered formula.
1 (A) 2.695 (B) 2.885
in the Taylor’s series approximation of f ( x ) =
(2 + x) (C) 3.001 (D) None of these
about x = 0 such that the truncation error is at most 5 × 17. The Newton’s iterative formula to find the value of
10-4 for x ∈ [0, 1] is 1
(A) 3 (B) 5 is
N
(C) 6 (D) 8 (A) xi+1 = xi(2 + xiN)
9. Let f (x) = x3 - x - 5 = 0. By bisection method first two (B) xi+1 = xi(2 - xiN)
approximations x0 and x1 are 1.5 and 2.25 respectively, (C) xi+1 =xi2(2 + xiN)
then x2 is (D) None of these
(A) 1.625 (B) 1.875
18. Find the reciprocal of 22 using Newton–Raphson
(C) 1.999 (D) None of these
method.
10. Find the fourth approximation of the root of the equa- (A) 0.0454545 (B) 0.4504504
tion x3 + x - 11 = 0, between 2 and 3, using Bisection (C) 0.54054 (D) None of these
method. 19. If the first approximation of the root of x3 - 3x - 5 = 0
(A) 1.925 (B) 2.832 is (x0 =) 2, then find x1 by Newton–Raphson method.
(C) 2.5215 (D) 2.0625
(A) 2.2806 (B) 2.2790
11. The absolute error bisection method is (C) 2.3333 (D) None of these
1 20. Find the first approximation of the real root by Newton–
(A) 2n (B) n |b - a|
2 Raphson method for x4 + x3 - 7x2 - x + 5 = 0 by taking
1 x0 = 2.
(C) (D) |b - a|2n
|b−a| (A) 2.066 (B) 2.981
(C) 2.819 (D) None of these
12. If the first two approximations x0 and x1 to a root of x3
- x - 4 = 0 are 1.666 and 1.780 respectively, then find 21. If y = 2.6 + 0.7x is a line that fits the data:
x2 by Regula–Falsi method. x -2 -1 0 1 2
(A) 1.974 (B) 1.794 y 1 2 3 K 4
(C) 1.896 (D) None of these
Then the value of K is
13. Find the second approximation to the root of the equa- (A) 3 (B) 5
tion 2x - 5 = 3sin x between (2, 3) using the method of (C) 6 (D) 7
false position.
(A) 2.2523 (B) 2.012 22. If a curve y = abx is fitted to the following data, then the
value of ‘b’ is
(C) 2.8804 (D) None of these
x -2 -1 0 1 2
14. For N = 28 and x0 = 5.5, the first approximation to N
by Newton’s iteration formula is y 11 13 20 25 34

(A) 5.295 (B) 5.582 (A) 0.2911 (B) 0.9845


(C) 5.396 (D) None of these (C) 1.3379 (D) 2.0034

Chapter 06.indd 139 5/31/2017 11:00:02 AM


2.140 | Part II ■ Engineering Mathematics

23. For a set of 5 pairs of values (x0, y0), (x1, y1), (x2, y2) (x3, 3
1
y3) and (x4, y4) of (x, y), if D3y0 = 4 and D3y1 = 10, then 29. Find the value of ∫ 1 + x 2 dx taking four intervals by
2
the value of ∇4y4 is trapezoidal rule and also find the error when compared
(A) 4 (B) 6 to its exact value.
(C) 10 (D) 14 (A) 0.1759, 0.000004 (B) 0.1826, 0.04
24. The value of y(1.5) computed from the following data (C) 0.1953, 0.004 (D) 0.1423, -0.0004
using Newton’s forward interpolation formula is 1
x2
x 1 2 3 4 5
30. Find ∫ 1 + 8 x3 dx using Trapezoidal rule by taking 4
0
y 6 7 12 21 34 strips.
(A) 6 (B) 6.5 (A) 0.0911 (B) 0.9011
(C) 0.1901 (D) None of these
(C) 7 (D) 7.5 1.5
dx
25. The Lagrange’s interpolation polynomial correspond- 31. The estimate of ⋅
∫ x
obtained using Simpson’s rule
ing to the pairs of values of x and y given in the follow- 0.5
ing table is with three point function evaluation exceeds the exact
value by
x 1 3 4 7 (A) 0.235 (B) 0.068
y 36 16 9 72 (C) 0.024 (D) 0.012
6
(A) x3 - 6x2 + 9x + 36
(B) x3 - 6x2 + 18x - 45
32. Find the value of ⋅
∫ x log xdx taking 4 strips by
2
(C) 3x3 + 4x2 - 5x + 27 1
Simpson’s rd rule upto four decimals.
(D) x3 - 7x2 + 5x + 37 3
(A) 21.8901 (B) 22.8661
dy d2 y (C) 23.6581 (D) None of these
26. The values of and at x = 5 from the following
dx dx 2 π /2
table respectively are 1
33. Evaluate ∫ sin x dx by Simpson’s
3
rule using six
0
x 0 1 2 3 4 5 intervals.
y = f(x) 1 4 9 16 21 28 (A) 0.97768 (B) 0.98869
(C) 0.99968 (D) None of these
(A)15.00 and 26.45
(B)13.73 and 23.33 34. Find the maximum error in evaluating the above when
compared to its exact value.
(C)17.13 and 31.42
(A) 0.000032 (B) 0.00032
(D)21.64 and 43.00 (C) 0.00000032 (D) 0.0032
dy 3
1 3
27. The value of at x = 12 from the table given below is 35. Evaluate ∫ dx by using Simpson’s rule by
dx 2+ x 2 8
0
x 10 15 20 25 taking 3 strips.
y = f(x) 354 332 291 260 (A) 0.507 (B) 0.5007
(C) 0.7839 (D) None of these
(A) -3.9427 (B) 4.6125 dy
(C) -0.4652 (D) 1.3549 36. If = 1 - 3xy2, y (0) = 0, then by Taylor’s method y
dx
dy (0.1) =
28. The magnitude of error when at x = 2 is found by
dx (A) 0.02 (B) 0.001
1 (C) 0.05 (D) 0.1
Newton’s forward interpolation formula for y = y =
x dy
using the following data is 37. If = 2x + y, y (0) = 1, the Picard’s approximate of y
dx
upto second degree terms is
x 2 4 6 8
x2
y = 1/x 0.5000 0.2500 0.1667 0.1250 (A) 1 + x + x2 (B) 1 + x +
2
(A) 0.0005 (B) 0.0025 x2
(C) 1 - x - (D) None of these
(C) 0.0125 (D) 0.0625 2

Chapter 06.indd 140 5/31/2017 11:00:04 AM


Chapter 6 ■ Numerical Methods | 2.141

38. If y0 = 1, f (x0, y0) = 1.2, f (x1, y1­(0)) = 1.9312, h = 0.3, by 42. For the above problem find y(0.8) using Milne’s correc-
modified Euler’s formula y1 = (1) tor formula.
(A) 1.4696 (B) 1.2015 (A) 0.3046 (B) 0.4036
(C) 1.325 (D) 1.525 (C) 0.436 (D) None of these
39. Using Euler’s modified method, find a solution of the
dy Direction for questions 43 and 44:
equation = x + y with y(0) = 1 at y(0.2).
dx 43. Find using the Adams–Bashforth corrector formula y
(A) 1.3902 (B) 1.2309 dy 1
(0.4), for the differential equation = xy , given
(C) 1.3092 (D) None of these dx 2
dy y(0.1) = 1.01, y(0.2) = 1.022, y (0.3) = 1.023, y01 = 0, y11
40. Find k1, by Runge–Kutta method of fourth order if
dx = 0.0505, y21 = 0.1022, y31 = 0.1535.
= 2x + 3y2 and y(0.1) = 1.1165, h = 0.1.
(A) 0.3993 (B) 0.9393 (A) 1.5418 (B) 1.0410
(C) 0.3939 (D) None of these (C) 1.4100 (D) None of these
44. For the above differential equation find y(0.5) using
Direction for questions 41 and 42: Adams–Bashforth predictor formula.
dy (A) 1.00463 (B) 1.06463
41. Find y(0.8) by Milne’s predictor formula, given =
dx (C) 1.00599 (D) None of these
x - y2, y2 = 0.0795, y (0.6) = 0.1762, y0 = 0.0000, y11 =
0.1996, y21 = 0.3937, y31 = 0.5689, h = 0.2 45. The Runge–Kutta methods has the error of order _____.
(A) 0.9304 (B) 0.4930 (A) 1 (B) 3
(C) 0.3049 (D) None of these (C) 5 (D) 2

Previous Years’ Questions


1. Given that one root of the equation x3 - 10x2 + 31x - The value of the integral of the function between the
30 = 0, is 5 the other two roots are [GATE, 2007] limits 0 to 1 using Simpon’s rule is [GATE, 2010]
(A) 2 and 3 (B) 2 and 4 (A) 0.7854 (B) 2.3562
(C) 3 and 4 (D) -2 and -3 (C) 3.1416 (D) 7.5000
2. The following equation needs to be numerically
5. The square root of a number N is to be obtained by
solved using the Newton–Raphson method x3 + 4x -
applying the Newton–Raphson iterations to the equa-
9=0
tion x2 - N = 0. If i denotes the iteration index, the
The iterative equation for this purpose is (k indicates correct iterative scheme will be [GATE, 2011]
the iteration level) [GATE, 2007]
1 N
2 xk3 + 9 3 xk2 + 4 (A) xi +1 =  xi + 
(A) xk + 1 = (B) xk + 1 = 2 xi 
3 xk2 + 4 2 xk2 + 9
1 2 N 
4x2 + 3 (B) xi +1 =  xi + 2 
(C) xk + 1 = xk - 3 xk2 +4 (D) xk + 1 = k2 2 xi 
9 xk + 2
1 N2 
3. Three values of x and y are to be fitted in a straight (C) xi +1 =  xi + 
line in the form y = a + bx by the method of least 2 xi 
squares. Given : Sx = 6, Sy = 21, Sx2 = 14, and Sxy = 1 N
46 the values of a and b are respectively. (D) xi +1 =  xi − 
2 xi 
 [GATE, 2008]
(A) 2 and 3 (B) 1 and 2 6. Find the magnitude of the error (correct to two deci-
(C) 2 and 1 (D) 3 and 2 mal places) in the estimation of following integral
4. The table below gives values of a function F(x) 1
using Simpson’s rule. (Take the step length as 1)
obtained for values of x at intervals of 0.25. 3
X 0 0.25 0.5 0.75 1.0 4
 [GATE, 2013]
F(x) 1 0.9412 0.8 0.64 0.50 ∫ ( x 4 + 10)dx
0

telegram- Hmara college

Chapter 06.indd 141 5/31/2017 11:00:07 AM


2.142 | Part II ■ Engineering Mathematics

7. In Newton–Raphson iterative method, the initial 9. For step-size, Dx = 0.4, the value of following integral
guess value (xinj) is considered as zero while finding 1
using Simpson’s rule is ________.
the roots of the equation: f (x) = -2 + 6x - 4x2 + 0.5x3. 3
The correction, Dx, to be added to xinj in the first itera- 0.8
tion is ______. [GATE, 2015] ∫ (0.2 + 25 x − 200 x 2 + 675 x3 − 900 x 4 + 400 x5 )dx
8. The quadratic equation x - 4x + 4 = 0 is to be solved
2 0

numerically, starting with the initial guess x0 = 3. The  [GATE, 2015]


Newton–Raphson method is applied once to get a 10. Newton–Raphson method is to be used to find root of
new estimate and then the Secant method is applied equation 3x - ex + sin x = 0. If the initial trial value for
once using the initial guess and this new estimate. The the root is taken as 0.333, the next approximation for
estimated value of the root after the application of the the root would be ______. (note: answer up to three
Secant method is ______. [GATE, 2015] decimal) [GATE, 2016]

Answer Keys
Exercises
1. D 2. B 3. D 4. A 5. B 6. D 7. A 8. C 9. B 10. D
11. B 12. B 13. C 14. A 15. C 16. B 17. B 18. A 19. C 20. A
21. A 22. C 23. B 24. A 25. D 26. B 27. A 28. D 29. D 30. A
31. D 32. B 33. C 34. B 35. C 36. D 37. A 38. A 39. B 40. C
41. C 42. A 43. B 44. B 45. C

Previous Years’ Questions


1. A 2. A 3. D 4. A 5. A 6. 0.52 to 0.55 7. 0.3 to 0.4
8. 2.32 to 2.34 9. 1.36 to 1.37 10. 0.360

telegram- Hmara college

@getstudyfeverbot

Chapter 06.indd 142 5/31/2017 11:00:07 AM

You might also like