numerical methods and statics
TRANSCRIPT
-
8/13/2019 Numerical Methods and statics
1/27
MA2264 /MA1251 - NUMERICAL METHODS
UNIT-I
SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS
1. If a function f(x) = 0 is continuous in the interval (a, b) and if f (a) and f (b) are ofopposite signs. Then one of the root lies between a and b.
2. xa!ple of Alge!"#$ e%&"'#()" (i) x#$ 2x % & = 0' (ii) 2x#$ #x $ = 0.
#. xa!ple of T!")*$e)+e)'"l e%&"'#()" (i) x $ cosx = 0' (ii) xex2 = 0' (iii)012log10 =xx .
*. Reg&l" F"l*# Me',(+")()(
)()(
afbf
abfbafx
=
(+irst iteration of egula +alsi -ethod).
&. I'e!"'#e Me',(+" )(1 nn xx =+ .
. onvergence condition of iterative !ethod is 1)(
-
8/13/2019 Numerical Methods and statics
2/27
1&. D#"g()"ll D(#)")'" 8n nn !atrix 8 is said to be diagonall do!inant if theabsolute value of each leading diagonal ele!ent is greater than or e3ual to the su! of the
absolute values of the re!aining ele!ents in that row.
4iven sste! of e3uations is 1111 dzcybxa =++ ' 2222 dzcybxa =++ '#### dzcybxa =++ is a diagonal sste! is if 111 cba +
222 cab + ### bac +
1. G"&** "$(# Me',(+" If the given sste! of e3uation is diagonall do!inant then
( ) ( )( )nnn zcybda
x111
1
)1( 1 =+
( ) ( )( )nnn zcxad
by 222
2
)1( 1 =+
( ) ( )( )nnn ybxad
cz
###
#
)1( 1 =+
1/. G"&** Se#+el Me',(+" If the given sste! of e3uation is diagonall do!inant then
( ) ( )( )nnn zcybda
x 1111
)1( 1 =+
( ) ( )( )nnn zcxad
by 2
1
22
2
)1( 1 = ++
( ) ( )( )1#
1##
#
)1( 1 +++ = nnn ybxadc
z
1. 6ufficient condition for iterative !ethods (4auss 6eidel -ethod > 4auss 5acobi -ethod)
to convergence is the coefficient !atrix should be diagonall do!inant.
1. The iteration !ethod is a self correcting !ethod since the round off error is s!aller.
20. ?h 4auss 6eidel iteration is a !ethod of successive corrections@
8ns" 9ecause we replace approxi!ations b corresponding new ones as soon the latter
have been co!puted.
21. o!pare G"&** El##)"'#() Me',(+and G"&** (!+") Me',(+
-
8/13/2019 Numerical Methods and statics
3/27
22. I)e!*e ( " M"'!#7" Aet 8 be an nn nonsingular !atrix. If B is the inverse of the!atrix 8 then 8B = I (i.e.) B = I 81. ?e start with aug!ented !atrix of 8 with identit!atrix I of the sa!e order and convert 8 into the re3uired for! (i.e.) identit then the
inverse is for!ed. 78 C I : 7I C 81:.
2#. o!pare G"&** El##)"'#() Me',(+and G"&** Se#+el Me',(+.
4auss li!ination -ethod 4auss 5ordan -ethod
1. Direct -ethod
2. oefficient !atrix is
transfor!ed into uppertriangular !atrix.
#. ?e obtain the solution
b bac; substitution!ethod.
1. Direct -ethod
2. oefficient !atrix is transfor!ed
into diagonal !atrix.#. Eo need of bac; substitution
!ethod. 6ince finall this sste!
of e3uation each has onl oneun;nown.
4auss li!ination -ethod 4auss 6eidel -ethod
1. Direct -ethod2. It has the advantage that it is finite
and wor;s in theor for an non
singular set of e3uation.#. ?e obtain exact value.
1. Indirect -ethod2. It converges onl for
diagonall
do!inant.
#. 8pproxi!ate value
which is self correct!ethod.
-
8/13/2019 Numerical Methods and statics
4/27
2*. o!pare G"&** "$(#and G"&** Se#+el Me',(+*.
2&. ?h G"&** Se#+el e',(+is better !ethod than "$(#0* e',(+@8ns" 6ince the current value of the un;nowns at each stage of iteration are used in
proceeding to the next stage of iteration, the convergence in 4auss 6eidel !ethod will be
!ore rapid than in 4auss 5acobi !ethod.
UNIT-II
INTERPOLATION AND APPRO8IMATION
2. xplain briefl I)'e!(l"'#(). 8ns" Interpolation is the process of co!puting the values of a function for an value of
the independent variable within an interval for which so!e values are given.
2/. Definition of I)'e!(l"'#()and e7'!"(l"'#()9
4auss 5acobi -ethod 4auss 6eidel -ethod
1. Indirect -ethod
2. onvergence rate is slow.#. ondition for convergence is
diagonall do!inant.
1. Indirect -ethod
2. The rate of convergence of this !ethod isroughl twice that of 5acobi.
#. ondition for convergence is diagonall
do!inant.
-
8/13/2019 Numerical Methods and statics
5/27
8ns" I)'e!(l"'#()" It is the process of finding the inter!ediate values of a function fro!
a set of its values specific points given in a tabulated for!. The process of
co!puting corresponding to x 1,...2,1,0,1 =< 0 then the process is called extrapolation.
2. 6tate Ne.'()0* F(!."!+ #)'e!(l"'#()for!ula.
h
xxuwherey
n
nuuuu
yuuu
yuu
yu
yxyuh
n 00
0
#
0
2
000
F
))1()...(2)(1(...
....F#
)2)(1(
F2
)1(
F1)()=(x"8ns
=
+
+
+
++==+
2. 6tate Ne.'()0* B"$;."!+ #)'e!(l"'#()for!ula.
h
xxpwherey
n
npppp
yppp
ypp
yp
yxyph
nn
n
nnnn
=
++++
+++
++
++==+
F
))1()...(2)(1(...
....F#
)2)(1(
F2
)1(
F1)()=(x"8ns #2n
#0. rror in Ne.'()0* (!."!+"
n
n xxwherefn
nuuuuAns
-
8/13/2019 Numerical Methods and statics
6/27
=01
01
01
01
x
):g(x)7g(x
x
):f(x)7f(x
xx
= f(x) g(x).
#&. Divided difference table"
B G G 2 G #G
B0
B1
B2
B#
G0
G1
G2
G#
),(
)()(
10
01
01
xxf
xx
xfxf
=
),(
)()(
21
12
12
xxf
xx
xfxf
=
),(
)()(
#2
2#
2#
xxfxx
xfxf
=
),,(
),(),(
210
02
1021
xxxf
xx
xxfxxf
=
),,(
,(),(
#21
1#
21#2
xxxf
xx
xxfxxf
=
),,,(
,,(),,(
#210
0#
210#21
xxxxf
xx
xxxfxxxf
=
#. ?rite L"g!")g#")0* (l)(#"l (!&l".
n
nnnnnn
n
n
n
n
n
yxxxxxxxxxx
xxxxxxxxxx
yxxxxxxxx
xxxxxxxxy
xxxxxxxx
xxxxxxxxyAns
))...()()()((
))...()()()((...
...))...()()((
))...()()((
))...()()((
))...()()(("
1#210
1#210
1
1#12101
#200
0#02010
#21
+
+
+
=
#&. ?hat is the assu!ption we !a;e when Aagrange
-
8/13/2019 Numerical Methods and statics
7/27
8ns" Aet ( ))(, ii xfx , i = 0, 1, 2... n be the given (n %1) pairs of a data. The third ordercurves e!ploed to connect each pair of data points are called cubic splines. () 8
s!ooth polno!ial curve is ;nown as cubic spline.8 cubic spline function f(x) w.r.t. the points x0, x1, .....xn is a polno!ial of
degree three in each interval (xi1,xi) i = 1, 2, ...n such that )(xf , )(xf and )(xf are continuous.
#. ?rite down the for!ula of C$ Sl#)e.
( )[ ]
iiiii
iiiiiii
xxxMh
yxxh
Mh
yxxh
MxxMxxh
xyAns
+
++=
1
2
1
1
2
1
#
11
#
'
)(1
)(
1)(
1)("
and [ ] )1....(#,2,12
* 11211 =+=++ ++ niforyyyhMMM iiiiii
where - = y ()
=+++
+
++++
i
ii
i
iiiiiiiii
h
ff
h
ffahahhah 1
1
11111 )(2 where 1= iii xxh
and ii yf = ' i = 1,2,#,....
UNIT < III
NUMERICAL DIFFERENTIATION AND INTEGRATION
#. Derivatives of G based on Ne.'()0* (!."!+ #)'e!(l"'#() (!&l""
( ) ( ) ( )
( )
++++
+++++
=
........2*10010&*0&
F&
1
221*F*
12#
F#
112
F2
1
1
0
&2#*
0
*2#
0
#2
0
2
0
yuuuu
yuuuyuuyuy
hdx
dy
-
8/13/2019 Numerical Methods and statics
8/27
( ) ( )
+++++++
= ........102112212
1
11112
1
)1(1 0&2#
0
*2
0
#
0
2
22
2
yuuuyuuyuyhdx
yd
( ) ( )
+++++= ......../2*
1
#22
1
#1 0
&2
0
*
0
#
#
#
yuuyuyhdx
yd whereh
xxu 0
=
If 0xx = then u = 0
+++=
=
.....&
1
*
1
#
1
2
11 0
&
0
*
0
#
0
2
0
0
yyyyy
hdx
dy
xx
-
8/13/2019 Numerical Methods and statics
9/27
++=
=
........
(
&
12
111 0
&
0
*
0
#
0
2
22
2
0
yyyy
hdx
yd
xx
++=
=
........*
/
2
#
1 0
&
0
*
0
#
##
#
0
yyyhdx
ydxx
*0. Derivatives of G based on Ne.'()0* "$;."!+ #)'e!(l"'#() (!&l""
( ) ( ) ( )
( )
++++++
+++++++++
=
........2*10010&*0&F&
1
221*F*
12#
F#
112
F2
1
1
&2#*
*2##22
n
nnnn
ypppp
ypppyppypy
hdx
dy
-
8/13/2019 Numerical Methods and statics
10/27
( ) ( )
+++++++++++
= ........102112212
1
11112
1
)1(1
&2#*2#2
22
2
nnnn yuupyppypyhdx
yd
( ) ( )
+++++++= ......../2*
1
#22
1
#
1
&2*#
#
#
nnn yppypyhdx
yd whereh
xxp n
=
If nxx= then p = 0
+++++=
=
.....&
1
*
1
#
1
2
11
&*#2
nnnnn
xx
yyyyy
hdx
dy
n
-
8/13/2019 Numerical Methods and statics
11/27
++++=
=
........
(
&
12
111
&*#2
22
2
nnnn
xx
yyyy
hdx
yd
n
+++=
=
........*
/
2
#
#1
&*#
#
#
nnn
xx
yyyhdx
yd
n
*1. ?hat are the two tpes of errors involving in the nu!erical co!putation ofderivatives@
8ns" (i) Truncation error' (ii) ounding error (To produce exact result is rounded tothe nu!ber of digits).
*2. Define the error of approxi!ation.
8ns" The approxi!ation !a further deteriorate as the order of derivative increases.The 3uantit (r)= f(r)(x) $ H( r )n(x) is called the error of approxi!ate in the r
thorder
derivative. ?here f(x) is the given e3uation and H(x) is approxi!ate values of f(x).
*#. To find M"7#" and M#)#" of a tabulated function"
Aet = f(x)
+inddx
dyand e3uate to ero. 8nd solving for x.
+ind2
2
dx
yd' If
2
2
dx
ydat x is $ve has !axi!u! at that point x.
-
8/13/2019 Numerical Methods and statics
12/27
If2
2
dx
ydat x is %ve has !ini!u! at that point x.
?e
-
8/13/2019 Numerical Methods and statics
13/27
*. S#*()0* ()e-',#!+ !&le"
rule
#
1
( ) ( ) ( )[ ]( ) ( )( )
+
+=
+++++++=
ordinatesevenofSum
ordinatesoddremainingofSumordinateslastandtheofSumh
yyyyyyh
dxxf
st
n
x
x
n
*
21
#
....*...2#)(#1*20
0
*. S#*()0* ',!ee e#g,', !&le"
rule
#
( ) ( ) ( )[ ]....*...#
#)( #*210
0
++++++++++= yyyyyyyyyh
dxxfn
x
x
n
&0. rror in S#*()0* ()e-',#!+ !&le"
{ },.....,!ax> LLL2LLL0 yyMn
abhwhere =
=
&1. The error in S#*()0* O)e ',#!+ !&leis of (!+e! *h .
&2. ?hen does S#*()0* !&legive exact result@8ns" Holno!ials of degree 2 .
. ?hen is T!"e=(#+"l !&leapplicable@8ns" +or an intervals.
&*. ?hen is S#*()0*#
1!&leapplicable@
Mhab
E10
)( *
-
8/13/2019 Numerical Methods and statics
14/27
8ns" ?hen there even no. of intervals.
&&. ?hen is S#*()0*
#!&leapplicable@
8ns" ?hen the intervals are in !ultiples of three.
&9 R(e!g0* Me',(+" =b
a
dxxfI )(
+=#
122
IIII
&/. 6tate R(e!g0* e',(+ #)'eg!"'#() (!&l"to find the value of =b
a
dxxfI )(
using2
handh .
&. 6tate T.( P(#)' G"&**#") Q&"+!"'&!e (!&l":
8ns"
+
==
#
1
#
1)(
1
1
ffdxxfI
&. 6tate T,!ee P(#)' G"&**#") Q&"+!"'&!e (!&l":
8ns"
( )
++
==
&
#
&0
&
#
&)(
1
1
fffdxxfI
0. I) G"&**#")0* Q&"+!"'&!e" If the li!it is fro! a to b then we shall appl a suitable
change of variable to bring the integration fro! 1 to 1
( ) ( )
dtab
dxabtab
xPut2
'2
=++= 9
=
+=
hh
hh
h II
II
Ih
hIAns2
2
2
*#
1
#2,"
-
8/13/2019 Numerical Methods and statics
15/27
1. 6tate T!"e=(+#"l (!&l" (! D(&le I)'eg!"l*:
( )dxdyyxfId
c
b
a= ,
( )
( )
( )
+
+=
nodeseriortheatfofvaluestheofSum
boundarytheonnodesremainingtheatfofvaluestheofSum
cornersfourtheatfofvaluesofSumhk
I
int*
2*
2. 6tate S#*()0* !&le (! D(&le I)'eg!"l*:
( )dxdyyxfId
c
b
a
= ,
( )( )( )( )
( )( )( )
++
+
+
+
+
=
matrixtheofroweventheonpositionseventheatfofvaluestheofSum
positionsoddtheatfofvaluestheofSum
matrixtheofrowoddtheon
positionseventheatfofvaluestheofSum
positionsoddtheatfofvaluestheofSum
boundarytheonpositionseventheatfofvaluestheofSum
boundarytheonpositionsoddtheatfofvaluestheofSum
cornersfourtheatfofvaluesofSum
hkI
1(
*
*
2
-
8/13/2019 Numerical Methods and statics
16/27
#. ?h is Trapeoidal rule so called@
8ns" 9ecause it approxi!ates the integral b the su! of the areas of n trapeoids.
*. o!pare Trapeoidal rule and 6i!pson
-
8/13/2019 Numerical Methods and statics
17/27
8 !ethod that uses values fro! !ore than one preceding step is called
!ultistep !ethod.
/. 6tate T"l(! *e!#e* (!&l""
0L
0
*LLL
0
#LL0
2L01 .......
F*F#F2F1)( xxhwherey
hy
hy
hy
hyxy v =++++==
. ?hat are the !erits and de!erits of Talor
-
8/13/2019 Numerical Methods and statics
18/27
( )
( )#*
2#
12
1
,2
,
2
2,
2
,
kyhxhfk
ky
hxhfk
ky
hxhfk
yxhfk
nn
nn
nn
nn
++=
++=
++=
=
/2. 6tate F(&!', O!+e! R&)ge-@&''" Me',(+ (!&l""(for +irst order 6i!ultaneous
differential e3uations)
Aet ( ) ( )zyxfdx
dzandzyxf
dx
dy,,,, 21 ==
yyy nn +=+1 > zzz nn +=+1
?here ( )*#21 22
1kkkky +++= and ?here ( )*#21 22
1llllz +++=
( )
( )#1*
21#
112
11
,
2,2
2,
2
,
kyhxhfk
ky
hxhfk
ky
hxhfk
yxhfk
nn
nn
nn
nn
++=
++=
++=
=
( )
( )#2*
22#
122
21
,
2,2
2,
2
,
kyhxhfl
ky
hxhfl
ky
hxhfl
yxhfl
nn
nn
nn
nn
++=
++=
++=
=
/#. 6tate F(&!', O!+e! R&)ge-@&''" Me',(+ (!&l""(for second order differential
e3uations)
Aet ( ) ( )zyxfdx
dz
dx
ydandzzyxf
dx
dy,,,, 22
2
1 ====
yyy nn +=+1
?here ( )*#21 22
1kkkky +++= and ?here ( )*#21 22
1llllz +++=
-
8/13/2019 Numerical Methods and statics
19/27
( )
( )#1*
21#
112
11
,2
,
2
2,
2
,
kyhxhfk
ky
hxhfk
ky
hxhfk
yxhfk
nn
nn
nn
nn
++=
++=
++=
=
( )
( )#2*
22#
122
21
,2
,
2
2,
2
,
kyhxhfl
ky
hxhfl
ky
hxhfl
yxhfl
nn
nn
nn
nn
++=
++=
++=
=
/*. uler
-
8/13/2019 Numerical Methods and statics
20/27
/. 8da!
-
8/13/2019 Numerical Methods and statics
21/27
&. ?h ungePutta for!ula is called fourth order@
8ns" The fourth order ungePutta !ethod agree with Talor series solution up to
the ter!s of h*. Nence it is called fourth order .P. !ethod.
. E!!(!" 7M#l)e0* P!e+#$'(!
)(*&
1* )&(1
& = nyhE where 1# + nn xx
M#l)e0* C(!!e$'(!
)(01 )&(1&
= nyhE where 11 + nn xx
/. R(&)+ ( e!!(!: ?hen we are wor;ing with deci!al nu!bers. ?e approxi!ate thedeci!als to the re3uired degree of accurac. The error due to
these approxi!ations is called round off error.
T!&)$"'#() e!!(!: The error caused b using approxi!ate for!ula in co!putationsis ;nown as truncation error.
. E!!(!: A+"0* P!e+#$'(!
( ) 1#)&(&
/20
2&1+ = nn xxwhereyhE
E!!(!: A+"0* C(!!e$'(!
( ) 12)&(&
/20
1+
= nn xxwhereyhE
. o!pare the -ilne
-
8/13/2019 Numerical Methods and statics
22/27
2. It does not have the sa!e
instabilit proble!s asthe -ilne !ethod.
2. 9ut is about as efficient.
#. 8 !odification of8da! AND PARTIAL
DIFFERENTIAL EQUATIONS
0. Define B(&)+"! "l&e !(le. 8ns" ?hen the differential e3uation is to be solved satisfing the conditions
specified at the end points of an interval the proble! is called boundar valueproble!.
1. Define D#e!e)$e Q&('#e)'*
8ns" 8 difference 3uotient is the 3uotient obtained b dividing the differencebetween two values of a function b the difference between two corresponding
values of the independent variable. ( )11L
2
1+ = iii yy
hy
2. F#)#'e D#e!e)$e Me',(+*"
( )11L
2
1+ = iii yy
hy
( )112LL
21
+ += iiii yyyh
y
#. lassification of Hartial Differential 3uations of the 6econd rder
0,,,,2
22
2
2
=
+
+
+
y
u
x
uuyxf
y
uC
yx
u
x
uA
(i) If 0*2 AC then the e3uation is Nperbolic.
-
8/13/2019 Numerical Methods and statics
23/27
(iii) If 0*2 = AC then the e3uation is Harabolic.
*. Be)+e!-S$,#+'0* D#e!e)$e E%&"'#()" (xplicit -ethod)2
22
x
u
t
u
=
1, +!iu
!iu ,1 !iu , !iu ,1+
()
!iu ,1 !iu , !iu ,1+
1, +!iu
2,1,,11, )21(ahk"hereuuuu !i!i!i!i =++= ++ and 21
=a
Be)+e!-S$,#+'0* D#e!e)$e E%&"'#()
If then2
1=
( )!i!i!i uuu ,1,11, 21 ++ +=
This is valid onl if2
2h
ak=
-
8/13/2019 Numerical Methods and statics
24/27
&. C!");-N#$,(l*()0* D#e!e)$e E%&"'#()" 7I!plicit -ethod:2
22
x
u
t
u
=
( ) ( ) !i!i!i!i!i!i
uuuuuu,1,1,1,1,11,1
1212 +++++ +=++
?here 2ah
k= and 2
1
=a
C!");-N#$,(l*()0* D#e!e)$e E%&"'#()?hen 1= (i.e.) 2ahk= the ran;Eicholson
-
8/13/2019 Numerical Methods and statics
25/27
100. 6tate the explicit sche!e for!ula for the solution of the wave e3uation.
8ns" The for!ula to solve nu!ericall the wave e3uation ttxx uua =2
is
( ) ( ) ,,1,122
,
22
1, 12 ++ ++= !i!i!i!i!i uuuauau
?hena
hkei
h
k
a=== ).(
12
2
2
2
The wave e3uation is
1, !iu
and2
0)0,( 0,10,11, + +== iiit uuuxu !iu ,1 !iu , !iu ,1+
1, +!iu
101. Define the local truncation error.
8ns" =E( )
+
+ ++i
ii
ii
iii yh
yyfy
h
yyy
2
2 112
11
102. 6tate finite difference approxi!ation for2
2
dxyd and state the order of truncation
error.
8ns" =iy ( )
2
11 2
h
yyy iii + + and the order of truncation error is (h2).
10#. +orward +inite difference for!ula"
h
yxuyhxuyxux
),(),()( 00000,0
+=
k
yxukyxuyxuy
),(),()( 00000,0
+=
Truncation error is ( ) hxxwhereyuh
xx + 000,2
,,1,11, ++ +=
!i!i!i!i uuuu
-
8/13/2019 Numerical Methods and statics
26/27
10*. 9ac;ward +inite difference for!ula"h
yhxuyxuyxux
),(),()( 00000,0
=
k
kyxuyxuyxuy
),(),()( 00000,0
=
Truncation error is ( ) hxxwhereyuh
xx + 000,2
10&. 6econd order finite difference for!ulae"
( ) ( ) ( )2
0000000000
0,0
,,2,),(),()(
h
yhxuyxuyhxu
h
yxuyhxuyxu xxxx
++=
+=
( ) ( ) ( )2
0000000000
0,0
,,2,),(),()(
k
kyxuyxukyxu
k
yxukyxuyxu
yy
yy
++=
+=
Truncation error is ( ) hxhxwhereyuh
xxxx + 0002
,12
10. Ea!e at least two nu!erical !ethods that are used to solve one di!ensional
diffusion e3uation.
8ns' (i) 9ender6ch!idt -ethod (ii) ran;Eicholson -ethod.
10/. 6tate standard five point for!ula for solving uxx% u = 0.
8ns"
10. 6tate diagonal five point for!ula for solving uxx% u = 0.
8ns"10. ?rite down one di!ensional wave e3uation and its boundar conditions.
8ns"2
22
2
2
x
u
t
u
=
9oundar conditions are
(i) u(0,t) = 0(ii) u(l, t) = 0 0t
(iii) u(x,0) = f(x), 0QxQl
(iv) ut(x,0) = 0, 0QxQl
110. 6tate the explicit for!ula for the one di!ensional wave e3uation with
m
#aand
h
kwherea === 222 01 .
8ns"
!i!i!i!i!i uuuuu ,1,1,,1,1 *=+++ ++
!i!i!i!i uuuu 1,11,11,11,1 *=+++
++++
,,1,11, ++ +=
!i!i!i!i uuuu
-
8/13/2019 Numerical Methods and statics
27/27
111. ?rite down the finite difference for! of the e3uation ),(2 yxfu= 8ns"
112. ?rite Aaplace