Professional Documents
Culture Documents
com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
UNIT – I
PART – A
(i) If f(a) and f(b) have opposite signs then one root of f(x) = 0 lies between a and b.
(ii) Every equation of an odd degree has at least one real root whose sign is opposite to that of
its last term.
(iii) Every equation of an even degree with last term negative has at least a pair of real roots one
positive and other negative.
2. Write the formula for false position (or) Regula falsi method.
a f(b) bf(a)
x
f(b) f(a)
Let x0, x1… Xn…. Be a sequence which converge to a number, and set en = - xn. If there
en1
exists a number p and a constant C 0 such that lim C , then P is called the order of
n en p
convergence and C is known as the asymptotic error constant of the sequence.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Where
a11 a12 a13 ... a1n x1 b1
A a21 a22 a23 ... a2 n , X x2 , B b2
a ... amn x b
m1 a m2 am 3 n n
2x1 + 3x2 – x3 = 5
- 2x2 – x3 = -7
-5x3 = -15, find x1,x2 ,x3 ?
solution:
b3
From the last equation x 3
a33
15
3
5
from the sec ond equation
b2 a23 x 3 7 3
x2 2
a22 2
Hence the first equation
b1 a12 x 2 5 3.2 3
x1 1
a11 2
Let A be any square matrix of order n. Then for any Scalar we can form the matrix A - I.
where I is the nth order unit matrix. The determinant of the matrix equal to zero is called
characteristic equation. This polynomial of degree n in x having n root for say 1 2 …. n These
values are called eigen values of the given matrix A.
First find out eigen values. For these eigen values, the system of equation (A - I) X = 0 has
x1
x
a non – trivial solution for the vector X 2 is called eigen vector of the corresponding eigen
.
xn
values.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Method of iteration will be useful if the coefficient matrix of the given system of equation is
diagonally dominant.
In Gauss seidal method the latest values of unknowns at each stage of iteration are used in
proceeding to the next stage of iteration. Hence the convergence in Gauss – seidal method is more
rapid than Gauss – Jacobi method.
(i) Find two number a and b such that f(a) and f(b) are of different signs. Then the root lies
between a and b.
(ii) The first approximation to the root is given by
af(b) bf(a)
x1
ba
(iii) If f(x1) and f(a) are of opposite signs, then the actual root lies between x 1 and a. Now
replacing b by x1 and keeping a as it is we get the next closer approximation x 2 to the actual
root.
(iv) This procedure is repeated till the root is found to be desired degree of accuracy.
We start with the initial values y(0), z(0) for y and z get x(1) from x(1)
1
a1
d1 b1y (0) c1z(0)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
3
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Gauss seidal method to converge quickly if the co – efficient matrix must be diagonally
dominates.
15. Derive Newton’s algorithm for finding the Pth root of a Number N.
Solution:
The Pth root of the a positive number N is the root of the equation.
xp N 0
f(x) x p N
f 1(x) px p 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
4
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
By Newton' salgorithm
f(x)
xk 1
f '(x)
xP N
xk k p 1 1
Px k
Px p xPk N
k
Px kp 1
(p 1)xPk N
Px pk 1
16. Derive Newton Raphson formula to find the cube root of a positive number k.
Solution:
x 3k
f(x) x 3 k 0
f 1(x) 3x 2
xn3 k
xn1 xn
3xn2
1 k
2xn 2
3 xn
Solution:
f(x) x 3 2x 5 0
f( 1) 1 2 5 ve
f( 2) 8 4 5 ve 1
f( 3) 27 6 5 ve
Root lies between -2 & -3 and closer than to - 2 since
f( 2) f( 3)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
5
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
In this method the given system is transformed into an equivalent system with upper –
triangular co efficient matrix i.e. a matrix in which all elements below the diagonal elements are
zero which can be solved by back substitution.
In this method, the co efficient matrix is reduced to a diagonal matrix (or even a unit
matrix) rather than a triangular matrix as in the Gausian method. Here the elimination of the
unknowns is done not only in the equations below, but also in the equations above the leading
diagonal. Here we get the solutions without using the back substitutions method.
20. Show that Newtons – Raphson – formula to find a or N can be expressed in the form xn+1
1 a
= xn n = 0, 1, 2, …..
2 xn
Solution:
Let
2
x a, x a 0
2
f(x) x a
1
f (x) 2x
f ( xn )
x n 1 x n
1
f ( xn )
2
xn a
xn
2 xn
2
xn a a 1
xn 2
2 xn xn
Solution:
Let x = 12
x2= 12 x2 – 12 = 0
f(x) = x2 – 12
f(3) = -ve,
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
6
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
f(4) = +ve
take x0 = 3
f(x 0 ) f(3)
x1 x 0 1
3 1 3.5
f (x 0 ) f (3)
f(x1 ) (3.5)2 12
x 2 x1 3.5 3.464
f 1(x1 ) 2(3.5)
The root is 3.464
22. Establish an iteration formula to find the reciprocal of a positive number N by Newton
Raphson method.
Solution:
1
x
N
1 1
N N 0
x x
1
Let N 0
x
1
f(x) N
x
1
f 1(x)
x2
by Newton' s formula
f(x )
xn1 xn 1 n
f (x n )
1
N
x
xn1 xn n
1
x2
n
1
xn N x 2
xn
xn xn x 2nN
xn 2 N xn
23. Give the name of any two iteration methods in Numerical methods.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
7
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
1 1 2
A, B
2 3 5
1 1 2
R2 R2 2R1
0 1 1
x 1
y x 2 y 1
2
f(x).f 11(x) f 1(x)
Solution:
27. Can you find a real root of the equation cosx = 3x -1 correct to 3 decimal places by using
iteration method.
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
29. By applying Newton’s method twice, find the real root near 2 of the equation x4 – 12x + 7 = 0
Solution:
30. Find the approximately value of the root of equation x3 + x - 1 = 0 near x = 1, by the method of
false using the formula twice.
Solution:
f(x) x 3 x 1
f(0.5) 0.675, f(1) 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
9
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
(i) Gauss elimination method has only a finite number of computation, since it is a direct
method.
(ii) Gauss seidel iteration method convergers only when the system is diagonally
dominant.
(iii) Iteration method is a self-correcting method. Errors made at any step in the
computation are corrected in the subsequent iteration.
32. How to reduce the number of iterations while finding the root of an equation by regular
flair method.
The number of iterations to get a good approximation to the real root can be reduced, if we
start with a smaller interval for the root.
If x1 is the exact root and x0 is its approximate value of the equation f(x) =0. We know that
f (x )
x1 = x0 - 1 0
f ( x0 )
f (x )
If f1(x0) is small, the error 1 0 will be large and the computation of the root by this
f ( x0 )
method will be a slow process.
Hence the method should not be used in case where the graph of the functions when it
crosses the x axis is nearly horizontal.
Newton’s method is successfully used to improve the result obtained by other methods. It
is applicable to the solution of equations involving algebraical functions as well as transcendental
functions.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
10
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
a11 a12 ..... a1n b1
a21 a 22 .....a 2n b8
In an Augmented matrix .............
.............
a a .....a b
n1 n2 nn n
The elements a11, a22,…….ann which have been assumed to be non-zero are called pivot
elements.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
11
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
39. Distinguish between Direct and iterative methods of solving simultaneous equations.
Direct methods involve a certain amount of fixed computation and they are exact solutions.
Iterative or indirect methods are those in which the solution is got by successive
approximations. But the method of iteration is not applicable to all systems of equations.
40. What is the criterion for the convergence of Newton-Raphson method? (May/June 2007)
f xn
x n 1 x n x n ray
f ' xn
f x
Where x x
f ' x
f ' x f x f " x
2
ie) 1 1
f ' x
2
41. Write down the condition for the convergence of Gauss-seidal iteration scheme. (May/June
2007).
The method of iteration will converge if in each equation of the given system, the absolute
value of the largest coefficient is greater than the sum of the absolute values of all the remaining
coefficients.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
12
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
42. If f(x)=0 has root between x=a and r=b, then write the first approximate root by the method
of false position, (May/June 2006).
Solution:
af b bf a
x1
f b f a
43. State the following statement is ‘true or false’ and justify. “The convergence in the Gauss
seidal method is thrice as fast as in jacobi’s method”. (May/June 2006).
The rate of convergence in Gauss-seidal method is roughly two times that of Gauss –Jacobi
method.
As the current values of the unknowns at each stage of iteration are used in getting the
values of unknowns, the convergence in Gauss-seidal method is very fast when compared to
Gauss-Jacobi method.
In this method, the coefficient matrix A of the system AX=B in brought to a diagonal matrix
or unit matrix by making the matrix A not only upper triangular but also lower triangular by
making all elements above the leading diagonal of a also as Zeros.
45. What type of eigen value can be obtained using power method? (April/May 2004)
Power method is used to determined “dominant” (numerically largest) eigen value and the
corresponding eigen vector of a matrix.
1 2
46. Find the dominant eigen value of A by power method (Nov/Dec 2004).
3 4
1
Let x 0 be the initial eigenvector.
1
1 2 1 3 3 7 0.4286
x1 Ax 0 7
3 4 1 7 1 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
13
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
47. Why Gauss seidel iteration is a method of successive corrections? (Apr / May 2008).
We replace approximations by corresponding new ones as soon the latter have been
completed.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
14
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
PART – B
Solution:
2. If an approximate root of the equation x ( l- logx) = 0.5 lies between 0.1 and 0.2 find the value
of the root correct to three decimal places.
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
15
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
f(x 0 )
x1 x 0
f 1(x 0 )
0.2(1 log(0.2) 0.5
0.2
log(0.2)
0.02188
0.2 0.1864
1.6094
f(x1 )
x 2 x1
f 1(x1 )
0.1864(1 log(0.1864) 0.5
0.1864
log(0.1864)
0.0004666
0.1864 0.1866
1.6799
f(x 2 )
x 3 x1
f 1(x 2 )
0.1866(1 log (0.1866) 0.5
0.1866
log(0.1866)
0.1866
Solution:
Given f(x) = x3 – 2x – 5
f(2) = 8 – 4 -5 = -1
f(3) = 27 – 6 -5 = 16
Let us take a = 2, b = 3
=-0.4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
16
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
a f(b) b f(a)
x2
f(b) f(a)
2.058 16 3( 0.4)
16 ( 0.4)
2.081
f (2.081) (2.081)3 2 2.081 5
0.15
4. Find the approximate root of xex = 3 by Newton’s Raphson method correct to three decimal
places.
Solution:
f1(x) = xex + ex
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
17
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Here f(1) is –ve (Negative) and f(1.5) is +ve (positive). Therefore the root lies between 1 and
1.5. Since the magnitude of f(1) < f(1.5) we can take the initial approximate x0 = 1.
f(x1 )
x 2 x1
f 1(x1 )
0.0111
1.0518
5.8739
1.0499
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
18
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 1 1 1
3 2 3 6
2 5 4 5
From the first column with non – zero component select the component with the large
absolute value this component is called the pivot.
1 1 1 1
3 2 3 6
2 5 4 5
1 2 3 1 2
= 1 1 1 1
2 5 4 5
1 2 3 1 2
R2 R2 R1
0 1 3 0 1
0 R3 R3 2R1
11 3 2 1
Delete the first row and first column and perform turn the above procedure.
1 2 3 1 2
0 1 3 0 1 New pivot
0 11 3 2 1
1 2 3 1 2
0 11 3 2 1 R 2 R3
0 1 3 0 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
19
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 2 3 1 2
3
0 1 6 11 3 11 R 2 R 2
0 11
0 2 11 12 11
1
R3 R3 R2
11
1 2 3 1 2
0 1 6 11 3 11
2 11 12 11
0 0
1 2 3 1 2
0 1 6 11 3 11
6
0 0 1
x 3 6 x 2 6 11 x 3 3 11
x2 3
x1 2 3 x 2 x 3 2 x1 2
Solution:
10 1 1 12
Step 1 2 10 1 13
1 1 5 7
1 1
1 10 10
12 10
R
Step 2 2 10 1 13 R1 1
1 10
1 5 7
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
20
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 1
1 10 10
12 10
106 R2 R2 2R1
Step 3 0
49 4
5 5 10 R3 R3 R1
0 9 49 58
10
10 10
1 1
1 10 10
12 10
Step 4 0 1
4 53 49
R2 R2
49 49 5
0 9 49 58
10
10 10
1 0 0.0918 1.0918
4 53 R3 R3 9 10R 2
Step 5 0 1
49 49 R1 R1 1 10R 2
0 0 4.8265 4.8265
1 0 0.0918 1.0918
4 53
Step 6 0 1 R 2 R3 4.8265
49 49
0 0 1 1
1 0 0 1
R R2 0.0918R3
Step 7 0 1 0 1 2
0 0 1 1 R2 R2 4 49R3
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
21
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
First approximation =
1
x1 17 y0 2z0
20
1
y1 18 3x0 z0
20
1
z1 25 2x0 3y0
20
Second approximation
1
x2 17 y1 2z1
20
1
y2 18 3x1 z1
20
1
z2 25 2x1 3y1
20
Third approximation
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
22
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
x3 17 y 2 2z2
20
1
y3 18 3x 2 z2
20
1
z3 25 2x 2 3y 2
20
x 2 1.02, y 2 0.965, z 2 1.1515 we get
Fifth approximation
1
x5 17 y 4 2z 4
20
1
y5 18 3x 4 z 4
20
1
z5 25 2x 4 3y 4
20
x 4 1.009, y 4 1.0018, z 4 0.994 we get
x 5 1, y 5 1.0002, z5 0.9996
x 1, y 1, z 1
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
23
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
x1 12 x 2 x3
10
1
x2 13 2x1 x3
10
1
x3 14 2x1 2x 2
10
Put x 2 x 3 0 we get x1 1.2, i.e x1(1) 1.2
1 10.6
Put x 2
1
10
13 2.4 0
10
1.06
1
3
x(1)
10
14 2.4 2.12 0.948
1
x1(2) 12 1.06 0.948 0.992
10
x(2)
2
1
10
13 2 0.9992 0.948 1.00536
x(2)
3
1
10
14 2 0.9992 2 1.00536 0.999098
i x1(i) x (i)
2 x (i)
3
2 1 1
Let A 3 2 3
1 4 9
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
24
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Ax = I
2 1 1 1 0 0
Step 1 3 2 3 0 1 0
1 4 9 0 0 1
2 1 1 1 0 0 3
R2 R2 R1
1 3 3
Step 2 0 1 0
2
2 2 2 1
R3 R3 R1
7 17 1 2
0 0 1
2 2 2
2 1 1 1 0 0
1 3 3
Step 3 0 1 0 R3 R3 7R 2
2 2 2
0 0 2 10 7 1
2 0 0 6 5 1
1 17 3 1
Step 4 0 0 6 R1 R1 R3
2 4 4 2
0 0 2 10 7 1
2 0 0 6 5 1
1 17 3
Step 5 0 0 6 R1 R1 2R 2
2 4 4
0 0 2 10 7 1
5 1
1 0 0 3 2 2 R1 R 1
2
17
Step 6 0 1 0 12
3
R2 R2 x 2
2 2
R R3 Y2
0 0 1 5 7 1 3
2
2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
5 1
3 2 2
12 17 3
2 2
5 7 1
2
2
4 5
10. Using power method to find the dominanteigenvalues and eigen vector of A .
1 2
Solution:
1
Let the initial even vector x 0
1
1
4 5 1 9
Now x1 Ax 0 9 1 9x i
1 2 1 3
3
5 7
1 4
4 5 3 3
x 2 Ax i 1
1 2 1 2 1
3
3 3
2.333
0.333
1
2.333 0.333
2.333
2.333 x12
4 5 1 3.285
x 3 Ax12
1 2 0.143 0.314
1
3.285 0.714
3.285
3.285 x13
4 5 1 2.915
x 4 Ax13
1 2 0.217 0.566
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
26
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
2.915
0.194
2.915 x14
4 5 1 3.030
x 5 Ax14
1 2 0.194 0.612
1
3.03
0.202
3.03 x15
4 5 1 2.99
x 6 Ax15
1 2 0.202 0.596
1
2.99
0.199
2.99 x16
4 5 1 3.005
x 7 Ax16
1 2 0.199 0.602
1
3.005
0.200
3.005 U
1
U
0.200
3 1
1.6 0.21
1 3
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
27
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
11. Using Newton raphson method to find correct to four decimals the root between 0 and 1 of
the equation x3 – 6x + 4 = 0.
Solution:
Given f (x) = x3 – 6x + 4
f (0) = 4, f (1) = -1
f (0) f (1) = 4 (-1) < 0
the root of f (x) = 0 lies between 0 and 1 the value of the root is near to 1. Let x 0 = 0.7 an
approximate
f(x) x 3 6x 4, f 1(x) 3x 2 6
f(0) x 30 6x 0 4, f 1(x 0 ) 3x 02 6
f(0 7) 0.7 6 0.7 4 0.143
3
f(x)
x1 x 0
f x0
1
0.7316
f x1 0.0019805
f 1 x1 3 0.7316 6 4.394
2
f(x1 )
x 2 x1
f 1 x2
0.0019805
0.7316
4.39428
0.73250699
0.7321
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
28
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
12. Find, by power method, the largest eigen value and the eigen vector of the matrix
25 1 2
1 3 0 May / June' 07 , Apr / May 2008 .
2 0 4
1
Let x 0 0 be an arbitrary initial eigen vector.
0
25 1 2 1 25 1
x1 A x0 1 3 0 0 1 25 0.04
2 0 40 2 0.08
25 1 2 1 25.2 1
x 2 Ax1 1 3 0 0.04 1.12 25.2 0.0444
2 0 4 0.08 1.68 0.0667
25 1 2 1 25.1778 1
x 3 Ax 2 1 3 0 0.0444 1.1332 25.1778 0.0450
2 0 4 0.0667 1.7337 0.0688
25 1 2 1 25.1826 1
x 4 Ax 3 1 3 0 0.0450 1.135 25.1826 0.0451
2 0 4 0.0688 1.7248 0.0685
25 1 2 1 25.1826 1
x 5 Ax 4 1 3 0 0.0451 1.135 25.1826 0.0451
2 0 4 0.0685 1.7248 0.0685
1 = 25.1821 and the corresponding
1
eigen vector in 0.0451
0.0685
13. Solve for a positive root of x-cosx=0 by regula Falsi method. (Apr/May 2008).
Solution:
Let f(x) = x-cosx
f 10 1 ve, f 1 1 cos1 0.459698 ve
a root lies between 0 and 1
0xf 1 1f 0 1
x1
f 1 f 0 1.459688
0.685078
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
29
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0.685078f 1 1 f 0.685078
x2
f 1 f 0.685078
0.404221
0.736299
0.548990
f x 2 0.736299 cos 0.736299
0.004660
X4 = 0.739079
14. Find the root between 1 and 2 of 2x 3 3x 6 0 by Newton-Rapson method correct to five
decimal places. (Apr/May 2008).
Solution:
Let f x 2x 3 3x 6
f ' x 6x 2 3
f 1 7 ve
f 2 4 ve
a root lies between 1 and 2.
Take x0 = 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
30
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
f x0
x1 x 0 1.809524
f ' x0
f x1
x 2 x1
f ' x1
f 1.809524
1.809524
f ' 1.809524
1.784200
f 1.784200
x 3 1.784200
f ' 1.784200
x 3 1.783769
x 4 1.783769
15. Find the sixth term of the sequence 8, 12, 19, 29, 42 (Apr/May 2008).
Solution:
x y y 2y 3y
0 8
1 12 4 3
2 19 7 3 0
3 29 10 3 0
4 42 13
5
6th term = y 5 E 5 y 0 1 y 0
y 0 5y 0 10 2 y 0 10 3 y 0 .......
8 5 4 10 3 10 0 ........
58
16. From the following table of half-yearly premium for policies maturing at different ages.
Estimate the premium for polices maturing at age 46 and 63.
Age x: 45 50 55 60 65
Premium y: 114.84 96.16 83.32 74.48 68.48
Apr/May 2008.
Solution:
To find y(46), we use forward interpolation formula, which to get y(63), we use Newtons
backward difference interpolation formula.
The values of x are equally spaced h = 5
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
31
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
x y y 2y 3y 4y
45 114.84
50 96.16 -18.68
55 83.32 -12.84 5.84
60 74.48 -8.84 4.00 -1.84 0.68
65 68.48 -6.00 2.84 -1.16
x x 0 46 45 1
u
h 5 5
u u 1 2 u u 1 u 2 3
y 46 y 0 uy 0 y0 y 0 ...
2 6
1 4 1 4 9 1 4 9 14
1
5 5 5 5 5 5 5 5 5
114.84 18.68 5.84 1.84 0.68
5 2 6 24
y 46 110.52568
x x n 63 65 2
v
h 5 5
v v 1 2
y 63 y x vy x y x ...
2
2 3 2 3 8 2 3 8 13
2
5 5 5 5 5 5 5 5 5
68.48 6.0 2.48 1.16 0.68
5 2 6 24
70.585152
17. From the divided difference table for the following data:
x -2 0 3 5 7 8
Y=f(x) -792 108 -72 48 -144 -252
x y y 2y 3y 4y
-2
0 108
3 -72 -60
5 48 60 24 18 -3
7 -144 -96 -39 -9 2
8 -252 -108 -4 7
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
32
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
UNIT – II
PART – A
Let y = f(x) be any function given by the values y0, y1, ……yn. Which it takes for the
equidistant values x0, x1, ……xn of the independent variable x then y1 - y0, y2 – y1, …….yn – yn-1 are
called the first differences of the function y. Denoted by y0, y1, …..
Proof:
3. Find log x.
Solution:
4. Find tan-1 x
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
33
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Let y = f(x) be function of x and x, x+h1 x + 2h … etc. be the consecutive values of x, then the
operator E is defined as E[f(x)] = f(x+h) E is called Shift Operator.
Proof:
From the let
y1 = Ey0 = (1 + ) y0
= y0 + y0
y2 = E y0 = (1 + ) y0
2 2
= (1 + 2c1 + 2) y0
= y0 + 2c1 y0 + 2y0
Similarly yn = Eny0 = (1 + )n y0
= (1 + nc1 + …….n) y0
= y0 + nc1 y0 + …..ny0
Hence proved.
7. Prove that E E
Proof:-
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
34
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
9. Write the formula for Newton forward and Newton Backward differences.
Solution:-
Solution:
1 5 0 3 4( E)
1
0 1 4 4
1 4 4 1 (D)
2
0 2 4
1 2 8 ( C)
3
0 3
1(=A) 1(=B)
f(x) = x(4) + x(3) – 8x(2) – x(1) + 4.
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
35
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
3 yx = Constant and
4 yx = 0
in particular
4y1 = 0 (E – 1)4 y1 = 0
(E4 – 4E3 + 6E2 – 4E + 1) y1 = 0
y5 – 4y4 + 6y3 – 4y2 + 7 = 0
38 – 4y2 = 0
y2 = 9.5
Solution:-
Integrating we get
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
36
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:-
1 1 1
Now ( ) =
x x 1 x
1
x( x 1)
1 (1) 2
2( ) =
x x( x 1) ( x 2)
and so on
(1) n
n ( 1 ) =
x x( x 1)( x 2)....( x n)
2 3
15. Evaluate x
E
Solution:-
2 3 2 1
x ( E ) x
3
E
( E 1) 2 E 1 x3
( E 2 2 E 1) E 1 x 3
( E 2 E 1 ) x 3 Ex 3 2 x 3 E 1 x 3
( x h)3 2 x 3 ( x h)3
6 xh.
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
E 1
=
E
Solution:-
(1 + ) (1 - ) f(x) = E E-1 f(x)
= E f(x – h)
= f(x)
= 1f(x)
(1+ ) (1 - ) = 1
Proof:-
Proof:-
f(x) = f(x) – f(x – h)
E-1 [f(x)] = E [f(x + h) – f(x)]
-1
= f(x) – f(x – h)
= E-1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
38
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:-
0nr 0 n > r
n 0n n !
0r 1r 1
023 23 2.13 6
303 33 3.23 3.i 3 6
Solution:-
Solution:-
(i) yx = yx + h - yx
(ii) yx = yx – yx – h
(iii) yx = yx 1 h yx 1 h
2 2
(iv)
= Y2 y x 1 h y x 1
2 2
h
24. Write relation between the operator and E.
Solution:-
f(x) =
f x 1 h f ( x 1 h)
2 2
1 1
E 2
f ( x) E 2
f ( x)
E 1
2
E
1
2
f ( x)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
39
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 1
E 2
E 2
1
E 2
( E 1)
1
E 2
Solution:-
[f(x)] = 1 f ( x 1 h) f ( x 1 h)
2 2 2
1 E 2 E 2 f ( x)
1 1
2
1 12
E E 2
1
2
1 -1
26. Prove that E 2
= μ + 1 δ, E 2 = μ - 1 δ .
2 2
Solution:-
2 2
1 1
2
1
1
1 1 E 2 E 2 1 E 2 E 2
1 1
1 2E 2 E 2
2
2 2
1 1
2
1
1
1 1 E 2 E 2 1 E 2 E 2
1
E 2
2
27. Prove that Δ = 1 δ2 + δ 1+ δ
2 4
Proof :-
1 1 2
E
2 2
1 2
1 2
1 E
1
2
E 2
2 4 2 4
1 E E 4 E E 1 2
1 1 2 1 1
2
E 2 2
E 2
2 4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
40
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
E E
1 1 2
4
2 2
1 E E1 2 E 2 E
1 1
2
2
E 12 E12
E E 2 E E
1
1 1
1 2 2
2 2
E 1 = .
Proof:-
2 E
2 1 1 2
2 1 2
E 2
4
1 E E 1 2
1
4 1 2
1 E 2 E 2 4
1 2 4
4
2 1
2
Solution:-
( E 1) 2 E 1 1
2
E 2 .E
1 1
2
E 2 .E
1 1
2
E 1
2
E
1
2
E
1
2
E 1
2
E
1
2
E 1
2
E
1
2
E
1
2
E 1
2
E
1
2
E 1
2
E
1
2
E 1 2 E 1 2
( E 1) 2.
2
=2( E 1)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
41
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
(t x0 )(t x1 )....(t xn )
f (t ) f (t ) (t ) f ( x) ( x)
( x x0 )( x x1 )...( x xn )
The above function f(t) is continuous in [x0, xn].
31. The divided differences of the sum of two functions are equal to the sum of the
corresponding separate divided differences.
Proof:-
f ( x0 ) f ( x1 )
f ( x0 , x1 )
x0 x1
g ( x0 ) h( x0 ) g ( x1 ) h( x1 )
x0 x1
g ( x0 ) g ( x1 ) h( x0 ) h( x1 )
x0 x1 x0 x1
g ( x0 , x1 ) h( x0 , x1 )
Solution:-
Let Y = f(x) be a function which assumes the values f(x 0), f(x1) ….. f(xn) corresponding to the
values x: x1, x1 …..xn.
( x x1 )( x x2 )...( x xn )
Y f ( x) f ( x0 )
( x0 x1 )( x0 x2 )...( x0 xn )
( x x0 )( x x2 )...( x xn )
f ( x1 ) .........
( x1 x0 )( x1 x2 )...( x1 xn )
Proof:-
( y y1 )( y y2 )...( y yn )
x x0
( y0 y1 )( y0 y2 )...( y0 yn )
( y y0 )( y y2 )...( y yn )
x1 .........
( y1 y0 )( y1 y2 )...( y1 yn )
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
42
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
34. Find the missing yx values from the first differences provided.
yx 0 a b c d e
yx 0 1 2 4 7 11
Solution:-
By def:
a–0=1 a=1
b – a = 2, b – 1 = 2 b=3
c – b = 4, c – 3 = 4 c=7
d – c = 7, d – 7 = 7 d = 14
e – d = 11, e – 14 = 11 e = 25
Solution:-
(n (axn + bxn-1) = (n (axn) + (n (bxn-1)
= a n! + b(0)
= an!
Solution:-
f(x) = f (x + 1) – f (x)
= ( x + 1) + 2 (x + 1) + 2 – [x2 + 2x + 2]
2
x 2 2x 1 2 x 2 2 x 2 2x 2
2x 3
Solution:-
To find the unknown values of y for some x which lies at the end of the table of values, we
use Newton’s backward formula.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
43
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
38. Find the second degree polynomial fitting the following data.
x 1 2 4
y 4 5 13
Solution:-
x0 = 1, x1 = 2, x2 = 4, y0 = 4, y1 =5, y2 = 13
By Lagrange’s formula
( x x1 )( x x2 ) ( x x0 )( x x2 ) ( x x0 )( x x1 )
f ( x) y0 y1 y2
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x0 )
Δ 2 x Ee x
39. Prove that e . 2 x = e
x
E Δ e
Solution:-
1Ee x x h Ee
x
( E )e . x e
x
e e x
Ee x
e x .e h x e h Ee x
e
h xh
e x ex
Lagrange’s formula in simple and easy to remember its application is not speedy. It requires
close attention to sign and there is always a chance of committing some error due to a number of
positive and negative signs in the numerator and the denominator.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
44
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
3
1 1
41. Show that
bcd a abcd
Solution:
f b, c, d f a, b, c
f (a, b, c, d )
d a
1 1
1
= bcd abc
d-a abcd
1
42. If f x , find f(a,b) and f(a,b,c) by using divided differences.
x2
Solution:
1
f x ,
x2
f b f a 1b2 1a2 ab
f a, b 2 2
ba ba a b
f b,c f a, b
f a, b,c
c a
bc
f b,c 2 2
bc
bc ab
2 2 2 2 a 2 b2 b 2 c2
b c a b a b
f a, b,c bc
c a c a
c 2a c 2 b a 2 b a 2 c
a 2c 2 b2 c a
caa c 2 b a 2 b a 2c
a 2c 2 b2 c a
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
45
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
ca c b b c 2 a 2
a c b c a
2 2 2
ca c a b c a c a
c a a 2c 2 b2
ab bc ca
a 2 c 2 b2
43. Using Lagrange’s interpolation, find the poly normal through (0,0), (1,1) and (2,2).
Solution:
x x1 x x 2 .... x....x n
f x0
x x0 x x 2 ... x...x n f x ...
f x
x0 x1 x0 x 2 .... x0 x n x1 x0 x1 x 2 ... x1 x n n
x-x0 x x1 ... x x n 1 f x
x n x0 x n x1 ... x n x n 1 n
x 1 x 2 x 0 x 2 x 0 x 1
f x 0 1 2
1 2 1 1 x 0 2 1
x x 2 x x 1 x 2 2x x 2 x
x.
x : 2 3 5
44. Obtain the divided difference table for the following data (May/June’06).
y : 0 14 102
X Y y 2y
2 0
-14
3 14 102.00
88.00
5 102
Interpolation:
It is the process of estimating a value of the function for any intermediate value of the
variable by a procedure other than the law which is given by the function itself but rather with the
help of certain given values of the function corresponding to a number of variable values.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
46
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Extrapolation: It is the estimation for some such values which lie outside the the given
values.
46. Define forward, backward, central difference and divided difference. (Apr/May 2008).
Forward difference f x f x h f x
Backward difference f x f x f x h
Central difference f x f x h f x h
f x1 f x 0
Divided difference f x
x1 x 0
47. Evaluate 10 1 x 1 2x 1 3x ... 1 10x by taking x=1. (Apr / May 2008).
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
47
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
PART – B
1. A function f(x) is given by the following table. Find f(0.2) by a suitable formula.
x 0 1 2 3 4 5 6
F(x) 176 185 194 203 212 220 229
Solution:-
x y = f(x) 2 (3 (4 (5 (6
0 176 (y0
1 185 9 (2y0
2 194 9 0 (3 y0
3 203 9 0 0 4 y0
4 212 9 0 0 0 5 y0
5 220 8 -1 -1 -1 -1 6 y0
6 229 9 1 2 3 4 5
n(n 1)
f ( x0 nh) y0 ny0 y0 ........
2!
f (0.2) ?
x0 + nh = 0.2
0 + n = 0.2 n = 0.2
(0.2)(0.2 1)
f (0.2) 176 (0.2) 9 0
2
176 1.8
177.8
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
48
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
x 0 10 20 30 40
Sin x 0 0.17365 0.34202 0.5 0.64276
Solution:-
As we have to determine the value of y = sin x near the lower end, we apply Newton’s
backward interpolation formula.
n(n 1) 2
y ( x0 nh) y0 ny0 y0 ....
2!
y (38)
x0 nh 38 40 n(10) 38 n 0.2
(0.2) (0.2 1)
y (38) 0.64279 (0.2) (0.14279) (0.01519)
2!
(0.2) (0.21) (0.22)
(0.0048) neglible term
3!
0.64279 0.028558 0.0012152 0.0002304
0.61566
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
49
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:-
Given that
Ux = ax2 + bx + C
degree 2 in n
3un = 4 un = 0
Un = an2 + bn + C
= 2 an + a + b
2Un = [Un)
= 2a (n + 1) + a + b – 2an – a – b
= 2a
LHS :-
= (E – 2) n Un
= (E – 1 -1 )n un
= ( - 1)n Un E–1=
= (-1)n (1 - )n Un
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
50
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
n(n 1) 2
= (-1)n [Un – n Un + Un + ….]
2!
n2 n
= (-1)n an 2 bn C n(2an a b) 2a
2
= (-1)n (C – 2an)
= RHS.
4. In an examination the number of candidates who obtained marks between certain limits
were as follows:-
Marks 30 – 40 40 – 50 50 – 60 60 – 70 70 – 80
No. of
31 42 51 35 31
Students
Find the number at candidate whose scores lie between 45 and 50.
Solution:-
Upper limits 40 50 60 70 80
C.F . 31 73 124 159 190
x y
y 2y 3y 4y
Marks C.F.
40 31
50 73 42
60 124 51 9
70 159 35 -16 - 25
80 190 31 -4 12 37
x x0 45 40
U 0.5
h 10
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
51
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
U (U 1) 2 U (U 1) (U 2) 3
f ( x ) y U y y y
0 0 2! 0 3! 0
U (U 1) (U 2) (U 3) 4
y ......
4! 0
(0.5) (0.5) (0.5) (0.51) (0.5 2)
f (45) 31 (0.5) 42 (9) (25)
2! 6 = 47.8673 = 48 approximately.
(0.5) (0.5) (1.5) (2.5)
(37)
24
The number of students who obtained marks less than 45 = 48, and the number of students who
scored marks between 45 and 50 = 73 – 48 = 25.
5. Find the form of the function f(x) under suitable assumption from the following data.
X 0 1 2 5
f(x) 2 3 12 147
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
52
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
6. Using Lagrange’s interpolation formula, find the value of y corresponding to x = 10 from the
following table.
x 5 6 9 11
f(x) 12 13 14 16
Solution:-
We have x0 = 5, x1 = 6, x2 = 9, x3 = 11
Y0 = 12, y1 = 13, y2 = 14, y3 = 16
Using Lagrange’s interpolation formula, we have
( x x1 ) ( x x2 ) ( x x3 ) ( x x0 ) ( x x2 ) ( x x3 )
y f ( x) y0 y1
( x0 x1 ) ( x0 x2 ) ( x0 x3 ) ( x1 x0 ) ( x1 x2 ) ( x1 x3 )
( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
Substitute
(10 6) (10 9) (10 11) (10 5) (10 9) (10 11)
f (10) (12) (13)
(5 6) (5 9) (5 11) (6 5) (6 9) (6 11)
(10 5) (10 6) (10 11) (10 5) (10 6) (10 9)
14 16
(9 6) (9 6) (9 11) (11 5) (11 6) (11 9)
13 35 16 42
2
3 3 3 3
7. Find the value of x when y = 85, using Lagrange’s formula from the following table.
x 2 5 8 14
y 94.8 87.9 81.3 68.7
Solution:-
x0 = 2, x1 = 5, x2 = 8, x3 = 14
y0 = 94.8, y1 = 87.9, y2 = 81.3, y3 = 68.7
y = 85
( y y1 ) ( y y 2 ) ( y y3 ) ( y y 0 ) ( y y 2 ) ( y y3 )
x x0 x1
( y0 y1 ) ( y0 y 2 ) ( y0 y3 ) ( y1 y0 ) ( y1 y 2 ) ( y1 y3 )
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
53
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
( y y0 )( y y1 )( y y3 ) ( y y0 )( y y1 )( y y 2 )
x2 x3
( y 2 y0 )( y 2 y1 )( y 2 y3 ) ( y3 y0 )( y3 y1 )( y3 y 2 )
8. Find the first term of the series whose second and subsequent terms are 8, 3, 0, -1, 0 ……..
Solution:-
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
54
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
9. Find f(x) as a polynomial in x for the following data by Newton’s divided difference formula
X : -4 -1 0 2 5
F(x) : 1245 33 5 9 1335
Solution:
X F(x) f ( x) 2 f x 3 f x 4 f x
-4 1245
-404
-1 33 94
-28 -14
0 5 10 3
2 13
2 9 88
442
5 1335
10. The following table gives same relation between steam pressure and temperature. find the
pressure at temperature 372.10
Solution:
T P p 2 p 3 P 4 p
361 154.9
2.016666
367 167.0 0.0097147
2.18181818 0.000024
378 191.0 0.0103535 0.00000073
2.388889 0.000052
387 212.5 0.01203703
2.641667
399 244.2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
55
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
11. From the data given below, find the number of students whose weight is between 60 to 70
Solution:
x Y y 2 y 3 y 4 y
Weight No of
Students
Below 40 250
120
Below 60 370 -20
100 -10
Below 80 470 -30 20
70 10
Below 100 540 -20
50
Below 120 590
x x0 70 40
u 1.5
h 20
u u 1 2
y 70 y0 u y0 y0 .......
2!
1.51.5 0.5 0.5 0.5
=250+ 1.5 120 20 10
2 6
1.5 0.5 0.5 1.5
24
=424
Number of students whose weight is between
60 and 70
= y(70) – y(60) = 424 – 370 = 54
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
56
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
The concept of the sp line originated from the mechanical drafting tool called spline used
by designers for drawing smooth curves. It is a splender flexible bar made of wood or some other
elastic material this curves resemble cubic curves and hence the name cubic spline has been given
to the piecewise cubic interpolating polynornials. Cubic splines are popular because of their
ability to interpolate data with smooth curves.
we consider here the construction of cubic spline function which would interpolate the points (x 0,
f0) (x1, f1) ……(xn, fn). The cubic sp line s(x) consists of (n-1)3 corresponding to (n-1) sub intervals. If
we denote such cubic by si(x)
then s(x)= s;(x)
i = 1,2…….n
As pointed out earlier, there cubic must satisfied the following conditions
(i) S(x) must interpolate f at all points x0, x1, ……xn i.e. for each i, S(xi) = fi
(ii) The function values must be equal at all the interior knots i.e. Si(xi) = Si+1 (xi)
(iii) The first derivative at the interior knots must be equal.(i.e) si’(xi)
= Si+1’(xi)
(iv) The second derivatives at the
interior knots must be equal i.e. Si”(xi)=
Si+1”(xi)
(v) The second derivatives at the end joint are 2000. i.e. S”(x0) =S”(xn) = 0
A Cubic splines with zero second derivatives at the end joints are called the natural cubic splines.
Xi 4 9 16
Fi 2 3 4
Solution:
Here h1 = x1 – x0 = 9 – 4 = 5
h2 = x2 – x1 = 16 – 9 = 7
f0 = 2; f1 = 3, f2 =4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
57
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
ai 1 a
Si ( x) hi 2ui ui 3 i ui31 hi2ui 1
6hi 6hi
1
fi ui 1 fi 1ui (1)
hi
f fi fi f i 1
hi a i-1 2 hi hi 1 ai hi 1ai 1 6 i 1 (2)
hi 1 hi
.
put i = 1in (2)
f f f f
h1 a 0 2 h1 h2 a1 h2 a2 6 2 1 1 0 0
h2 h1
4 3 3 2
0 2 5 7 a1 0 6
7 5
1 1
24a1 = 6
7 5
a1 0.0142
Since n 3 there are two cubic splines namely,
S1 ( x), x 0 x x, and S2 x , x1 x x2 .
The target point x = 7 is in the dornain of S1(x) and therefore we need to use only S1(x) for
estimation put i=1 in (1)
a0 2 a 1
S1 x h1 a1 u13 1 u03 h12u0 f1u0 f 0u1
6 6h1 h1
u0 x x0 7 4 3; u1 x x1 7 9 2
0.0142 33 52 3 1 3 3 2 2
S1 x 0
6 5
5
S1 x 2.6229
X 1 2 3
Y -8 -1 18
Solution:
here x0=1, x1=2, x2 =3
t0=-8, t1=-1, t2= 18
h1=h2=1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
58
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
t t t t
W.K.T. h1a0 +2(h1+h2 )a1+h2 a2 = 6 2 1 1 0
h2 h1
4a1=6(12)
a1= 18
u0 = x - x0 = 0.5; u1=x –x1 = -0.5
a0 2 a 1
S ( x) h1 u1 u13 1 u03 h12 u1 t1u0 t0 u1
6h1 6h1 h1
18 1
S 1.5 0 0.5 12 0.5 1 0.5 8 0.5
3
6 1
S 1.5 5.625
S x
a0 2
6h1
h1 u1 u13 6ah1 u03 h12u1 h1 t1u0 t0u1
1 1
18
x 1 x 1 1 x 1 8 x 2
3
6
3 x 3 9 x 2 13 x 15
S11 ( x) 9 x 2 18 x 13
S11 1 4
15. From the following table, find the value of tan 45o 15, by Newton’s forward interpolation
formula. (May / June 2007]
x : 45 46 47 48 49 50
tan x :
1.00000 1.03553 1.07237 1.11061 1.15037 1.19175
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
n n 1 2
y x 0 nh y 0 ny 0 y 0 .....
2!
y 45 15' ?
i.e. x0 nh 4515'
45 n 1 4515'
n 4515 45
1
15' or
4
11
1 1
44
y 4515' 1.00000 0.03553 0.00131
4 2!
1 1 1
1 2
4 4 4
0.00009 .....
3!
1.00000 0.0088825 0.000122812 0.00000492
y 4515' 1.008764609.
Solution:
Here x0 3 x1 4.5 x2 7
f x 0 2.5 f x1 1.0 f x 2 2.5
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
60
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
In the same manner equation (1) can be applied to the second interior point to give
xi x " x x i 1 "
3
fj x fi xi 1 fi x1
6 x i x i 1 6 x i x i 1
f x i 1 x x i 1
i f " x i 1 x i x
x i x i 1 6
f xi x x i 1
i f " x i x x i 1 ..... 5
x i x i 1 6
x i 1 x x i' i=1,2,....n.
1.67909 3 2.5
f1 x x 3 4.5 x
6 4.5 3 4.5 3
1 1.67909 4.5 3
x 3
4.5 3 5
3
0.186566 x 3 1.66666 4.5 x
+0.246894 x-3
This equation is the cubic spline for the 1st interval. Similar substitutions can be made to
develop the equations for the second and third intervals.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
61
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
We get,
3 3
f2 x 0.111939 7 x 0.102205 x 4.5 0.299621 7 x
1.638783 x 4.5
3
f3 x 0.127757 9 x 1.761027 9 x 0.25 x 7 .
At x=5
3
f1 x 5 0.186566 5 3 1.66666 4.5 5 0.246894 5 3
1.152986.
3 3
f2 x 5 0.111939 7 5 0.102205 5 4.5 0.299621
7 5 1.638783 5 4.5 .
1.1028858.
3
f3 x 5 0.127757 9 5 1.761027 9 5 0.25 5 7
1.63234.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
62
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
UNIT – III
PART – A
Solution:
f 1 x 0 1 y 0 1 2 y 0 1 3 y 0 1 4 y 0 ........
h 2 3 4
f x 0 1 2 y 0 y 0 11 y 0 ..........
11 2 3 4
h 12
f 111 x 0 1 3 3 y 0 3 4 y 0 ............
h 2
f 1 x 0 1 y 0 1 2 y 0 1 4 y 0 ........
h 2 3
f 11 x 0 1 2 2 y 0 3 y 0 11 4 y 0 ..........
h 12
f 111 x 0 1 3 3 y 0 3 4 y 0 ............
h 2
Solution:
y y1 1
y1 x0 1 0
h
12
3y1 3y2 1 5y2 5y3 ....
60
2
y11 x0 1 2 2y1 1 4y2 .......
h 12
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
63
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
b
A f x dx Where a and b are given constants and f(x) is a function.
a
Solution:
x0 nh
y x dx h 2 y
x0
0 y n 2 y1 y 2 ....... y n1
Solution:
x0 nh
f x dx h 3 y
x0
0 y n 4 sum of odd ordinates
Solution:
x0 nh
f x dx 3h 8 y
x0
0 y n 3 y1 y 2 y 4 y 5 ......y n6
+2 y 3 y 6 .........y n3
Solution:
The total error
h3 11
E y1 y11
2 .......... y n
11
12
nh3 11
E< y
12
Error in the trapezoidal rule is of the order h2.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
64
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
The error in the interval (r1, r3)
4 5
h5 y1iv
15 18
24 25 5 iv
h y
90
h5 iv
y1
90
nh5 iv
The total error: y
90
Error in the Simpson 1/3 rule is of the order h4.
Solution
I=I2
I2 I1
3
I1 dividing h into two parts h 2
I2 dividing h into four parts
I3 dividing h into eight parts
Solution:
b a b a a b
1
2 1 2 2
f z dz
1 1
1
f x dx f
-1
f
3
3
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
65
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
b 1
ba ba
x t
2 2
1
Then f t dt 0.5555 f 0.77459 f 0.77459 0.8888 f 0
1
Solution:
Let the given double integral be of the form
b d
I f x,y dxdy
a c
I
hK
[sum of values of f at the four corners +2 (sum of the values f at the remaining nodes on the
4
boundary) +4 (sum of the values of f at the interior nodes)]
5.2
15. Compute the value of the definite integral logxdx using trapezoidal rule?
4
Solution:
5.2 4
h 0.2
6
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
66
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
b
h
f x dx 2 y
a
0 y n 2 y1 y 2 .........y n1
52
h
log x dx = 2 y
4
0 y 6 2 y1 y 2 y 3 y 4 y 5
0.2
= 1.386294 1.6486 2 1.435084
2
+1.481604 1.526056 1.568615 1.609237
= 0.1 3.034952 15.241562
=1.876544
2 2
dxdy
16. Evaluate the integral I = using Trapezoidal rule with h =0.5.
1 1
x+y
Solution:
Using Trapezoidal rule
2 2
dxdy
I
1 1
xy
1
f 1,1 f 2,1 f 1,2 f 2,2
16
+ f 3 ,1 f 1, 3 f 2, 3 f 3 ,2 4f 3 , 3
2 2 2 2 2 2
1 0.5 1 1 0.25 2 0.4 0.4 2 2 4
16 3 3 7 7 3
0.323304
2
dx
17. Evaluate
1
x
using Gaussian 2 point formula.
Solution:
Transform the variable x to t by the transformation
ab ba
x t
2 2
1+2 2 1
= t
2 2
=3 t
2 2
dx dt
2
2 1 1
dx 2 dt dt
I
1
x 1 3 t 2 1 3 t
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
67
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Here
1 1
f 0.2795
3 3 1
3
f 1
1
0.41288
3
3 1
3
I f 1 f 1
2 3
=0.6923
2
dx
18. Evaluate 1
x
using Gaussian 3 – point formula.
Solution:
Transform the variable from x to t by the transformation.
ba ba
x t
2 2
3 t
2 2
dt
dx
2
3t
1
dt
x
2 1
3t
2 1
dx
I f t dt A1f x1 A 2 f t 2 A 3 f A 3
1
x 1
A1 A 2 0.555
A 3 0.888
1
f t1 f 0.7745 0.4493
3 0.7745
f t2 f 0 1
3
1
f t3 0.2649
3 0.7745
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
68
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
When the function is given in the form of table of values instead of giving analytical
expression we use numerical differentiation.
Since the end point ordinates y0 and yn are included in the Simpson’s 1/3 rule it is called
closed formula.
Two
Solution:
2n 1 2 3n2 6n 2 3
f x
1 1 y y0 y 0 ......
h 0 2 6
4
24. Using Simpson rule find e x dx given that e0 = 1, e1 = 2.72, e2= 7.39, e3=20.09, e4 = 54.6.
0
Solution:
By Simpson rule we have
4
h
e dx u y y 4 2y 2 4 y1 y 3
x
0
0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
69
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
xn
Trapezoidal rule
xn
f x dx 12 h y
xo
0 y n 2 y1 .....y n1
dy
26. Write the formula for at x = x 0 using forward difference operator.
dx
dy 1
dx y 0 1 2 y 0 1 3 y 0 ........
x x0 h 2 3
The Simpson’s rule will give exact result when we are decreasing the interval h.
b a 2 11
E
12
h y x
29. Explain the terms Round off error.
The round – off error is quantity R(say) which must be added to a finite representation of a
computed number in order to make it the exact representation of that number.
The Truncation error is the quantity T which must be added to the true representation of
the computed quantity in order that the result be exactly equal to the quantity we are seeking to
generate
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
70
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
X 3 5 7 9
Y 6 24 58 108
Solution:
X Y y 2y 3y
3 6
18
5 24 16
34 0
3 58 16
50
9 108
x 0 nx x
x3
3 n2 x; 2n x 3; n
2
n n 1 2
y x 0 nx y 0 ny 0 y 0 .....
2!
x 3 x 3
2 2 1
x3 16
y x 6 18
2 2
y x 2x 2 3x 9
X 0 1 2 4
Y 443 384 397 467
Solution:
X Y y
0 443
-59
1 384
13
2 397
30
4 167
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
71
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Constant
35. What is the order of error in the Simpson’s formula is the order?
Three
1
dx
36. by evaluating 1+ x
0
2
by a numerical iteration method, Find this value?
Solution:
1
dx
tan1 x
1
1 x
0
2 0
A difference quotient is the quotient obtained by dividing the difference between two
values of a function, by the difference between the two corresponding values of the independent
variable.
1
x2
38. Find the value of log 2 1/3 from 0 1+ x3 dx using Simpson’s 1/3 rule with h = 0.25.
Solution:
Given h = 0.25
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
72
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
We know that
1
x2
1
1 log 1 x 3
0 1 x 3
dx
3 0
= 1 loge 2
3
1
1 x2
log 2 3
dx 0.231083
0
1 x3
a nh n n 2 n 3 2 n n 2 2 3
f x dx nh 1 ........
a 2 12 24
Simpson’s rule will give exact result, If the entire curve y=f(x) is itself a parabola
d b
I f x, y dx dy
c a
hk
Sum of the values of f at the four corners
9
2( Sum of the values of f at the odd positions on the boundary
except the corners)
4 Sum of the values of f at the even positions on the boundary
{4 Sum of the values of f at the odd positions
8( Sum of the values of f at the even positions)
on the odd row of the matrix except boundary rows}
+8{ Sum of th values of f at the odd positions
16 Sum of the values of f at the even positiions
on the even rows of the matrix}]
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
73
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy
42. Find at x=1 from the following table.
dx
x: 1 2 3 4
y: 1 8 27 64
Solution:
x y 2 3
1 1
2 8 7
3 27 19 12 6
4 64 37 18
dy 2 3
1 y 0 y0 y 0 ... 1
dx x x0x 2 3
Here h=1 x0 1 y 0 7 3 y 0 12 3 y0 6
dy 1 12 6
1 7
dx x 1 1 2 3
3
Solution:
For x=0, 0.5, 1 The values of f(x)=ax are respectively a 0 .a 0.5 ,a1 u 1, a ,a
x y 2
0 1
0.5 a a 1 a a a 1
1 A a a
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
74
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy 1 2 3
y 0 y 0 y 0 ...
dx x x0 n 2 3
Here h=5 x0 0 y 0 a 1 2 y 0 a 2 a 3 y0 0
1 1
f ' 0
5
a1
2
a 2 a 1
4 a a 3
44. How the accuracy can be increased in trapezoidal rule of evaluating a given definite
integral?
Solution:
If the number of points of the base segment b-a, is increased a better approximation to the
area given by the definite integral will be obtained.
6
45. Using trapezoidal rule find f x dx from the following set of values of x and f(x).
0
Solution:
x: 0 1 2 3 4 5 6
f(x): 1.56 3.64 4.62 5.12 7.08 9.22 10.44
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
75
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
Simpson’s one third rule approximate the area of two adjacent strips by the area under a
quadratic parabola.
47. from the following table find the area bounded by the curve and the x-axis from x=2 to x=7.
x: 2 3 4 5 6 7
f(x): 8 27 64 125 216 343
Solution:
Here h = 1
7
h
Area ydx y 0 y 5 2 y1 y 2 y 3 4
2
2
1
8 343 2 27 64 125 216
2
607.5 Sq units
1
dx
48. Apply Gauss two point formula to evaluate 1 x
0
2
.
Solution:
Given interval is 0 to 1 to make them as-1 to 1
1 1
dx 1 dx
a 1 x2 2 a 1 x2
1
1.5
2
0.75.
49. If the range is not (-1, 1) then what is the idea to solve the Gaussian quadrature formula.
Solution:
ba ba
x z
2 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
76
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
b d
50. State trapezoidal rule for evaluating f x, y dxdy.
a c
Solution:
hk
I Sum of values of f at the four corners
4
PART – B
1. Find the first second and 3rd derivatives of the function tabulated below at the point x=1.5?
Solution:
The table of difference is as follows:
X F(x) y 2y 3y 4y
1.5 3.375
3.625
2.0 7.0 3.0
6.625 0.75
2.5 13.625 3.25 0
10.375 0.75
3.0 24.0 4.50 0
14.875 0.75
3.5 38.875 5.25
20.125
4.0 59.0
Here we have to find the derivatives at the point x = 1.5 which is the starting value of the table.
Therefore newton’s forward differences formula for derivatives at x = x 0, we have
f 1 x 0 1 y 0 1 2 y 0 1 3 y 0 .......
h 2 3
f0 1.5, h = 0.5
f 1 1.5 1 3.625 1 3 1 0.75
0.5 2 3
=4.75
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
77
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
f 11 x 0 1 2 2 y 0 3 y 0 11 4 y 0 .......
h 12
1
2
= 3.0 0.75
0.5
=9.0
f 111 x 0 1 3 3 y 0 3 4 y 0
h 2
1
3
= 0.75
0.5
=6.0
Solution:
We know that
2 3 2
4
1
y x 0 nh 1 y 0
h
2n 1 2
y0
3r 6r 2 3
y0
2r 9r 11r 3
y0
2 6 12
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
78
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
y 1961 ?
x0 nh 1961
10 2 6
y1 1961 1 29.1 1 5.4 1 0.8 1 4.9
12
= 1 29.1 2.7 0.1334 0.4083
10
=2.6775
= 1 4 0.7899 0.7943 0.7884
3
we get
I h1, h , h I 0.6,0.3,0.15
2 4
= 1 4 I 0.15 0.3 I0.3, 0.6
3
= 1 4 0.7884 0.7886
3
=0.7883
0.8113
0.7886
0.7948 0.7883
0.7884
0.7899
2
dx
I 0.7883
0
1 x
12
dx
3. Using Romberg’s Method compute I = 1+ x correct to 4 decimal places.
0
Solution:
Here f(x) = 1
1 x
Take h = 0.6, 0.3, 0.15
H = 0.6, h/2=0.3, h/4=0.15
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
79
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0.6
I h I 0.6 I1 1 0.4545 2 0.6256
2
=0.8113
0.6
with h= 0.3
2
we get
2 I0.3 I
I h 2
0.3
= 1 0.4545 2 0.7692 0.625 0.5263
2
=0.7943
with
0.6
h 0.15we get
4
4 I0.15 I
I h 3
0.15
1 0.4545 0.8695 0.7692 0.6896
2
+ 0.6250+0.5714+0.5263+0.4878
=0.7899
Now,
I h, h
2 I0.6, 0.3
= I 4 I 0.3 I 0.6
3
= I 4 0.7943 0.8113
3
=0.7886
I h , h I0.3,0.15
2 4
= I 4 I 0.15 I 0.3
3
1
4. Evaluate e dx by dividing the range of initiation in to 4 equal parts using (i) Trapezoidal
-x 2
Solution:
1 0
Here the length of the interval is h = = 0.25. The values of the function y = e-x2 for each
u
point of sub divisions are given below.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
80
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0.25
= 1.3678 2 2.8761
2
= 0.125 5.943
=0.7428
5. The velocity v of a partial ad distances from a point on its path is given by the table.
F 0 10 20 30 40 50 60 Feet
V 47 58 64 65 61 52 38 Feet/fer
Estimate the time taken to travel 60feet by using Simpson’s one third value. Compare the
result with Simpson’s 3/8 rule.
Solution:
ds
V
dt
ds vdt
1
dt ds 1
v
Here we find to find the time taken to travel 60 feet. Therefore interstate (1) from 0 to 60
We get
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
81
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
60 60
1
dt v ds
0 0
60 60
1
t
0
v
ds ydx
0
X(5) 0 10 20 30 40 50 60
Y= 1 0.2127 0.017 0.0156 0.01538 0.0164 0.01923 0.0263
v
Y0 Y1 Y2 Y3 Y4 Y5 Y6
60
h
ydx 3 y
0
0 y 6 2 y 2 y 4 4 y1 y 3 y 5
10
= 0.02127 0.0263 2 0.01563 0.0164
3
+4 0.01724+0.01538+0.01923
10
0.04758 0.020740 0.06406
3
1.06 sec
60
ydx 3h 8 y
0
0 y 6 3 y1 y 2 y 4 y 5 2 y 3
3 10
0.02127 0.02630 3 0.01723 0.0156
8
+ 0.01640+0.01923 2 0.01538
3.75 0.04757 0.20547 0.03076
1.064 sec
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
82
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1.4
6. Evaluate sinx - ln x + e dx by Simpson’s 1/3 rule.
x
0.2
Solution:
Let us divide the interval at integration in to twelve equal parts by taking h = 0.1. Now the
table of values of the given function y = sinx – lnx + ex at each point of subdivision is as given
below.
Simpson’s rule
1.4
h
ydx 3 y
0.2
0 y12 2 y 2 y 4 y 6 y 8 y10
+4 y1 y 3 y 5 y 7 y 9 y11
0.1
= 7.73369 2 16.49077 4 20.20418
3
=4.05106
2
dx
7. Evaluate 1+ x
1
3
by Gauss 3 point formula:-
Solution:
ba ha
x t
2 2
3 t 3t
=
2 2 2
2 1
dx 1 dt
1 x 3
1
3
3t 2
1
1
2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
83
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
1
=4 dt
-1 8 3 t
3
1
dt
=4 A 1f t1 A 2f t 2 A 3f t 3
-1 8 3 t
3
where
1
f t
3 t
3
8
A1 A 2 0.55
A 3 0.888
1
f t1 f 0.7745 0.0525
3 0.7745
3
8
1
f t2 f 0 0.0285
35
1
f t 3 f 0.7745 0.0162
3 0.7745
3
8
I 4 0.5555 0.0525 0.555 0.0285 0.888 0.0162
=4 0.0292+0.0158+0.0144
=0.0594 4
=0.2376
8. Evaluate to integral
2 2
dxdy
I= Using the trapezoidal rule with h = k = 0.5 and h = k = 0.25
1 1
x+y
Solution:
When h = k = 0.5
X2 = 2 f21=0.285
f20=0.33 f22=0.25
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
84
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
hk
I f00 f02 f21 f22 2f01 f10 f21 4f11
u
1
= 0.5 0.33 0.25 0.33 20.4 0.4 0.285 0.285 40.33
16
=0.3418
When
X1=1.25
f(1.5,1) f(1.5,1.25) f(1.5,1.5) f(1.5,1.75) f(1.5,2)
X4=2.0
I
1
65
f 1,1 f 1,2 f 2,1 f 2,2 2f 1,1.25 f 1,1.5
+f 1,1.75 f 1.25,1 f 1.5,1 f 1.75,1 f 2,1.25
+f 2,1.5 f 2,1.75 f 1.25,2 f 1.5,2 f 1.75,2
4 f 1.25,1.25 f 1.25,1.5 f 1.25,1.25 f 1.5,1.25
+f 1.5,1.25 f 1.5,1.5 f 1.5,1.75
f 1.75,1.25 f 1.25,1.5 f 1.25,1.25
0.3401
Solution:
Taking h = 0.3 along x direction and k =0.2 along y direction we can construct the following table
where
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
85
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
f x,y
xy
0.2 0.3
I
4
0.1250 0.0961 0.1136 0.0874
+2 0.1190+0.1087+0.0916+0.0988 4 0.1035
0.0250
hk
I f00 f20 f22 4 f10 f01 f11 f21 16f11
9
0.2 0.3
9
0.1250 0.0961 0.1136 0.0874 4(0.1087
+0.1190+0.0916+0.988)+16 0.1035
=0.0250
10. If D, E, and be the operators with usual meaning and if hD = u where h13 the interval at
differencing. Prove that the following relations between the operator’s.
(i) E= eu
(ii) δ = 2sinh u
2
(iii) μ = cosh u 2
(iv) (E+1) =2(E-1)
Solution:
(i) E = ehD
=Eu (hD=u)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
86
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
(ii) 2 sin h u
2
eu 2 eu 2
2
2
1 1
Eu 2
Eu 2
by dt
(iii) cos u
2
1 E
2 u
2
E
u
2
E
1 1
u 2
Eu 2
2
1 1
E 2
E 2
2
E 1 E 1 E 1
2
E
1
2
=E
1
2
E 1
2
E
1
2
E 1
2
E
1
2
(iv)
E 12 E 12
= E-1 2
2
=2 E-1
X y x y 2y
12500 111.8034
0.0471
12510 111.8481 0
0.0447
12520 111.8928 0
0.0447
12530 111.9375
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
87
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
x x 0 12516 12510
u 1.6
h 10
u u 1
f x y 0 uy 0 2 y 0 .....
21
f 12516 111.8034 1.6 0.0447
=111.8034+0.07152
=111.87492
12516 111.87492
12. Use Newton’s forward interpolation and find value of sin 52 from the following data.
Estimate the error.
X 45 50 55 60
Y=sinx 0.7071 0.7660 0.8192 0.8660
Solution:
x x 0 52 45
u 1.4
h 5
Newton’s formula
u u 1 2 u u 1 u 2 3
y u0 uy 0 y0 y 0 .....
2! 3!
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
88
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
u u 1 u 2 .... u n
Error n1y 0
n 1!
using n = 2 we get
u u 1 u 2
3 y0
3!
1.4 1.4 11.4 2
0.0007 0.0000392
6
13. The following table gives the values of the probability integral
n
2
e dx corresponding to certain values of x. For what value of x is this integral
-x 2
y=
π 0
equation of to ½?
Solution:
x
y y1 y y2 y y3 x y y0 y y2 y y3 x
y0 y1 y0 y2 y0 y3 0 y1 y0 y1 y2 y1 y3 1
y y0 y y1 y y3 x y y0 y y1 y y2 x
y2 y0 y2 y1 y2 y3 2 y3 y0 y3 y1 y3 y2 3
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
89
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution: Since we require f1(3) and f11(3) we use Newtons forward formula.
Difference table:
3.0 -14
3.2 -10.032 3.968 0.7968
3.4 -5.296 4.736 0.304 -0.464 2.048 -5.12
3.6 -0.256 5.04 1.888 1.584 -3.072
3.8 6.672 6.928 0.4 -1.488
4 14 7.328
dy dy 1 1 2 1 3 1 4
y 0 y 0 y 0 y 0 ...
dx x x0 dx u 0 h 2 3 4
h=0.2
1 1 1 1 1
= 3.968 0.768 0.464 2.048 5.12
0.2 2 3 4 5
1
3.968 0.384 0.1547 0.512 1.024
0.2
9.4665
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
90
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy d2 y 1 2 y 3 y 1 11 4 y 5 5 y ...
2 2 u 0 0 0
dx x x0 dx x x0 h 12 6
1 11 1 5
0.768 0.464 2.048 2.048 5.12
0.2 12 4 6
1
0.768 0.464 1.8773 4.267
0.04
184.4075
x: -2 -1 0 1 2 3 4
y: 2 -0.25 0 -0.25 2 15.75 56
Solution:
u u 1 2 u u 1 u 2 3
y x y 0 uy 0 y0 y 0 ...
2! 3!
dy 1 2u 1 2 2
3u 6u 2 3
y 0 y0 y 0 ...
dx h 2! 3!
-2 2
-1 -0.25 -2.25
0 0 0.25 2.5
1 -0.25 -0.25 -0.5 -3 6 0
2 2 2.25 2.5 3 6 0
3 15.75 13.75 11.5 9 6
4 56 40.25 26.5 15
x-0
Choosing x 0 0 u= x
1
dy 1 2x 1 3x 2 6x 2 4x 3 18x 2 22x 6
0.25 2.5 9 .6
dx 1 2 6 24
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
91
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2x 1 3x 2 6x 2 4x 3 18x 2 22x 6
0.25 2.5
2 6 24
dy
x3 x
dx
dy
0 x3 x 0
dx
x x 2 1 0
x=0 x 2 1 0
x-1 x 1 0
x=1,-1
d2 y
2
3x 3 1
dx
d2 y
at x=0 2 1 ve
dx
d2 y
x1 3 1 2 ve
dx 2
d2 y
x 1 3 1 2 ve
dx 2
1 x x 1 2
y x y 0 xy 0 y 0 ...
h 2!
1
0 0 0
y 0
1
maximum value = 0
1
y t
1
y0 y0 0 0 ...
0 0.25
0.25
maximum at x 1y 1 0.25
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
92
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
16. Obtain the value of f1 (0.04) using Bessel’s formula given in the table below.
Solution:
Since x=0.04 is in the middle of the table we use central difference formula and in Bessel’s
formula.
x x 0 x 0.04
Since u
h .01
By Bessel’s formula.
1 1 u u 1 2
y x 0 uh y u y1 u y 0 y 1 2 y 0
2 2 4
1
u u u 1
2 u 1 u u 2 4
3 y 1 y 2 4 y 1
6 48
1 1 1 1
y 3 x0 0.0026 0 0.0001 0.0001 0.0001
0.01 4 12 24
1
24 0.0026 0.0006 0.0003
24
f 0.04 0.25625
1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
93
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2
17. Dividing the range into 10 equal parts. Find the value of sin xdx
0
by (i) Trapezoidal rule
Solution:
x 0 /20 2/20 4/20 5/20
y 0 1.564 0.3090 0.5878 0.7071
x 6/20 7/20 8/20 9/20 10/20
y 0.8090 0.8910 0.9511 0.9877 1
By Trapezoidal rule
/ 2
h
sin xdx 2 y
0
0 y11 2 y 0 y 2 ... y10
/2
h / 20
10
/ 2
0.9980
/ 2
h
sin x dx 3 y
0
0 y u 4 y1 y 3 y 5 y 7 y 9
2 y 2 y 4 y 6 y 8 y10
/ 20
= 0 1 4 3.1962 2 2.6569
3
1 12.7848 5.3138
60
19.0986
60
1.0000
3
dx
18. Evaluate x
0
2
4
using Romberg’s method. Hence obtain an approximate value for .
Solution:
2
1 dx
let y= 2
let 1 2
x 4 0
x 4
take h = 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
94
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
x 0 1 2
y 0.25 0.20 0.125
2
dx h
I1 2
y 0 y 2 2 y1
0
x 4 2
0.5 0.25 0.125 2 0.20
0.3875
Take h=0.5
x 0 0.5 1 1.5 2
y 0.25 0.2353 0.20 0.160 0.125
h
I2 y 0 y 4 2 y1 y 2 y 3
2
0.25 0.25 0.125 2 0.2353 0.2 0.16
0.3914
Take h = 0.25
By Trapezoidal rule
h
I3 y 0 y 8 2 y1 .... y 7
2
0.25
2
0.25 0.125 2 0.2462 0.2353 0.2192 0.20 0.1798 0.16 0.1416
0.3924
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
95
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
I I
I I 2 2 1
3
0.3914 0.3875
0.3914
3
0.3927 1
I I
I I 3 3 2
3
0.3914 0.3875
0.3924
3
0.3927 1
I I
I I 3 3 2
3
0.3924 3914
0.3924 2
3
0.3927
2
dx
I 2
0.3927 3
0
x 4
By actual Integration
2 2
dx dx
0 x2 4 0 x2 22
1 2
Tan 1 x / 2 0 4
2
/8
= 3.1416
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
96
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2
x 2 2x 1
19. Evaluate 0 1 x 14 dx by Gaussian three point formula.
Solution:
x 2 2x 1
let f x 4
1 x 1
b-a ba
let x z
2 2
20 20
Z
2 2
x z1 x 0 z 1
dx dz x 2 z 1
2
2
x 2 2x 1
1
z 1 2 z 1 1
0 1 x 1 dx 1 1 z 1 4
1
z 2 4z 4
= 4 dz 1
-1 z 2
z 2 4z 4
f z
z 2 4 1
2
z 2
f z
z 2 4 1
z2 4
f 0 4
z 1 17
2
3
2
3 4 1.50161 0.4614
f 4
5 3 3.2548
5 2 1
2
3
4 2
3
f 4
0.12774
5 3
5 2 1
5 3
1
3 8
1 f z dz f f f 0
1
9 5 5 9
5 8 4
0.4614 0.12774
9 9 17
0.5365
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
97
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2
x 2 2x 1
4 dx 0.5365.
0 1 x 1
1 2
2xy
20. Evaluate 1 x 1 y
0 1
2 3
dx xy by Trapezoidal rule with h=k=0.25.
Solution:
1 2
2xy
1 x 1 y dxdy
0 1
2 2
Trapezoidal Rule:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
98
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
UNIT – IV
PART – A
dy d 2 y dny
A most general from of an ordinary differential equation is given by Q (x, y, , ,.... n ) =
dx dx 2 dx
0 we know that the general solution of a differential equation of n order has n arbitrary
th
constants. If we give particular values to the constants, the solution is said to be a particular
solution.
A general solution of a differential equation of nth order has n arbitrary constants. It will be
of the form f(x,y,c1,c2,…cn) =0. if n conditions are given we can obtain the values of the constants
c1,c2,…cn. If all the n conditions are specified at the initial point only, then the problem is called an
initial value problem
A general solution of a differential equation of nth order has n arbitrary constants. It will be
of the form f(x1, y1, c1, c2, ….cn) = 0. If n conditions are given we can obtain the values of the
constants c1, c2….. cn If n conditions are specified at more than one point, then the problem is
called a boundary value problem
Single step method are those which utilize input information at a single point x i to predict the
value of the function yi+1 at xi+1
Taylor series makes use of a series of y in terms of the powers of x from which the values of y
can be obtained by direct substitution. The series is truncated at any stage depending upon the
level of accuracy required.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
99
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Euler method is a simple method based on the geometrical facts. This method has been
modified so as to include an iterative technique to get better approximation
Multi step methods make use not only the value yi but yi-1, yi-2, ….also, in-order to compute
the value of yi+1. This is based on the fact that the valuable information from the previous points
will be helpful to arrive at a better solution.
h 1 h 2 II h3 III
Yn+1 yn yn yn yn ......
1! 2! 3!
11. Write down the formula for Euler’s method or Euler’s algorithm?
14. Write down the formula for fourth order Runge-kutta method. for first order ODE?
K1= h f(x,y)
K2 = h f (x+ h/2, y+k1/2)
K3 = h f(x+h/2, y+k2/ 2)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
100
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
K4 = h f (x+h, y+k3)
1
y ( K1 2k2 2 K 3 k4 )
6
y ( x h) y ( x) y
15. Explain Runge-kutta method for simultaneous first order differential equations?
(or)
Write down the formula for Runge –kutta method for simultaneous first order ODE?
Solution:
we starting from (x0, Y0, z0) the increments y and Z in y and z respectively are given by
formulae
K1=hf, (x0,y0,z0) l1 = hf2 (xo, yo, zo)
h k l h k l
K 2 = hf1 (x 0 + ,y0 + 1 +Z0 + 1 ) l2 hf 2 ( x0 , y0 1 , z0 1 )
2 2 2 2 2 2
h k l h k l
K 3 = hf1 (x 0 + ,y 0 + 2 +Z0 + 2 ) l3 hf 2 ( x0 , y0 2 , z0 2 )
2 2 2 2 2 2 where h = x
K 4 = hf1 (x 0 +h,y0 +k 3 ,Z0 +l3 ) l4 hf 2 ( x0 h, y0 k3 , z0 l3 )
1 1
y (k1 2k2 2k3 k4 ) z= (l1 2l2 2l3 l4 )
6 6
y1=y0+y and z1=z0+z
having got (x1,y1,z1 ) we get (x2,y2,z2) by repeating the above algorithm once again starting from
(x1,y1,z1)
16. Explain Runge-kutta method for second order differential equation (or) How do you apply
R-K-method of order from to solve
yII = f(x,y, y1), given y(x0)= y0 and y1(x0) =y01?
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
101
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dz
z1 y " = f (x, y, y”) = f (x, y, z)
dx
dy dz
z and f (x, y, z) are simultaneous equation Where f1 (x, y, z) = z, f2 (x, y, z) = f (x, y, z)
dx dy
given
Also y (0) and z (0) are given
Starting from these equations, we can use the R – K method for simultaneous equation and solve
the problem.
A corrector formula is used to correct the error and to improve that value of y i+1
4h
Yn+1, P = yn-3 + (2yn-21 – y1n-1 +2y1n)
3
h 1
Yn+1, C = y n -1 + (y n-1 + 4y1n +y1n+1)
3
h
Yn+1, P = yn + [55y1n - 59y1n + 37y1n-2 - 9 y1n-3]
24
h
Yn+1, C = yn + [9y1n+1 + 19y1n – 5y1n-1 + y1n-2]
24
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
102
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
3. This method can be used to get some initial values for other methods such as Runge – kutta
method, Milne’s method, Adams Barthforth method.
An Euler’s method is less efficient since it requires h to be small for obtaining reasonable
accuracy. Taylor series method involves labour in computing the derivatives. In Runge – kutta
methods, the derivatives of higher order are not required and we require only the function values
at different points.
25. What is the relation between Runge – kutta method of second order and modified Euler’s
method?
26. Using Taylor series method, find correct to four decimal places, the values of y (0.1), given
dy
= x2 +y2 and y (0) = 1
dx
Solution:
We have y1 = x2 + y2
Yii = 2x + 2yy’
Yiii = 2 +2yy” +2’2
Yiv = 2yyiii + 2yiyii + 4yiyii
= 2yyiii + 6yiyii
x0 = 0, y0 =1, h = 0.1
x1 = 0.1, y1 = y (0.1) =?
Y01= x02 + y02 = 0 +1 = 1
Y0ii = 2x0 + 2y0y01 =2
Y0iii = 2 + 2(1) (2) + 2 (1)2 = 8
Y0iv = 2 1 8 + 6 (1) (2) = 28
By Taylor series method
Y1 =y0 + h y 10 h y 02 h y 30 ......
2 3
1! 2! 3!
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
103
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Y (0.1) = y1 = 1+
0 .1 ( 0 .1) 2 ( 0 .1) 3 ( 0 .1) 4
(1 ) (2) (8 ) ( 2 8 ) ....
1 2 6 24
= 1 + 0.1 +0.01 +0.0013333 + 0.000116666
= 1.11144999
= 1.11145
dy
27. Using Taylor series method, find y (1.1) correct to four decimal places given =xy1/3 and y
dx
(1) = 1
Solution:
2 1
1 4
y0ii = x0 y0 3 y01 y0 3
3 3
8
y0iii =
9
By Taylor series
(0.2) 2 4 (0.1)3 8
Y1 = y (1.1) = 1+0.1 + ......
2 3 6 9
= 1+0.1 + 0.00666 + 0.000148 + …….
= 1.10681
dy 2
28. Using Taylor series method, find y (0.1) given =x – y, y (0) = 1 (correct to 4 decimal places)
dx
Solution:
X0 = 0, y0 = 1, h =0.1, x1 =0.1
Y1 = x2 – y
Yii = 2x – y1
Yiii = 2 - yii
Yiv = - yiii
Y01 = x02 – y0 = 0 -1 = -1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
104
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
29. Given y1 = - y and y (0) = 1, determine the value of y at x = (0.01) (0.01) (0.04) by Euler method
Solution:
Solution:
Here f (x, y) = 2xy, x0 = 0, y0 = 1
Take h = 0.25, x1 = 0.25
By modified Euler method
h h
Y1 = y0 + h [f x 0 , y 0 + f (x 0 , y 0 )
2 2
f (x0, y0) = f (0, 1) = 2 (0) (1) = 0
y1 = 1 +0.25 [6 (0.125, 1)]
= 1+0.25 [2 0.125, 1]
=1 = 0.25 [2 0.125 1]
= 1.0625
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
105
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy
31. Solve =-2x–y, y(0)=-1 by Taylor series method to find y(0.1) compare it with exact
dx
solution?
Solution:
Here x0 = 0, y0 = -1, h = 0.1
Y1 = -2x –y
Yii = -2 –y1
Yiii = - yii
Yiv = - yiii
Y01 = -2x1 –y0 = 1
Y011 = -2 – 1=-3
Y0iii = 3
Y0iv = -3
0.1 (0.1) 2 (0.1)3 (0.1) 4
y1 =1+ 1 (3) 3 (3) ....
1! 2! 3! 4!
= 1+ 0.1 -0.015 +0.0005 – 0.0000125
= -0.91451
dy
32. Solve =x (1+x3y), y (0) = 3 by Euler’s method for y (0.1)
dx
Solution:
X0 = 0, y0 = 3, h = 0.1, x1 = 0.1
By Euler’s algorithm is y1 = y0 + hf (x0, y0)
= 3 +0.1 f (0, 3) = 3 + 0.1(0)
=3
dy
33. Solve = 2x +3y, y(0) = 1 by Euler’s method for y (0.1), y (o.2)
dx
Solution:
X0 =0, y0 = 1, x1 = 0.1
By Euler algorithm, y1 = 1+0.1 [2 0 + 3 1] = 1.3
Y2 =y1 + hf (x1, y1)
= 1.3 + 0.1f [0.1, 1.3]
= 1.3 + 0.1 [2 0.1 + 3 1.3] = 1.71
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
106
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
34. Obtain the values of y at x = 0.1 using Runge – kutta method of fourth order for the
differential equation y1 = - y, given y (0) = 1
Solution:
Here f (x, y) = - y, x0 = 0, y0 = 1, x1 = 0.1
K1 = hf (x0, y0) = 0.1 f (0, 1) = -0.1
h k
K2 = hf (x0 + , y0 + 1 ) = (0.1) f (0.05, 0.95) = - 0.095
2 2
h K
K3 = hf x 0 + , y 0 2 = (0.1) f (0.05, 0.9525) = -0.09525
2 2
K4 = hf (x0+h, y0 +K3) = (0.1) f (0.1, 0.90475) = - 0.090475
1
y = (k1+2k2 + 2k3 + k4)
6
y1 = y0 + y = 0.9048375
dy
35. Compute y (0.3) given +y+xy2 = 0, y (0) = 1 by taking h = 0.1 using R.K method of fourth
dx
order?
Solution:
Y1= - (xy2 +y) = f (x, y), x0 = 0, y0 =1, h =0.1 x1 = 0.1
K1 =h f (x0, y0) = 0.1 [- (x0y02 + y0)] = -0.1
K2 = hf x h , y k = -0.1 [(0.05) (0.95)2 + 0.95] = -0.0995
1
0 0
2 2
36. What are the values of k1 and l1 to solve y11 +xy1 + y = 0; y (0) =1, y1 (0) =0 by Runge kutta
method of fourth order
y11 = -xy1 – y, x0 = 0, y0 =1
Setting y1 = z, the equation becomes y11 =z1 = -xz – y
dy dz
= z = 6, (x, y, z), =-xz – y = f2 (x, y, z)
dx dx
given y0 =1, z0 = y01 = 0
By algorithm, k1= hf1 (x0, y0, z0) = 0.1 f1 (0, 1, 0) = 0
L1 = hf2 (x0, y0, z0) = 0.1 f2 (0, 1, 0) = -1 (0.1) = -0.1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
107
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
2
dy d dy
Let z then 2 the given differential equation becomes
dx dx dx
dz dy dz
2 xz 4 y now z and 2 xz 4 y
dx dx dx
x0 0, y0 0.2 h 0.2 f1(x,y,z)=z, f2(x1,x2,x3)=-2x2+4y
K1=hf1(x0,y0,z0)=0.10.5=0.05, l1 =ht2(x0,y0,z0)=0.1[-200.5+4.5]=0.8
38. What are the values of k1 and l1 to solve y11 – x2y1 – 2xy = 1 y (0) = 1, y1 (0) = 0
Solution:
dy
Let =z
dx
d2y
The given differential equation becomes = x2y1 +2xy+1
dx 2
dz 2
=x z +2xy +1, x0 =0, y0= 1, z0 =0, f1 (x, y, z) = z
dx
f2 (x, y, z) = x2z +2xy +1, h = 0.1
x1 =hf1(x0 , y0, z0)= 0.1 f (0, 1, 0) = 0.1 0 = 0
l1 =hf2 (x0, y0, z0) = 0.1
dy dz
39. What are the values of k1, k2, l1 and l2 from the system of equations, = x +z, =x–y
dx dx
given y (0) =2, z (0) = 1 using Runge – Kutta method of fourth order.
Solution:
f1 (x, y, z) = x + z; f2 (x, y, z) = x –y
X0 = 0, y0 =2, z0 =1, h = 0.1
Now
K1 = hf1 (x0, y0, z0)
= (0.2) f1 (0, 2, 1)
= (0.1) (0+1)
= 0.1
K2 = hf1 x 0 h , y 0 + k 1 , z 0 l1
2 2 2
= 0.1 f1 (0.05, 2.05, 0.8)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
108
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
= 0.085
l1 = (0.1) f2 (0, 2, 1)
= (0.1) (0 -22)
= - 0.4
l2 =hf2 x h , y + k1 l
,z0 1
0 0
2 2 2
Knowing four consecutive values of y namely y n-3, yn-2, yn-1and yn we calculate yn+1 using
predictor formula. Use this yn+1 on the R.H.S of corrector formula to get yn+1 after correction. To
refine the value further, we can use this latest yn+1 on the R.H.S of yn+1, c and get a better yn+1
dy
41. Solve by Euler’s method = x2 + y, y (0) = 1 of x = 0.02, 0.04
dx
Solution:
Here x0 = 0, y0 =1, f (x, y) = x2 + y, h = 0.2
By Euler’s algorithm, y1 = y0 + h f (x0, y0)
i.e. y1 =1 + 0.02 (x02 + y0) = 1.02
y2 = y1 + hf (x1, y1)
= 1.02 +0.02 [(0.02)2 + 1.02]
=1.04041
dy
42. Solve =x + y, given y (1) = 0 and get y (1.1) by Taylor series method?
dx
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
109
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
hn n
If h is small and the terms after n terms are neglected, the error is f (), when x0 < < x,
n!
If x1 – x0 = h
dy
44. Using Taylor method, compute y (0.2) correct to 4 decimal places given =1–2xy and y (0)=0
dx
Solution:
Here x0 = 0, y0 = 0, h =0.2
Y1 = 1 – 2xy
Y11 = -2 (xy1 + y)
Yiii = -2 [xy11 + 2y1]
Yiv = -2 [xyiii + 3y11]
Yv = -2 (xyiv + 4yiii]
Y01 = 1 – 2.0.0 = 1
Y011 = 0
Y0111 = -4
Y0iv = 0
Y0v = 32
By Taylor series,
Y1 =y (0.2) = 0 +
0 .2 ( 0 .2 ) 2 ( 0 .2 ) 3 ( 0 .2 ) 5
(1 ) ( 0 ) (4) 0 (3 2 ) ....
1 2 6 120
= 0.1948
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy
In the differential equation f x, y . The function f(x,y) may have a complicated
dx
algebraical structure. Then the evaluation of higher order derivative may become tedious. This is
the demerit of this method.
RK methods do not require prior calculation of higher derivatives of y(x) as the Taylor
method does. Since the differential equations using in applications are often complicated the
calculation of derivatives may be difficult also the RK formulas involve the computation of f(x,y)
at various positions instead of derivatives and this function occurs in the given equation.
14h 4 1
The error term in Milne’s predictor formula is yo .
45
Predictor – collector methods are methods which require the of y at xn, xn-1, xn-2…. For
computing the value of y at xn+1. We first use a formula to find the value of y at x n+1 and this is
known as predictor formula. The value of y so got is improved or corrected by another formula
known as a corrector formula.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
111
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
PART – B
1. Solve dy/dx = x+y, given y(1) =0, and get y(1.1), y(1.2) by Taylor series method. Compare your
result with the analysis.
Solution:
h 1 h 2 II h3 III
y1 y0 y0 y0 y0 ......
1! Z! 3!
0.1 (2) (0.1)3 (0.1) 4 (2)
2
0.1
y1 y (1.1) 0 (1)
1 2 6 24
5
0.1
.2 .... (2)
120
= 0.1+0.01+0.00033+0.00000833+0.000000166+….
Y(1.1) = 0.11033847
Now, take x0 = 0.1103847
Now, take x0 = 1.1 h = 0.1,
h 1 h 2 II h3 III h 4 IV
y2 y1 y1 yI yI y1 .... (3)
1! 2! 3! 4!
we calculate y1I , y1II , y1III ,.....,
x1 1.1, y1 0.11033847
y1I x1 y1 1.1 0.11033847 1.21033847
y1II 1 y1I 2.21033847
y1III y1II y1IV y1V .... 2.21033847
using in (3),
y2 = y(1.2) = 0.11033847 + 0.1 / 1 (1.21033847)
(0.1)2 (0.1)3 (0.1)h
(2.21033847) (2.21033847) (2.21033847) ....
2 6 2h
= 0.11033847+2.21033847(0.005+0.0016666+….)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
112
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
= 0.2461077
dy
The exact solu of x y is y = -x-1+2e x-1
dx
2. Using Taylor method compute y (0.2) and y(0.4) correct to 4 decimal places given
dy
1 2 xy and y(0) =0
dx
Soln
y =-2(xy +2y )
III II I
y0II = 0
yIV = -2(xyIII +JyII) yoIII =-4
yV = -2(xyiv+4yIII) yivo =0
y0II =J 32
by Taylor series
h 1 h2 II h3 III
yI y0 y0 yo y0 .... (!)
I! 2! 3!
(0.2) 0.2
2
(0.2)3 (0.2)40 (0.2)5
y1 y(0.2) 0 1 (0) (32) ....
1 2 6 24 120
yI=Z-x Z1 = x+y
yII =Z1-1 ZII = 1+y1
yIII = ZIIetc ZIII = yII etc
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
113
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h 2 II h3 III
And Z1=Z (0.1) = Z0 +hZ01+ Z 0 Z 0 .....(2)
2 6
Y0 = 1 z0 =1
Y01=Z0-x0= 1-0 = 1 z01 = x0 + y0 + 0 =1=1
Y0II =Z01-1=1-1 = 0 z0II = 1 + yo1 =1 + 1 =2
Y0III =z0II = 2 z0III = y0II = 0
=1+0.1+0.01 +0.0000083+….
=1.1100 (correct to 4 decimal places)
y (0.1) = 1.1003 and z (0.1) = 1.1100
dy dz
3. Solve z - x, y + x with y (0) = 1, z (0) = 1, by taking h = 0.1, to get y (0.1) and z (0.1).
dx dx
Here y and z are dependent variables and x is independent.
Solution:
Y1 = z –x and z1 = x + y
Take x0 = 0, y0 = 1 take x0 = 0, z0 = 1 and h = 0.1
Y1= y (0.1) =? Z1 = z (0.1) =?
Using in (6)
0.1 0.19
Y1 =y (0.1) = 0 + [1 0.9] 0.095
2 2
1
Y2 = y1 + h [f(x1, y1) +f (x2, y1 +hf (x1, y1)] (7)
2
F (x1, y1) = 1 – y1= 1 – 0.095 = 0.905
F(x2, y1 + h f (x1, y1) = f (0.2, 0.095 + (0.1) (0.905)) = 0.8145
0.1
Using in (7) we get y2 = y (0.2) = 0.095 + [0.905 +0.8145]
2
Y (0.2) = 0.18098
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
114
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
Y3 = y2 + h [f (x2, y2) +6 (x3, x2 +h f (x2, y2))] (8)
2
Using in (8)
0.1
Y3 =y (0.3) = 0.18098 + (0.81902 + 1 – 0.26288)
2
Y (0.3) = 0.258787
Modified Euler and improved Euler methods give the same values come A to sin decimal places.
4. Evaluate the values of y (0.1) and y (0.2) given yII – x (y1)2 +y2 = 0; y (0) =1, y1 (0) =0 by using
Taylor series method?
Solution:
YII – x (y1)2 + y2 = 0
Put y1 =z (1)
Hence the eqn reduces to z1 – xz2 +y2 = 0
z1 = xz2 – y2 (2)
Now again starting with x = 0.2 as the starting value so, use again eqn (1)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
115
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
dy 2x
5. Using improved Euler method find y at x =0.1 and y at x =0.2 give =y- , y (0) = 1
dx y
Solution:
2 (0.1)
f (x1, y0 + h f (x0, y0)) = f (0.1, 1.1) = 1.1 - 0.91818
1.1
0.1
y (0.1) = y1 = 1 + [1+0.91818] = 1.095909
2
1
y2 =y (0.2) =y1 + h [f (x1, y1) + f (x2, x1 +hf (x1, y1))] (3)
2
2x 2 0.1
f (x1, y1) = y1 - 1 =1.095909 -
y1 1.095909
= 0.913412
X 0 0.1 0.2
Y 1 1.095907 1.1841009
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
116
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
6. Apply the fourth order Runge – kutta method, to find y (0.2) given that y1 = x + y, y (0) = 1
Solution:
h 1
K2 = h f (x1+ , y1 + k1) = (0.1) f (0.15, 1.170859)
2 2
= (0.1) (0.15 + 1.170859) = 0.1320859
h 1
k3 = hf (x1 + , y1 + k2) = (0.1) f (0.15, 1.1763848
2 2
= (0.1) (0.15 +1.1763848) = 0.13262848
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
117
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
Y (0.2) = y (0.1) + [k1 +2k2 + 2k3 + k4]
6
1
= 1.110342 + (0.794781008
6
Y (0.2) = 1.2428055
Correct to four decimals places, y (0.2) = 1.2428
dy dz
7. Using the Runge – kutta method, tabulate the solution of the system = x +z, = x-y, y =
dx dx
0, z =1 when x = 0 at intervals of h = 0.1 from x = 0.0 to x =0.2.
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
118
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 1
y = [k1 + 2k2 + 2k3 + k4] z = [l1 +2l2+ 2l3 +l4]
6 6
1 1
= [0.1+2 (0.105) + 2 (0.105) +0.1099)] = [0+0+2 (- 0.00026) -0.0005]
6 6
=0.1050 = 0.00017
Y1 = y0 + y Z1 =z0 +z
= 0 + 0 .1050 = 1 – 0.00017
y (0.1) = 0.1050 z (0.1) = 0.9998
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Y2 = y1 + y Z2 = z1 + z
= 0.1050 +0.1149 = 0.9998 – 0.00116
= 0.2199 = 0.9986
y (0.2) = 0.2199 z (0.1) = 0.9986
2
d2 y dy
8. Solve x y 2 0 using Runge – kutta method for x = 0.2 correct to 4 decimal places.
dx
2
dx
Initial condition are x = 0, y =1, y1 = 0
Solution:
Given:
2
d2y dy
x +y2 = 0 (1)
dx
2
dx
dy
Put =z (2)
dx
d2y d2
(3)
dx dx
Substituting (2) and (3) in (1), we get
dz
= xz2 – y2
dx
dz
Let =xz2 – y2 = g (x, y, z)
dx
dz
=xz2 – y2 = g (x, y, z)
dx
Now
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h k l
l2 = hg x0 , y0 1 , z0 1
2 2 2
h
2
l k
2
= h x0 z0 1 y0 1
2 2 2
0.2 0.2 0
2 2
l2 = (0.2) 0 0 1
2 2 2
= -0.1998
h k l
k3 = hf x0 , y0 2 , z0 2
2 2 2
l 0.1998
= h z0 1 = (0.2) 0
2 2
= - 0.01998
h k l
l3 = hg x0 , y0 2 , z0 2
2 2 2
h
2
l k
2
= h x0 z0 2 y0 2
2 2 2
= (0.2) 0 0 1
2 2 2
= - 0.1958
1
y = [k1 + 2k2 +2k3 +k4]
6
1
= [0 +2 (-0.02) + 2 (-0.01998) – 0.0392]
6
= - 0.0199
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
121
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
y (0.2) = y1 = y0 +y
=1 – 0.0199
= 0.9801
y (0.2) = 0.9801
dy
9. The differential equation = y –x2 is satisfied by y (0) = 1, y (0.2) = 1.12186, y (0.4) = 1.46820, y
dx
(0.6) = 1.7379 compute the value of y (0.8) by Milne’s predictor corrector formula?
Solution:
dy 1
Given =y = y – x2 and h = 0.2
dx
X0 = 0 y0 =1
X1 =0.2 y1 = 1.12186
X2 = 0.4 y2 = 1.46820
X3 = 0.6 y3 = 1.7379
X4 = 0.8 y4 =?
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h 1
Yn+1, C = yn-1 + (y n-1 +4y1n + y1n+1)
3
dy
10. Using Taylor’s series method, solve =xy+y2, y (0) = 1 at x = 0.1, 0.2 and 0.3 continue the
dx
solve at x = 0.4 by. Milne’s predictor corrector method?
Solution:
(0.1) 2 (0.1)3
Y (0.1) = 1 + 0.1 + 3+ 10
2 6
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
123
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h 2 II h3 III
Y2 = y1 + hy +
11 y1 + y1 + ….. (5)
2! 3!
(0.1) 2 (0.1)3
Y (0.2) = 1.1167 + (0.1) (1.3585) + (4.2865) + (16. 4102)
2 6
Y (0.2) = 1.1167 + 0. 13585 + 0. 0214 + 0.002735
Y (0.2) = 1.27668
To find y (0.3)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
124
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
= 1. 8852 …… (10)
X0= 0 y0 =1
X1 = 0.1 y1 = 1.11666
X2 = 0.2 y2 = 1.27668
X3 = 0.3 y3 = 1.50233
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
4(0.1)
=1+ [2 (1.3585) – 1.8852 + 2 (2.7076)]
3
= 1 + 0.1333 [2.717 – 1.0852 + 5.4152]
y4, P = 1.8329
h 1
yn+1, C = yn-1 + [y n-1 + 4yn1 + y1n+1] …… (14)
3
Now y41 = (x2 + y2)4 = (x4y4 + y42)
= [(0.4) (1.8327) + (1.8327)2]
= 0.7330 + 3.3588
= 4.0918
dy 1
11. Solve and get y (2) given = (x + y), y (0) = 2
dx 2
y (0.5) = 2.636, y (1) = 3.595; y (1.5) = 4.968 by Adam’s
method?
Solution:
1
By Milne’s method, we have y01 = (0 +2) =1
2
Y11 = 1.5680, y21 = 2.2975, y31 = 3.2340
By Adam’s predictor formula
h
Yn+1, P = yn + [55yn1 – 59y1n-1 + 37y1n-2 – 9y1n-3]
24
h
y4, P = y3 + [55y1n – 59y21 + 37y11 – 9y10] ….. (1)
24
0.5
=4.968 + [55 (3.2340) – 59 (2.2975) + 37 (1.5680) – 9 (1)]
24
= 68708
1 1
y41 = (x4 + y4) = (2+6.8708) = 4.4354
2 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
126
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h
By corrector, y4, C = y3 + [9yn1 + 19y31 – 5y21 + y11].. (2)
24
0.5
= 4.968 + [9 (4.4354) + 19 (3.234) – (2.2975) + 1.5680]
24
= 6.8731
dy
12. Find y (0.1), y (0.2), y (0.3) from= xy + y2, y (0) = 1 by using Runge – kutta method and
dx
hence obtain y (0.4) using Adam’s method?
Solution:
k3
k3 = hf (0.15, y1+ ) = (0.1) f (0.15, 1.196)
2
= 0.16098
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
127
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
y2 = 1.1169 + [0.1359 + 2(0.1582 + 0.16098) + 0.1889]
6
y (0.2) = 1.2774
h k
K2 = hf (x2 + , y2 + 1 ) = (0.1) f (0.25, 1.3718) = 0.2225
2 2
h k
K3 = hf (x2 + , y2 + 2 )
2 2
= (0.1) f (0.25, 1.3887) = 0.2274
k
k4 = hf (x3, y2 + 3 ) = (0.1) f (0.3, 1.5048)
2
=0.2716
1
y3 = 1.2774 + [0.1887 + 2 (0.2225) + 2 (0.2274) + 0.2716] = 1.5041
6
h
Y4, P = y3 + [55y31 – 59y21 + 37y11 – 9y01] …. (2)
24
Y01 = x0y0 + y02 =1
Y11= x1y1 +y12 = 1.3592
Y21 = x2y2 + y22 = 1.8872
Y31 = x3y3 + y32 = 2.7135
Using (2)
0.1
Y4, P = 1.5041 + [55 (2.7135) – 59 (1.8872) + 37 (1.3592) – 9 (1)]
2
= 1.8341
h
y4, P = y3 + [9y41 + 19y31 – 5y21 + y11]
24
0.1
= 1.5041 + [9 (4.0976) +19 (2.7135) – 5 (1.8872) + 1.3592)
24
= 1.8389
y (0.4) = 1.8389.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
128
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
y2 x2
13. Solve y1 = ; y (0) = 1 by Runge – kutta method of fourth order to find y (0.2)
y2 x2
Solution:
y2 x2
Y1 =f (x, y) = , x0 = 0, h = 0.2, x1 = 0.2
y2 x2
1 0
f (x0, y0) = f (0, 1) = =1
1 0
k1 = hf (x0, y0) = 0.2 1 = 0.2
h k
k2 = hf (x0 + , y0 + 1 ) = (0.2) f (0.1, 1.1)
2 2
1.21 0.01
= 0.2 = 0.9167213
1.21 0.01
h k
k3 = hf (x0 + , y0 + 2 ) = (0.2) f (0.1, 1.0983606)
2 2
= 0.1967
k4 =hf (x0 +4, y0 +k3) = 0.2 f (0.2, 1.1967)
= 0.1891
1
y = [k1 + 2k2 + 2k3 +k4]
6
1
= [0.2 + 2 (0.19672) + 2 (1.1967) + 0.1891]
6
= 0.19598
y (0.2) = y1 = y0 + y = 1.19598
dy
14. Solve y 2 x 2 withy(0)=1 use Taylor series at x=0.2, and 0.4 find x=0.1.
dx
Solution:
Given y1 y 2 x 2 , x 0 0 y 0 1
x x 0 y1 x x 0 x x0
2 3
y y0 0 y "
0 y"'0 ... 1
1! 2! 3!
2 2
y' y x y y 02 x 02
1
0 1+0.1
y" 2yy1 2x y "0 2y 0 y "0 2x 0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
129
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2yy" 2 y1 2 8
2
x x2 x3
1 y 1 1 2 3 ....
1! 2! 3!
3
4x
1 x x2 .... 2
3
2 4 3
2 y 0.2 1 0.2 0.2 0.2
3
=1+0.2+0.04+0.01067
=1.25067
1
y K1 2K 2 2K 3 K 4
6
1
0.2 2 0.19672 2 1.1967 0.1891
6
0.19598
y 0.2 y1 y 0 y 1 0.19598 1.19598.
15.Given y1=1-y and y(0) = 0 find y(0.1) by Euler method (ii) y(0.2) by modified Euler method.
(iii) y(0.4) by Milnes’ method.
Solution:-
By Euler method
1 1
y 2 y1 1hf x1 h, y1 hf x1 , y1
2 2
1
0.1 0.1 1 y1 hf x, y1
2
0.1
0.1 0.1 1 0.1 1 0.1
2
0.1855
IIIy y 3 0.2629
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
130
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
By Milnes method.
4h
y 4 ,P y 0
3
2y1' y12 2y13
0.1
04 2 1 y1 1 y 2 2 1 y 3
3
0.4
3
3 2y1 y 2 2y 3
0.4
3
3 2 0.1 0.1855 2 0.2629
0.3280
y14 1 y 4 1 0.3280 0.6720
2 4 3
2 y 0.4 1 0.4 0.4 0.4
3
1 0.4 0.16 0.08533
1.64533.
4
y 0.1 1 0.1 0.12 0.13
3
1 0.1 0.01 0.00133
1.11133.
dy y 2 x 2
16. Using R.K. method of 4th order solve with y(0) = 1 at x = 0.2
dx y 2 x 2
y2 x2
Given y1 f x, y x 0 0 y 0 1 x1 0.2 h=0.2.
y2 x2
y 2 x 02 1 0
K 1 hf x 0 , y 0 0.2 02 2
0.2
y0 x0 1 0
0.2
h K
K 2 hf x 0 , y 0 1
2 2
0.2 0.2
0.2f 0 .1
2 2
0.2f 0.1, 1.1
1.2
0.2
1.22
0.19672
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
131
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h K
K 3 hf x 0 , y 0 2
2 2
0.2 0.19672
0.2f 0 ,1
2 2
0.2f 0.1,1.0983606
0.1967
K 4 hf x 0 h, y 0 K 3
0.2f 0.2, 1.1967
0.1891
h 1
y 4 ,C y 2
3
y 2 4y13 y14 .P
0.1
0.1855
3
1 y 2 4 1 y 3 1 y 4 ,P
0.1
0.1855 6 y 2 4y 3 y 4 ,P
3
0.1
0.1855 6 y 2 4y 3 y 4 ,P
3
y 0.4 0.3333
dy 2xy
17. Using Runge Kutta Method calculate y(0.1), y(0.2), y(0.3), given that 1y 0 0.
dx 1 x 2
Taking these values as starting values find y(0.4) by Milines’ method.
Solution:
dy 2xy
f x, y 1
dx 1 x2
Here x 0 0 h=0.1 x1 0.1 x 2 0.2 x 3 0.3 y 0 0
f x 0 , y 0 f 0,0 1 0 1
K 1 hf x 0 , y 0 0.1 1 0.1
1 1
K 2 hf x 0 h, y 0 K,
2 2
0.1 0.1
0.1f
2 2
0.1004
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
132
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h 1
K 3 hf x 0 , y 0 K 2
2 2
0.1 0.1004
0.1f ,
2 2
0.1005
K 4 hf x 0 h, y 0 K 3
0.1f 0.1, 0.1005
0.1020
1
y K 2 2K 2 2K 3 K 4
6
0.1006
y 0.1 y 0 y 0 0.1006 0.1006
1
y K1 2K 2 2K 3 K 4
6
1
0.1020 2 0.1044 2 0.1045 0.1079
6
0.1046
y 0.2 y1 y 0.1006 0.1046 0.2052
To find y(0.3)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
133
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
K 1 hf x 2 , y 2
0.1f 0.2,0.2052
0.1079
h K
K 2 hf x 2 , y 2 1
2 2
0.1 0.1079
0.1f 0.2 ,0.2052
2 2
0.1122
K 3 0.1123 K 4 0.1175
1 1
y K 1 2K 2 2K 3 K 4 0.1079 0.2249 0.2246 0.1175
6 6
0.1124
2xy
f x, y 1 2
y1
1 x
4h
y n 1 ,P y n 3 2y1n 2 y1n 2 2y1n
3
4h
y 4 ,P y 0 2y11 2y13
3
2x y
y1 1 1 21
1 x1
2 0.1 0.1006
1 2 1.0199
1 0.1
2x y
y12 1 2 22
1 x2
0.2 0.2052
1 2 2 1.0789
1 0.2
2x 3 y 3
y13 1
1 x 23
2 0.3 0.3176
1 2 1.1748
1 0.3
4 0.1
y 4 ,P 0
3
2 1.1099 10.0789 2 1.1748
0.4414
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
134
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
h
y n 1 ,C y n 1 y n 1 4y1n 41n 1
3
h 1
y 4 ,C y 2 y 2 4y13 y14
3
2x y
y14 1 4 24
1 x4
0.4 0.4414
1 2 2
1 0.4
0.35312
1
1.16
1.3044
0.1
y 4 ,c 0.2052 1.0789 4 1.1748 1.3044
3
0.1
0.2052 1.0789 4.6991 1.3044
3
0.2052 0.2361 0.4413
Correct value of y at x=0.4 is 0.4413.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
135
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
UNIT – V
PART – A
A difference quotient is the quotient obtained by dividing the difference between two values of
a function by the difference between two corresponding values of the independent variable.
A general two dimensional second order partial diff. equation is of the form.
2u 2u 2u u u
A B C D E Fu G
x 2
xy y 2
x y
(i) elliptic if B 2 4 AC 0
(ii) Parabolic if B 2 4 AC 0
(iii) Hyperbolic B 2 4 AC 0
B 2 4 AC 0 4 xy 0
The given pde. Is elliptic
B 2 4 AC 4 16 12 0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
B 2 4 AC 4 4 0
2u 2 u
2
a
t 2 x 2
2u 2u
0
x 2 y 2
Now B 2 4 AC 0 4.1.1 4 0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
137
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2u 2u
The Poisson’s equation is f ( x, y )
x 2 y 2
Here A=1, B=0, C=1
Now B 2 4 AC 0 4.1.1 4 0
2u 2u 2u
10. Classify 2 0
x 2 xy y 2
Now B 2 4 AC 4 4 0, x, y
B 2 4 AC 0 4 x 2 (1 y 2 )
Now,
=4 x 2 ( y 2 1)
B 2 4 AC is negative if -1<y<1, x 0
For x=0 for all y or for all x, y=I1 the equation is parabolic.
Now, B 2 4 AC =16-4.1.(x2+4y2)
= 4(4- x2+4y2)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
138
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
x2 y 2
1
4 1
x2 y 2
If is elliptic is the region outside the ellipse 1
4 1
x2 y 2
It is hyperbolic inside the ellipse 1
4 1
x2 y 2
It is parabolic on the ellipse 1
4 1
Now, B 2 4 AC = 4(x+2)2-4(x+1)(x+3)
x 2 16 16 x x 2 12 x 4 x 12
40
Now, B 2 4 AC =0-4x=-4x
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
139
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
ui , j ui 1, j ui 1, j ui , j 1 ui , j 1
4
1
ui , j ui 1, j 1 ui 1, j 1 ui 1, j 1 ui 1, j 1
4
The error is the diagonal formula is four times the error in the standard formula.
k
ui , j 1 ui 1, j (1 2 )ui , j ui 1, j , where
ah 2
1
it is valid if 0<
2
1 1 K
ui , j 1 ui 1, j ui 1, j , where 2
2 2 ah
a
is K= h 2
2
1
ui , j 1 ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j
4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
140
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
24. Write down the explicit scheme or Explicit formula for hyperbolic equations.
h
25. When K write down the explicit formula for hyperbolic equation.
a
ui , j 1 ui 1, j ui 1, j ui , j 1
26. For what value of , the explicit, method of showing the hyperbolic equation.
2u 2u K
a2 2 0 is stable, where =
x 2
t h
Ka Ka
If 1, it is stable and if 1, it is
h h
aK 1
Stable but the accuracy of the solution decreases as decreases. That is, for the solution is
h a
stable.
27. For what value of , the explicit, method of showing the hyperbolic equation.
2u 2u K
a 2 2 2 0 is unstable, where =
x t h
ak
If 1 2 a 2 0, is a i is 1, the solution is unstable.
h
28. Write down standard five point formula is showing laplace equation over a region.
1
ui , j ui 1, j ui 1, j ui , j 1 ui , j 1
4
29. Name two methods that you use to solve one dimensional heat equation.
1. Bender-Schmitt method.
2. Crank – Nicholson method.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
141
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
30. To get the simple explicit difference formula for parabolic equation Ut= 2uxx, we should
take
x
2
as
2 t
We know that simple explicit difference formula for parabolic equation is Bender- Schmidt
1 k
recurrence equation. In this equation we take 2
2 ah
1
Is we have a 2 ,x G, tK
x
2
Is we take as 2
2 t
31. In showing equation ut=2uxx, by the crank-nicholson method, to simplify method we take
x
2
as
2 t
Solution:
We know that is crank-Nicholson method, we use the simplified formula subject to K= ah2
1
Since k=t, h=x, a = 2
x
2
ah 2
Is 1 2 1
K t
1
SFPF ui , j ui 1, j ui 1, j ui , j 1 ui , j 1
4
ui , j 1
ui 1, j ui , j ui 1, j
ui , j 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
142
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
DFPF ui , j ui 1, j 1 ui 1, j 1 ui 1, j 1 ui 1, j 1
4
ui,j
ui-1,j+1 u41,j+1
y
0
0 15
0 14
0
13
0 3 6 9 A x
2u u
35. The boundary condition is showing
x 2 t
0<x<4, given u(0,t)-0, u(4,t)=0, u(x,0)=x(4-x) and assuming h=k=1 find the value of u upto t=5
-1 10 -7
0 0
0 3 -4 3 0
0 -1 2 -1 0
0 1 0 1 0
0 1 2 1 0
0 3 4 3 0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
143
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
K
Here h=k=1, = 1, a 1
ah 2
we can not bender-Schmitt recurrence relation the explicit formula becomes.
ui , j 1 ui 1, j ui , j ui 1, j
Solution:
1
Since K is not given, we can choose K so that = and hence use Bender –schmiltt relation
2
ah 2 1 1 1
K
Have 2 2 2
1
ui , j 1 ui 1, j 1 ui 1, j
2
u 1
37. What is the value of K to solve u xx by Bender-schmilt method with h=1 if h and k are
t 2
the investments of x and t respectively?
ah 2
In Bender sdmilt method K
2
a
Since h=1 then k=
2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
144
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2u u
38. Solve 2 0 given u (0, t) = 0, u(4, t) = 0 u ( x, 0) = x (4 - x) Assume h=1 find the value
x 2
t
u up to t = 5.
Solution:
Uxx=aut a=2
ah 2
To use Bender –schmidt’s equation, K 1
2
Step size in time =k=1. The values of ui,j are tabulated below.
2u u
39. Given , f (0, t ) f (5, t ) 0 f ( x, 0) x 2 (25 x 2 )
x 2
t
find f in the range taking h=1 and up to 2 seconds
Solution:
ah 2
To use bender- Schmidt method, K
2
1
Have a=1, h=1 K
2
1
Step size of time =
2
Step size of x=1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
145
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
1
k 1
Here a=1 2 8
ah 1 1 2
4
1
Since , we can not use simplified formula
2
we use formula
1
0 6u , 2(0) (0 0)
8
1
u1 0.020833
48
41. State the condition for the equation AU xx 2BU x y U yy f u x , u y x1 to be (a) elliptic (b)
parabolic (c) hyperbolic when A,B,C are functions of x & y.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
146
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
43. State schmidt’s explicit formula for solving heat flow equation.
Solution:
G iij1 u i ij 1 2, u ij u i i j
If = 1 2 , u i , j 1 1 2 ui 1j u i 1 , j
Solution:
(i) ellphic if B2 – 4AC<o
(ii) parabolic if B2 – 4AC =o
(iii) hyperbolic If B2 – 4AC >o
45. What type of equations can be solved by using crank-Nickolson’s difference formula?
Crank – Nickolson’s difference formula is used solve parabolic equations of the form
Uxx = auE
46. Write the Crank Nickolson difference scheme to solve u xx au t u o, t = To, u(I,E=T, and the
initial condition as a (x,o)=f(x).
The scheme is
1 u i 1 j 1 1 u ij1 1 u i 1,j1
2 2
1 1
u i 1 j 1 u ij u i 1 , j.
2 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
147
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
PART – B
d 2x t
1. Solve the differential equation 2
(1 ) x t , x(1)=2, x(3)=-1.
dt 5
Solution:
d 2x x 2 xi xi 1
Replace 2
by i+1 the differential
dt h2
d 2x x 2 xi xi 1
equation becomes 2
by i+1 -
dt h2
t
(1 i ) xi ti
5
t
xi 1 2 h 2 (1 i ) xi xi 1 h 2ti ..........(1)
5
Let us subdivide the interval (1,3) into 4 equal parts Note that the interval given in the
problem is (1,3).
At t=t2=1.5,i=2
1 2 1.5 1
2
X1 - 2+ 1- 2x x , 1.5
2 5 2
yi 1 2 yi yi 1
At t t , 2.0, i 3 y i ...............(1)
2
1 2 2.0 1
2
X 2 - 2+ 1- 3 n 2.0
x x
2 5 2
At t tn 2.5, i 4
1 2 2.5 1
2
X 3 - 2+ 1- 4 5 2.5
x x
2 5 2
But the from the boundaries condition, we have x1=x(t1)=x(1)=2 and x5=x(+5)=x(3)=-1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
148
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
2 2 0.7 x2 x3 0.375
4
We get
1
x2 2 0.6 x3 x4 0.5
4
1
x3 2 0.5 x4 1 0.625
4
is 2.175 x2 x3 0.x4 1.625
x2 2.15 x3 x4 0.5
0 x2 x3 2.125 x4 1.625
x3 0.424, x4 0.964
d2y
2. Solve y given y1(0)=0 and y(1)-1.
dx 2
Solution:
d2y
Replacing by the different formula,
dx 2
yi 1 2 yi yi 1
yi ........(1)
h2
Y0-2y1+y2=1/4 y1…….(2)
(Have y0 is not mentioned in the problem)
This we have a system of two equation is three unknown y0,y1 and y2.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
149
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
We need one more equation to solve for y 0,y1 and wy2 for this, we have to use the other
boundary condition is derivative, y1 (0)=0
Here x1=0
y1(x1)=0
y ( x2 ) y ( x0 )
is 0=y1(x1) = 1 y ( x2 ) y ( x0 )or y 2 y0
2h
36 32 32 36
y2 and y1 is y(o)= and y (1)
49 49 49 49
3. Solve the Laplace equation 2u=0 at the interior points of the square region given.
Solution:
1
u5 [17.0 12.1 0 21.0] 12.5[ SFPF ]
4
1
u1 [17.0 0 0 12.5] 7.4( DFPF )
4
1 1
u3 [18.6 12.5 17 21] 17.3[ DFPF ] u9 [21.0 12.1 12.5 9.0] 13.7[ DFPF ]
4 4
1 1
u7 [12.5 0 0 12.1] 6.2( DFPF ) u2 [17.0 12.5 7.4 17.3] 13.6( SFPF )
4 4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
150
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
u4 [0 12.5 7.4 6.2] 6.5[ SFPF ]
4
1
u6 [17.3 17.7 12.5 12] 16.1( SFPF )
4
1
u8 [12.5 12.1 6.2 13.7] 11.1( SFPF )
4
We have got the rough values at all interior grid points. Now we can start Liebmanns iteration
process. We use only standard two point formula to evaluate the in.
First iteration:
1 1
u1(1) [o 11.1 u2 un ] [0 11.1 13.6 6.5] 7.8
4 4
1
u2(1) [17.0 12.5 7.8 17.3] 13.7
4
1
u3(1) [13.7 21.9 19.7 16.1] 17.9
4
1
u4(1) [0 12.5 7.8 6.2] 6.6
4
1
u5(1) [13.7 11.1 6.6 16.1] 11.9
4
1
u6(1) [17.9 13.7 11.9 21.0] 16.1
4
1
u7(1) [6.6 8.7 0 11.1] 6.6
4
1
u8(1) [11.9 12.1 6.6 13.7] 11.1
4
1
u9(1) [16.1 12.8 17.0 11.1] 14.3
4
Second iteration:
1
u1(2) [o 11.1 13.7 6.6] 7.9
4
1
u2(2) [17.0 17.9 7.9 17.9] 13.7
4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
151
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
u3(2) [13.7 19.7 21.9 16.1] 17.9
4
1
u4(2) [7.9 0 11.9 6.6] 6.6
4
1
u5(2) [13.7 11.1 6.6 16.1] 11.9
4
1
u6(2) [11.9 17.9 21.0 14.3] 16.3
4
1
u7(2) [0 6.6 11.1 8.7] 6.6
4
1
u8(2) [6.6 11.9 14.3 12.1] 11.2
4
1
u9(2) [11.2 16.3 17.0 12.8] 14.3
4
Third iteration:
1
u1(3) [o 11.1 13.7 6.6] 7.9
4
1
u2(3) [7.9 17.9 17.0 11.9] 13.7
4
1
u3(3) [13.7 21.9 19.7 16.3] 17.9
4
1
u4(3) [6.6 0 7.9 11.9] 6.6
4
1
u5(3) [13.7 11.2 6.6 16.3] 11.95
4
1
u6(3) [11.9 21.0 17.9 14.3] 16.3
4
1
u7(3) [6.6 8.7 0 11.2] 6.6
4
1
u8(3) [11.9 12.1 6.6 14.3] 11.2
4
1
u9(3) [11.2 16.3 17.0 12.8] 14.3
4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
152
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
The second and third iterated values are same. Thus we can stop the iteration. We can write the
iterated values of is in the table given below.
0 U1 U2 U3
7.4 13.7 17.9
7.8 13.7 17.9
7.9 13.7 17.9
7.9 13.7 17.9
7.9 13.7 17.9
0 U4 U5 U6
6.5 12.5 16.1
6.6 11.9 16.1
6.6 11.9 16.3
6.6 11.95 16.3
6.6 11.95 16.3
0 U7 U8 U4 17.6
6.2 11.1 13.7
6.6 11.2 14.3
6.6 11.2 14.3
6.6 11.2 14.3
6.6 11.2 14.3
6.6 11.2 14.3
0
0 8.7 12.1 12.8 9.0
4. Solve 2u=8x2y2 in the square mesh given u=0 on the 4 boundaries dividing the square into 16
sub – squares of length. 1 unit.
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
153
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Take the co-ordinate system with origin at the centre of the square.
Since the P.D.E. and boundary conditions are symmetrical about x, y axes and y=x
we have, u1= U3=u7=u9
U2=u4=u6=u8
we need to find u1= U2= U3=u5 only
(have h=1)
As per the five point formula, (have f(x.y)=8x2y2)
At (i=-I,j=-1), is have,
At (i=0,j=1), is have,
u1 u3 u5 4u2 0
2u1 4u2 u5 0......(3)
At (i=0,j=0),
u2 u4 u6 u8 4u5 0
4u5 4u5 0
u2 u5 0......(4)
1
from (2), u1 u2 4
2
from (4) u5=u2
u 4 4u2 u2 0.
using in (3), 2
u 2 2
u5 2, u1 3,
u1 3, u2 2 u5 ,
Solution:
Since h, and K are not given in will select then properly and use bender –schmidt method.
a 2 1 2
k h h a 1
2 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
154
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
(0.2)
hence K 0.02
2
the formula is ui , j 1
1
2
ui1, j 1 ui1, j
u(o,o)=0,u(0.2,0)=sin 0.5878
5
2 3
u (0.4, o) sin 0.9511;sin(0.6, 0, sin 0.9511
5 5
4
sin(0.8, 0) sin 0.5878
5
sin(1, 0) 0
we form the table
6. Solve numerically, 4uxx=utt with the boundary conditions u(0,t)=0, u(4,t)=0 and the initial
conditions ut (x,0) and u(x,0)=x(4-x), taking h=1 (for 4 time steps)
Solution:
h 1
Since a 2 4, h 1, k ........(1)
a 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
155
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
ui 1,0 ui 1,0
Ut(x,o)=o implies ui ,1 ..........(3)
2
1
Period is h seconds N 8 h 8 4sec.
2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
156
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2u 2u
, 0 x 1, t o, givenu ( x, 0) ut x, 0
7. Solve t 2 x 2 compute u for 4 times steps with h=0.25
u (0, t ) 0andu (1, t ) 100 sin t
Solution:
Here, the two ends are not fixed
x=1 is a free end with displacement not equal to zero.
Since the differential equation is same, we have
h 0.25
if k 0.25sin ce a =1
a 1
u (1, 0.25) 100sin 70.7106
4
u (1, 0.5) 100sin 100
2
3
u (1, 0.75) 100sin 70.7106
4
u (1,1) 0
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
157
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
ui 1,0 ui 1,0
ut ( x, 0) 0 )ui ,1
2
u2,0 u0,0
u1,1 0
2
u2,1 0
u2,1 0
8. Solve, uxx +uyy=0 over the square mesh of 4 units, satisfying the following boundary
conditions.
(i ) u (o, y ) 0, 0y4
(ii ) u (4, y ) 12 y, 0y4
(iii ) u ( x, 0) 3 x, 0 x4
(iv) u ( x, 4) x 3 , 0 x4
Solution:
0 1 4 9 16
0 U1 U2 U3 15
0 U4 U5 U6 14
0 U7 U8 U9 13
0
3 6 9 12
Initial values
1
u5 4 6 0 14 6
4
1
u1 0 6 4 0 2.5
4
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
158
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
u3 16 6 14 4 10
4
1
u7 0 6 0 6 3
4
1
u9 6 14 6 12 9.5
4
1
u2 4 6 2.5 10 5.625
Now, 4
1
u4 0 6 2.5 3 3.125
4
1
u6 6 14 10 9.5 9.875
4
1
u8 6 6 3 9.5 6.125
4
u2 5.59, u3 9.87,
u4 2.88, u5 6.13, u6 9.88,
u7 3.01, u8 6.16, u9 9.51,
9. Solve the Poisson equation 2u=-(x+y)2 over the square region bounded by the lines
x=0,y=0,x=0,y=3 given that u=0 throughout the boundaries taking h=1.
Solution:
y 0 0 0 0
0 A U1 B U2 0
0 C U3 D U4 0
0 0 0 0 0
Here f(x,y)=-(x+y)2=-(i+j)2
The standard five point formula for solving Poisson equation.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
159
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0+0+u2+u3 -4u1=-(1+2)2=-9
u2+u3-4u1=-9-----------(1)
u1+0+0+u4 -4u2=-(2+2)2=-16
u1+u4-4u2=16 -----------(2)
0+u1+u4 +0-4u3=-(1+1)2=-4
u1+u4-4u3=-4 -----------(3)
U3+u2-4u4=-9-----------(4)
1
from(1), u1 u2 u3 9............(5)
4
1
from(2), u2 u1 u4 16............(6)
4
1
from(3), u3 u1 u4 4............(7)
4
Iteration 1 2 3 4 5 6
U1 = U4 2.25 4.06 4.52 4.63 4.66 4.66
U2 5.125 6.03 6.26 6.31 6.33 6.33
U3 2.125 3.03 3.26 3.31 3.33 3.33
1 1
u2 2u1 16 or u2 u1 2 .......(8)
4 2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
160
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 1
u3 2u1 4 = u1 2 .......(9)
4 2
1
u1 u2 u3 9 ,
4
1 1
u2 u1 8 , u3 u1 2
2 2
Taking the initial values, for u1,u2,u3, as (0,0,0) and applying gauss seidel method, we get the
following table of approximation.
u 1 2u
10. Solve , 0 x, 12, 0 t 12 with boundary conditions and initial conditions.
t 2 x 2
1
u ( x, 0) x(15 x), 0 x 12
4 using Bender Schmidt relation using h=k=3
=u (o, t ) o, u (12, t ) 9, u (o, t ) o, o x 12
Solution:
k 3 1
ah 2
29 6
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
161
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
u (3, 0) 3 15 3 9
4
1
u (6, 0) 6 15 6 13.5
4
1
u (9, 0) 9 15 9 13.5
4
11. Use crank-Nicholson method, solve ut=uxx, subject to u(x,o)=0,u(o,t)=o and u(1,t)=t, taking
1 1
h , K for one time step.
4 8
Solution:
1
1 1 k
Here a 1, h , K , 2 8 2
4 8 ah 1 1
6
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0 u2 u1 0
u1 u3 3u2 0
1
u2 3u3 0
8
U1=0.00595
U2=0.001786
U3=0.04762
u 2u 1
12. Solve 2 with the conditions U(x,0)=0, u(o,t)=o and u(1,t)=t compute is for t= in two
t x 8
steps using crank –Nicholson formula.
Solution:
Uxx=ut
1
Here a=1; k= choose h such that =1 Now
16
k
1
h2a
h 2 a k or h 2 k
1
Take h
4
1/8 0 U4 U5 U6 1/8
1/16 0 U1 U2 U3 1/16
0 0 0 0 0 0
t/x 0 ¼ ½ ¾ 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
163
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
At
1
t rtep, weget
16
1
u1 (0 u2 0 0)
4
4u1 u2 0.........(1)
1
u2 (u1 u3 0 0)
4
4u2 u1 u3 .........(2)
1 1
u3 (u2 0 0)
4 16
1
4u3 u2 ........(3)
16
4u4=u5+0.004464……….(4)
u5=1/4[u4+u6+u1+u3]
4u5=u4+u6+0.0011116+0.004464…….(5)
1 1 1
u6 u4 u2
4 8 16
1 1
4u6 u4 0.004464 .........(6)
8 16
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
164
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
Solution:
2l 2 5
Here a2=25, a=5 period of vibration = 2sec.
a 5
Half period =1 second.
Thus we have to find the values of u up to t= 1
k 1 h 1
, K for min gh 1
h a a 5
5/5 0 -2 -4 -4 -2 0
4/5 0 -2 -3 -3 -2 0
3/5 0 -1 -1 -1 -1 0
2/5 0 1 1 1 0
(0+3-2) (2+3-4) 3+0-2
1/5 0 2 3 3 2 0
0 0 2 4 4 2 0
t/x 0 1 3 2 4 5
U(1) = 2x1=2
U(2)=2x2=4
U(3)=10-2x3=4
U(4)=10-2x4=2
1
ui ,1 (ui 1,0 ui 1,0 )
2
1 40
ui ,1 (u2,0 u0,0 )
2 2
1
u2,1 (u3,0 u1,0 ) 3
2
1
u3,1 (u4,0 u2,0 ) 3
2
1
u4,1 (u5,0 u3,0 ) 3
2
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
165
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
2 3
we have to get the values of u at t = , t etc.
5 5
ui,j+1
ui,j+1 ui,j+1
ui,j+1
u 2u
14. Solve in0 x, 15; t o given that u(x,o)=20, u(0,t)=0, u(5,t)=100. compute u for one
t x 2
time step with h=1 by crank – Nicholson method.
Solution:
1
ui , j 1 ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j
4
1 1
u1 [0 20 20 u2 ] u1 (40 u2 ).....(1)
4 4
1 1
u2 [u1 20 20 u3 ] u 2 (40 u1 u3 ).....(2)
4 4
1 1
u3 [u2 20 20 u4 ] u 3 (40 u2 u4 ).....(3)
4 4
1 1
u4 [u3 20 20 100] u 4 (140 u3 ).....(4)
4 4
form(1) 4u1-u2=40……..(5)
form(2) u1-4u2+u3=-40……..(6)
form(3) u2-4u2+u4=-40……..(7)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
166
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1
from(7)u2 4u3 (140 u3 ) 40
4
4u 2 16u3 140 u3 160
4u 2 15u3 300......(10)
1
From(4)u4 (140 25.358852)
4
=41.339712
2u 2u
15. Solve 2 10( x 2 y 2 10) over the square mesh with sides x=0,y=0,x=3,y=3 with u=0
x 2
y
on the boundary and mesh length 1 unit
Solution:
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
167
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
0+0+u2+u3-4u1=-10(15)=-150
u2+u3-4u1=-150…..(3)
U1+u4-4u2=-180…..(4)
U1+u4-4u3=-120…..(5)
U2+u3-4u4=-10(22+12+10)=-150…..(6)
We can solve the equation (3), (4), (5), (6) either by direct
Method (1)
4(u2-u3)=60
u2-u3=15------------(7)
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
168
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
u1=75
4u4=150+150; u4=75
u1=u4=75, u2=82.5,u3=67.5
Solution:
To find
yi y 1 4 , y
y 2 4 , y3 y 3 4
2
i 1 in 2 y 0 2.0625y1 y 2 0.125
2.0625y1 y 2 0.125 y 0 0 3
i 2in 2 y1 2.0625y 2 y 3 0.125 4
i 3in 2 y 2 2.0625y 3 y 4 0.125
y 2 2.0652y 3 0.875 5
3 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
169
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
3 1 -2.0625y1 y 2 0.125
4 2.0625 2.625y1 =4.253yy 2 2.0625y 3 0.2578
______________________________
-3.2539y 2 2.0625y 3 0.3828 6
_______________________________
5 3.2539 3.2539y 2 6.77112y 3 2.8472
-3.2539y 2 2.0625y 3 0.3828
_______________________________
5 y 2 2.0625y 3 0.875
2.0625 0.5301 0.875 0.2183
y1 2.0625y 2 y 3 0.125
2.0625 0.2183 0.5301 0.125
0.0451
y0 y 0 0
y1 y 1 4 0.0451
y2 y 2 4 0.2183
y3 y 3 4 0.5301
y4 y 4 4 y 1 1
v 2 v
17. Solve ,0 1, t 0 with u x,0 x 1 x 0 x 1 and u 0,t u 1, t 0 0 using
T x 2
explicit method with x=0.2 for 3 time steps.
v 2 v
Solution: Given
t x 2
2v
Here 2 1, x=0.2,=
dx2
K is not given
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
170
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
k 2 1
enplicit formula valid if 0d 1 2
h2 2
k 1
2
so choose = 1
0.2 2 2
0.04
k 0.02
2
u i , j 1 u i I, j 1 2 u i , j u i 1, j
1 2 ui j 0 1 2 ui j
1 2 u i ij u i ij
u x,0 x 1 x
u 0.2,0 0.2 1 0.2 0.16
u 0.4.0 0.4 1 04 0.24
u 0.6.0 0.6 1 0.6 0.24
u 0.8.0 0.8 1.0.8 0.16
u 1 2 u
18. Solve the equation 0 t 12 with boundary and initial conditions.
t 2 2x 2 '
u x,0 1 4 15 x , 0< 12
u 0,t 0, u 12,t a 0 t 12
using Schmidt relation
solution:
If we take h = 3, k =3, we get
k 3 1
2
h a 9.2 6
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
171
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 2 1
ui, j 1 u i 1, j u i , j u i j 1
6 3 6
u1 ,0 1 4 3 15 3 9
1
u 2 ,0 4 6 15 6 13.5
2
u 3 1 4 9 15 9 1.3.5
u 4 ,0 1 4 12 15 12 9
u0 , j 0 j=0,1,2,3,4
u4 , j 9 j=0,1,2,3,4 3
1 2 1
u,1 u, 1,0 u,0 u, 1,0
6 3 6
For i =1,2,3
1 2 1
u1 ,1 u 2 ,0 u1 ,0 u 0 ,0
6 3 6
1 1
13.5 2 3 9 0 8.25
6 6
1 2 1
u 2 ,1 u 3 ,0 u 2 ,0 u i 0
6 3 6
1 2 1
13.5 13.5 9 12.75
6 3 6
1 2 1
u 3 ,1 u 4 .0 u 3 ,0 u 2 .0
6 3 6
1 2 1
9 3.5 13.5 12.75
6 3 6
Similarly we can find the values of u at the rest of the lattice points as shown in the table.
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
172
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
1 2u
19. Solve by crank-Nicolson’s method 0 t 0, u x,0 0, u 0,t 0, u 1,t 100t.
16 x 2'
compute u for one step with h 1 4 .
Solution:
u i 1, j 1 2 2 u i , j u i 1, j+1
=-u i 1, j 2 2 u i , j u, 1, j 2
Substituting 1 in 2 we get
u i 1, j+1-4 u,j 1u, 1, j 1 u, +1,j u,+j 3
u 2 4u1 0 0 4
I, by u 3 4u 2 u1 0.0 5
100 4u u 2 0.0 6
t u1 u2 u3 100
u=100 k X
h
(0.0) u=0 u=0 u=0 u=0
0.25 0.5 0.75 1
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
173
www.vidyarthiplus.com
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
From 4 u 2 4 u , or u1 1 4 u 2 7
1
u 3 4u 2 u 2 0
4
15
u3 u2 0
4
4u 3 15u 2 0 8 4u 2 100 9
********************
VEL TECH VEL TECH MULTI TECH VEL TECH HIGH TECH
174