Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Binary: Difference

Download as pdf or txt
Download as pdf or txt
You are on page 1of 154

fit round

① off, Decimal to binary


② Lagrange interpolation
Newton's Divided Difference Interpolation
i Newton's

Forward Difference
Interpolation
(iii)Neaton's Backward
Difference Interpolation
⑰stirling's interpolation a formula
⑤ Divided Diff for equal
arguments
M
⑥ Homite-Gennochi in

⑦ Frro in Interpolation
⑧ For in Newton's Backward Int

⑨ 'F'operator
⑩ Spline Interpolation
ii. Line
spine (ii) owadric spline (ii) abir spline
⑪Bisection method
⑫ fixed pointIteration method I torem
4/1123

cass-1
-
MA-LO4
linear non linear
Interpolation, solution of

finite difference

(x,y)
&

(3, y07
·

H.W
-

construct
family of polynomies (degs)
masingthrough (20,y0)*(c),y,)

Theorem:

Given of data points


a set (91.78, (1,2, ...
(n.
yn)}
there exista unique
polynomial in of degree atmost n

↳roof: ((,y,)
R

-a
P,,.,y0 in,yn)
Prove or unique desists. (In)

Let Pn() =

a0 a,7 9p5 ..
+
+

+
..
.
+

apxR

190,....9pCR
so that

Pn(((s) y.
=
Ph(6) 30

oncipter on 3
=

↑ vA
y
=

This theexistences a uniques of Pr


A
vly
=

gives
inoness:Letthere exist in of degree in

St.PrG(n) 2n((r) y0
=

-> R Pr.Qn
Pr
=

then-e
I
Note that, R((,) 0 v i
40,...n)
=

Q degra PLr,
=

R ⑭1) roots
using
thm of
deg, R0
pn=ar

M g(7

(y,y,) detv
R G(0 ,)G(z 73)...G(n-"nt)

↓ I
= -
-


O
0.0001 X
(((0/70) inious
(may yet)
0
=

*
Byroundup.
Fill
given a passes through. How tomake error
small?

For in interpolation

ir
Suppose is the
given function
& is the
interpolating poly of degree n

*A(n(70) -> 0
f((0) 90
=
=


Pr((p) f(x))y,
=

pn(in) f(x) yn -
=
=

to
we want estimate the error (I 5(7)-Pn(x)

From D
-

( 1)
+

f(((i) f())) in(()


= -

So lar
E (n roots we can sorise

F()) 2TGRR), where (-7(8)(-1)). yen )


HP))
=
. ...

=
'st. ECY:LTn+4') coKL
we want to
find

Define, G(x):E(z) hHn+


xc|cz(n
=

x G(x(j) E((i) 2 n+ ()
=

find E(?
G'(1)0) =

0 q((x) f(x)
=

So a 'has n I rook

G(z) E(2)=
-

2+(2):f(2) Pr(7-2+p*)
-

Ginty-f**k- 0 -

c(N))!

8"(z
=

-
(+1!
cass-2 611123

Reference book
Kandall I. Adkinssen and editions
Numerical
analysis by

An introduction to

F. R. Hildebrand can
② Introduction to numerical
edition)
/
by
Oafternote on
start,
homonareactions By
GW

Burden erase

④ Round off, shopping?


⑬ .

floating pointrepresentation floating pointArithmatic ?

⑦ Absolute, Relatives
parentage
a
error.?

interpolution
·(x,5,).
((,y0)
X
- ...

(in,yn)
->
A PnG)

- y/
I
5(1) 0n() is erron E(x)
pp(x) E(a5
=

f(c))
-
-

a((t) f(t) pp(t) 1πn+ (t)


- -

(+ xi)
#n(t) i
-
=

0
=

L f(x)) F(x))
= -

πn (( +
G(x(j) f((i)
= -

Pn(xi) - 2 m 1((i)
+

0
=
-
0 =

89(1)
fond op
3/()) 0 =
=
-

pp() -

I o

: a 'he (All roots (10,..... (n 2x)

=> ain" has at least

G(n 1)
+

=>

finDai),
ECE RR
I
The, 402, e

(n)
findly, since
artitary
(" Pi, irl is (a so....

h (1)8(3), F(10,3n]
=
getE(M x
=

was +

(n 1)!
-

Remar fis the in [C,n] used to


obtain error estimate.
04 January 2023 10:52

New Section 1 Page 1


New Section 1 Page 2
New Section 1 Page 3
New Section 1 Page 4
New Section 1 Page 5
New Section 1 Page 6
New Section 1 Page 7
New Section 1 Page 8
New Section 1 Page 9
New Section 1 Page 10
New Section 1 Page 11
New Section 1 Page 12
New Section 1 Page 13
New Section 1 Page 14
New Section 1 Page 15
New Section 1 Page 16
New Section 1 Page 17
New Section 1 Page 18
New Section 1 Page 19
New Section 1 Page 20
New Section 1 Page 21
New Section 1 Page 22
New Section 1 Page 23
New Section 1 Page 24
·y(a) 2,y(8):d
=

y((a) 3,y(b) d
=
=

y(a) e,y()b):d
=

y((a) e,y((0) d
=
=

boundary
solve the valve
problem defined by
y" y 1 0,01x1), wRey10) 2yCD=>
=

x + =
0

so
-

(f(z)
"
y y 1 0,01111,5+y(1070,y(170
+
+
=

For nz,
finely (')
y, - zy;+yi+1
1
y;
+
+
0
=

h2

i
4(y, 295 y,) y0 +1
=
0: +

0
- + =

=>
4(y., 2y0 y,) y0 1 0 x
2y 8y, #1 0(=y., y)
=
= - + =
+
- + + =

i
14(y5 2y, yz) y
=
-
+ +
Preparation section

Topics
V
Branchise
-

Definitions
1

Results
1
Practice
-
Cheat sheet
&

Presentation
blob:https://web.whatsapp.com/255ffa23-d893-4abf-8b83-da51c1ee2243 09/01/23, 12:02 PM

Indian Institute of Technology Indore


MA204 Numerical methods
(Spring Semester 2023)
Tutorial Sheet 1
1. (a) Compute the absolute and relative erros with approximating a by a∗ where
(i) a = 0.7000 × 10 and a∗ = 0.7100 × 10.
(ii) a = 0.7000 × 10−3 and a∗ = 0.7100 × 10−3 .
(iii) a = 0.7000 × 104 and a∗ = 0.7100 × 104 .
(b) Determine
√ the five digit (a) chopping and (b) rounding values of the irrational number
2.
(c) Using five digit chopping, calculate x + y, x − y, x × y, xy , where x = 57 , y = 13 .
(d) Perform the following computations (i) exactly, (ii) using three digit chopping arith-
metic, and (iii) using three digit rounding aithmetic. (iv) Compute the relative errors
in parts (ii) and (iii).
(A) 4
5 + 13 .
(B) 4
5 · 13
(e) Let p = 0.54617 and q = 0.54601. Use four digit arithmetic to approximate p − q and
determine the absolute and relative errors, using rounding.
(f) Evaluate f (x) = x3 − 6.1x2 + 3.2x + 1.5 at x = 4.71 using three digit arithmetic.
2. (a) Find the decimal number corresponding to the binary number (1101.011)2 .
(b) Convert (86)10 to binary no.
(c) Convert (0.943216)10 to the binary fraction.
(d) Convert (0.7)10 to the binary fraction.
(e) Convert (0.3)10 to the binary fraction.
(f) Find the sum of 0.123 × 103 and 0.456 × 102 and write the results in the three digit
mantissa form.
3. Show that the bounds of the relative error for the floating point representation (t digits)
fl(y) of a real number y are given by
|y − f l(y)|
≤ β t−1 for chopping
|y|
and
|y − f l(y)| 1
≤ β t−1 for rounding.
|y| 2
4. Obtain the Taylor’s series approximations of orders 0 to 3 for the function f (x) = x3 −
3x2 + 5x − 10 and figure out which order of approximation gives the exact results.
5. Using Vandermonde matrix, find the polynomial of degree 2 interpolating a function f for
the following data:
(x, f (x)) : (−1, 1), (2, −4), (4, 4).
Can you get any other polynomial of degree less than or equal to 2 interpolating the above
set of data? Explain accordingly.
6. If P (x) is a polynomial of degree ≤ 9 that interpolates f (x) = sin x at 10 points in [0, 1],
then what is the greatest possible error of this interpolation?

blob:https://web.whatsapp.com/255ffa23-d893-4abf-8b83-da51c1ee2243 1
Gut -
1 -
solutions (1)1/25
Pinki-Phd20001141004 citiae in


Said-Phd 2101241003 diiti.ar.in
(a)

(ii) a
a*

absolute error-la*al =
0.1
1
relative
a:
error-la 1429x15-

a 07000x10=
a* 0.7100x10
=

& 0.d,drds.....dkdk+) x104

01d,29
v 1.4142135 =

chopping: 1.4.42
1.4142

rounding:
(x
z1y z
=

0.74428571 0.33333
x
y
=

fl(x) 0.71428f(y) 0.33333


=

(+
y
=

f)(f(x f(y)) +

f((1047627
=

10476
=

(d)
5
A
y
=

=
+

1, 3
I
0800
1 0.333
I1
=
=
= +

If
=

1.13
coolinyou
adatives

see

=0002938 0.2938x52
=

0.294 402.
rounding
=

chopping =0.293.4152

f) f(x) ((3 =
- 6.1252 3.2x
+ 1.5
+

x 4.7)
chopping rounding
=

x
=
22.184) 2x2) 22.1
=

x2
222

(3 104.487)=
74 104 =
x 104
=

6.17(2:135.3250) 6.172135 =
6172135

327 15072
=

32x 15.0
=

327 15.1
=

poundifnotmento
8(4.1) one
144
=

2. @ (1101.01.2

= (x23 (X( 0
+
+
2 1X(8 0x2 +
+ +
+

(xz
1
1x2)
+

1 0.25 0.125 13.,575


= 8 4 +
+ +
+

0.500
05
13.395
⑫5
= -

12.875.
=

o

= (10101102
250
2!
② 0.943216x2:18864321/
0886432x2:1.772864/1
0.77286442: 1.54572811
0.545728x2:109145671
0.091455x2 0.18291210
=

0.182912x2 = 0.36582410
0.365824x2 =0.73164810

He we
get 1000000

#B:(0.11110001011101100l2

Ad++1 x102
3
y 0d,d2d3....
=

hopping ->
fly):0.a,d2dy.... d
relative
oro=bl1z) 10d,d uds-..d 0.
=

d ,d 2...d +4,0) + 0++1x108


-

0.d,d2d3.... dAdE+ X100

72x 1
re
:A
(New)=11Mindenomone at
mans

R. E

off-fly)=
o.ddras... at lens
round d++1 -ca -1
(5

... .

1,d++,25
(A
-

1)
For case-

1
410t x

f(y))
y 0.98 +1072.
... .

0.d,92 -....d x10 +

REL-y0
=
2(t)
for ce-2

x0- **
188(8)) 10077652
= 0.
1 x
10

0.d,d.....

(t)
t

ox,0
=

fl* - rounding, th (89) ->


chopping.
④ Taylor's series
-- function a 0 ir
=

yla series
15(() 15'(a) 1nfM(a)
atpea,f(a) f(a) -------
=
+
---
+
+

I
↳ n!
Jayfor seria order I

f(x) ((3 3752 5x 16 5(0) 10


= - +
- -
=

f'(x) 37267/75
=

f (10) 5
=

f (G2) 67 6 5/(0) 6
=
= - -

8 "(x) f("((0) 6
=

= ↓

order =0

f()) f(0) 0(x)


= +
= -

10 orda=3
order: I f(7)) 7(3 37(75x
=

-
- 10 0(4)
+

((3 3752 15x 10


-(7)) 5x =
-
10
0(12)
+
n -
+ -

order=2 I 15

5(x = - 3772757 - 10 0(13)


+

ondomonde matric

162 (4 8 (0,,... (r
!
-
1/6
.

x, x,2 1),n are distinct

iii.incin det=0
=>

(n 1)X(n 1)
+
+

jj, 4
2

·
4 4
-


&

· 3pts
-

make a
deg poly interpolates
=> 90 9,7) 92)2
f(x) =
+

1
+


1

I
f( 1) 1
-

2 =

90 a, a2 1
- +
=

7(27
original fee. 4
=

->
-

&I
notknown. 10 29, +492 =
4
+ -

f(4) 4 =

90 49,
+
1692 4
=
+

5 Ta
-

[t
1 -
1 1
-
12 4

... -
92 4
1

↑ 3 [E
i

90
=

q,

-
af
=

44/15
-

90
:
a, =

-
14/15
92 17/15
⑥ ph)) -

depres 19
5(1):Linx
stotal ions.
"10,(4,4,..... ((q
=>
( [o,] 1p0- himc ) =
?

(pp(x) 59)))
fps. ."1-(i)
Fero =
-
=

soci:E, between 1,,,..... (n (a,b)


-

10, 4D-Sine1
7"14 e
=

!1- about 9.p())


=
-+
1
to!
=
Tut-2 solutions 1811123

1) x sinx
10 · o

I
0.1071/
x,

⑰ 1
72

sin
I
Pp()) 20(7)f(70)
=
+

2(7))f(x),) (n(1)-5(10) +

20(7) (x x,)G( 72). ((


xp)
-
=
-
-
-
-

((7 -

7.)(70 72)
-
-...
-

(( -

xp)

Px) ((-),)(x 72)f410) 1)(HD) f()


of ***)
+
= - +

((( )),)(((0
-
-

72) ((4
-
70)5T11 74) -

h(y) (F Ep)(F ) (F 0)(F ) X00711 E 0)(F E)


-

10 +
-
- - -
+

)() (t 3)(I E)
-
1
(- B)(I-I)
- -
-

0.51743
=

② f[(0,7,] f(x))) f(40) =


-

x( -
7/8

f [(0, 3,12] fl0,32] f[010/T]


-
=

yy -
x0

P->Devoided difference polynomial


Divided difference cable

4
f(x) f[(,5D,yf[xi,xi 1,pi 2] + +

40 - 1
3
-

21 O -
6 b

15 5

12 3 29 41 A
26/ 13

↓ 822 132
23
789
7 16/1
24

Ph(s) f(x) ((7/0)f[110] 710 p]f[


-

= +

3 (( 1( 9) (x 1(x 06 ( 1(x 0)(7) ((1)(x 0)(9 37(56) x)


=

3)4 5
+ - +
+ -
+ +
-
+
- +
-
-

(4
=

-
373 572 6
+
-


f(cta,b]
· is nth time differentiable in (a,b) on f" on [a,o]
is continuous

(0,7,p)2...... (pt [a,b

prove:e
to f
(a,b)
f[20,x,,.......c(nT
nes
=

3+
Rolles theorem

1.
5 is continuous in [a,b)

2. 5 is differentiable in (a,b)

3.5(a) f(b) =

Then I(t(a,b) <t f'(0) = 0

PnG0
gx) fGD
= -

700,(7,42.... (R f(i) PrG)i), =


i =

.... n
0,

n
g((i):0, i =
0,......
=> atleast nt zeroes.

=>
770,7, g((0) g(,) 0
=
=

(((u,X,)
(ot
g((0)
5+ 0
=

(,,72,g(),)=g4(2) 0
=

2,G(0,4(2) 5
g12.50
+

F
((n 1,pp
-

(n- (n -1))(n)( g(((n 1)


+

0
=

-
g"(9) 0,2 (a,b)
=
-

E, 2n
92 -
2

(n
i,
·

1
z
-

(o

7/0 is
1

x2 is in

gYGx) fYx() =
-

"x(gx)
p 5(3)
= -

PnG)

p" nM =

Pr(x) f(40) ( 70)ft


=
+
-

......
+
(7 -

75)(x xp....((-()f[x0,...
-

[n]
+
(x1 -

*7ft(10....(n]
((5L7313n] -
*

= n(n-). ...
2.1 f(76..... (n]

5 (E)
=
n! 5tes,... (n) =

55,y,...((n)
n9)
... =

④ +[ (0,,,. . . .
.

kn]

n 1
f((0,X,] f(c),) 5(7()
=
-
=

4, 7/G
-

ff10) h)
= +

① some with

different order of argument.


55x,,.]
(() 5ke
=
+
i

n xf((0,,,,....c,z]
=

f(()
=
f(x,)
+

(0 -

73)((6 792) -...(7)0-742)(7,73743, -7(2) ....(7), )k)


-
-

.......
G(k)
+

(x(( 70)(7k x,)


-
-
--.
...

(7,1 7,2 1)
-
-

f(x,x,-....4k,4k+ 1] ft(,,2,..... ((2+]-5[cop,...... ((R]


=

xk 1
+
-
10

it ... cD -........splT....((,)
-> f((z)

GRs) ...
scCTR

)]
1

-jfe...002 (x) k)
+
+....

pG.GI) (120) ...

(a-

anoling on (aner!.....actusmedies.... ***


(**)


(iii)
=> f(7),)
(7, (2)((, () ...(7), 7k)
-
-
-

Ti, ,)
f(7),)
1
=>

(7, (2)((, () ...(7), 7k)


-
-
-

-
⑤ (n 907)" a,xN+----------
=

+ an
-

A
"Pn=constant

* Pn Pn(( h) PnG))
+ -

(a.(x h)"
=
+
-
+ ...
-

(n) -
(9.4)4 .....an)
+

⑥ x 5(7) Af
1 24
96

3
120 120
216 48
336 168
304
7 720

Ph(x) a0
=

a,(x
+
-

40) ayp(-3)(7
+
-

4,) ....
an(x 1)0)(x ln
- -

-
)
90:f[(0)
a. f(X0,7i]
=

i
an ftc.,,,... [n]
=

Pr(x) (7 612 11x 6


=

+
+ +
Tut 3
-

solutions 25/1/23

1. 6f(x) f(x 1)-f(x y) = + -

uf(x) (fx y) fp-E) +


=
+

⑦S Et Ez
= .

② u =

bcEz +

E =)
=

③ i 1
15
+

E'f(x) f() kn) = +


KER

17854)) (f(ty)
=
-
f(x
-

E))

Et f(x)
=

-
Eff())
(Ez z)f(x))
-

=
-
E

:E EE Fz = -

+E)
nf(x) (z(Ez x))
-

2 =

+1)fk))
f(Ez
=

=
(2x))
=

I(E 14f())
=
2E E f(x) (E
-
+
+

Ezf(x) E =f( b) f(x E)


=
(E (2f(x) E
=

1
= + =
+ +
7(1 H)
=
+

Ef()
=

I(Ef()) 2f()) f(x))


= +
E
+

(24)f(x)
G(E
E1 - 2 4)f())
()(t F
(54)
=
+
+
+ =
=
④ D 4.E
=

SFF
=

15(2)) f(cL+
=
h) -
f(x))

xE(f(z)) x/f( h) = +

x(f(x) f(x) =
-
f(x -

h)
=

f(x h) f(x n
+
-
+ -

n)
f(x h)
=
+ -

540)
=
15(1))

6Etf(x) 8f(x 1) f(11 1 5(x


1) z E)
+ + +
=
= -
+
-

f(x h) f(x) 15k))


- =
+
=

SFz 4
=
xE
=

2.

to v(t
0)
t1 v(t,)
+2 v(t
)
-3
v(tz)
+4
V( b)+

75
v( +5)

v(t) V(tz)
=
V(tz)
+
-
v(tz)
(t t)
+ -

+z -
tz

362.78#51735
= -

382.78x(6 15) -

20
-
15

...((16) 393.7ms-=
·

·
Lineco ·
·
·

interpolation
spain
8

1
70s, in his is is, in in
3.
(i) f(x) e =

a (f((4,212c........ [Xp f
= =

+
E(j,pj 13Sj(x) Mj bj(x (j) j(x yy) dj(x xy)
- -
-
= + +

j 0,
1,2, 1
-
... ... .

Sj(1j) f((y) aj
=

j1)
bj t(2j 4j) 1(2y
-
= +
-

1
+

y
=

My (j 3/34j
-
=

1
+

hj xj =
1
+ -

xj nairoel, ("(10):5"(3(n) =
0

x 5,0,4,4,... [n]
=

Ax b =
-

0
F-

z,(y 5,)5(9-90)

1
A= 1000 -......... - ⑨ ·b = -

no 2(hoth) h, 0 ⑧

o
h. [hiz) 42 ⑧
:
I 1(9
-

21 -
1)
-

zkn a e)

eChainthe.)hm
o 0
↳n z

o o o

(n +

7xx) )
- ⑧

(n 1)x)
+
3.(,7,(y,3),(2,e), (3,e)
72 13
h
3,h0 x (0 x2 5
=

1,h
=

1,n2
-

1
= - = =
=

ay f(j) =

2,92 32,93 8)
=

90 1,9.
=
=
=

A -
= 1 oo · b -
=
0

1 3(e 1) 3(e 1)
4 o - -
-

3(e2 e) 3(e2-e)
86 Y !
-
-

4x4

- ~

A 20 o

C, =
3(e2 -

2e + 1)
(2 >(e) 2eVe)
-
+

-
3 -
0

3 622ap 4) 0.25585
10 0, (
(1
-
+ =
+
=
=

(2 4e 924+ 1 1
= -
- =
5.83007

13 0
=
do 0.25228
=

b0 1.4668
=
di 1.69107
=

01 2.22285
= d2 -
=
194336
b
=8.80977
(i) Sx() 7G10), = S'((n) f10(n)
:

aj f((y),by d
=

Ax b =

A= 2nd no 0 .....
formula
no 2(nothi) h, 0...0

o n. 2inth242 0 o

i ·

o ⑧

f(x) e),5(()) e)),5(4(0) 1,5(x(y)


=
= =
33
=

7
- -

A= 2 I ..
b =

3(e 1)
-

-
3

1 10 3(e22e 1)
4
+

o
1 ↳
3(e 2ee)
-


0012 -
-
3" 3(23 24
-
-

10 0.44468
=
b0 1
=

2, 1.2654
=
b1 2.71016
=

22 3.35=

br 7.32652
=

23:9.40815 d0 0.27360
=

50 1 = a =0.69513

a = e de 201909
=

a =22
3
-3:2
-4
solutions
11253

Theorem

(i) If G -
(ta,b] =

of
ot continuous function on
[a,bT
and [a,b]
( f(t[a,b]
y(x)
has atlastone
then
I fixed point
addition,
(ii) In exists (s, b)
ga) in &
ockL,St1g'GD) 1K21 v((((G, A

thong
has unique fixed point
a
1 g() (E [ ,,1
-
=

g(-) g()g(0) -
=

0
=

i
1

↳ i
ya( E
z,0] fx fE1,1
-

v( E15)
g(xx) 23) =
+

(g(x)))</
2 f()) 7(3 472 -
10 0
=
+
=


g(p) p =

00 1.5
=

g(0n 1)-
0n
=
n=1
+

g()h [a,b]

(12) (12 4)
express for 10
+ =

in tom
of i =

4
=

Firt
900
intera

g(80) p, =

p 1
=

=19484

P2 1.3674
=

Pz g(P2) 1365
=
=

"
3 ⑦ (x x -
0
=

to,I]

g(1)) 0)
=
Do
Itake the closestpointto answer

a F2 =

8 0.7434
=
b Newton Raphson method

On Pn+
onin -
-

fc00s
P =Po- Po
#
=

((E) E
I-
-

p. =

aim(IL) 1
-
-

0.7395981
=

P4 0.7390851332
=

e hecantmethod

On Pr +
= -

f(Pn 1) (Pn-1 pp -2)


-
-

f(On 1) -
-

f(Pn-2)

P0 =

0.5

P E- H(E)(F) 0.5)
-
=

5(#1) -
f(05)

=07363841388
d
Regular falsi method

On Pn -
=
- f(Pn-1) (Pn-1 Pn -2)
-

f(Pn 1) G(Pn 1)
- -
-

Po, p, p step
< -

<(B) -Yp) (B)


Step-2
Sign f(p) sign (5(02) 20

=> Root [P, P2]

x-intercept I/P, 5(p1) line


(P2, f(02)] p,
=

If
Not,

P3 x-intercept[CP0,f(P0)
= line
(P2,f(P2)]
Po p,
=

2p 0.
=
Number of pages: 1 Date: February 12, 2022
Number of Questions: 4 Time: 10:00:00– 11:00:00 hrs.

Indian institute of technology Indore


MA 204: Numerical Methods

Examination: Quiz 1 Total Marks: 15

p
1. Give an example of a sequence which
p has order of convergence
p ↵ = 11
and asymptotic error constant = 13 and converges to 7. Justify
your answer. [2]
2. Let f (x) = an xn + an 1 xn 1 + · · · + a1 x + a0 be a polynomial of degree
n 1, i.e., an 6= 0. Coefficients a0j s are complex numbers. Let R > 0 be
a root of P (x) = 0 and r > 0 be a root of Q(x) = 0, where

|an | n n 1 n 2 n 3
P (x) = x |an 1 |x |an 2 |x |an 3 |x · · · |a1 |x1 |a0 |,
2

Q(x) = |an |xn +|an 1 |x


n 1
+|an 2 |x
n 2
+|an 3 |x
n 3
+· · ·+|a1 |x1 3|a0 |.

Prove that all the zeros of f (x) lie in the annual region r  |x|  R. [4]

3. Use the extended Newton divided di↵erence algorithm to determine a


polynomial that takes the values: p(2) = 4, p0 (2) = 3, p(3) = 1, p0 (3) =
14, p00 (3) = 14, p000 (3) = 132. Using this polynomial find p(4). [3]
4. The heat conduction equation is given by

@u @2u
= , 0  x  1, t 0
@t @x2

subject to the initial conditions


1 + 2x, 0  x  12
u(x, 0) = 1
3 2x, 2  x  1.

If it is solved by explicit method with x = h = 0.2, t = k = 0.02, then


show that u(x, t) = u(1 x, t) for 0  x  1, t 0. [6]


#27y I

I
(오e
S
xzy o ·
n
a

IA

Gay *seDuo,
1512/23
I

, OLIL, e
a.

M(0,t) M(1,t) tx
0,
= =

ex,0) kiMH2, 0LCI u(xi,tj) w(i,j)


=
=

M(0.6,004) M(0.6,0.004) W(3,2)


=

Bender-Schmid method
k 0.2k
=
0.02
=

( M(,,tj 1) u(xi,tj)
=
-

v =

M(xi
-1,tj)-1MG1;,tj) M(x;-1, +

12
2, u(x,y)
-

W1,jt) (1 twig (Wie wi+,j)


+
-
=

n
1 52
=ih 0.2
1,j 12....
I
=

5,i m
=

1,2-
- =
= -
=
=

,
=

Woo:Sino W,o f(x) 0.5878


0
xinI
=
= =
=

wofir-aimaso
Wo:Ain = 0 e

25 f(z)
=
0
=

=got e
--RintK),
j 0 Ux,0) 02E
=

M(0,0)
W(, =
I(w(2,0) 1x(0.9510) 0.4755
=
=
+

w(2,1)
t(w(3,0) w(1,0)) 1j0.5875 0.9510) 0.7694
+
= + = =

w(3,11 I(w(4,0)
= + w(2,0) 0.2694 =
w(1,2)
1(w(,i w(,)
=
+

w(4,1) w(3,0) w(3,4 1 (114,1) w(2,1) 0.6224


1(W(5,0
+ =

+ 0.4755
=
=
=
b.u(0.6,004)
method
crank-nicolson h=0, 1=0.04

W(i,j+1)w(i,j) z[w(i 1j) 2w(i,j) w(i- w(i 1,j 1)


1,j) 2w(i,j 1) wx1,j 1)
-
+ + -
- + + +

0
- +
+
=

p2
ki

j 0
=

w(i
1,j 1) 45(i,j + 1)
w(i+1,j+1) w(i
1,j) w(i+1,j)
- - + + =
-
+
-

i =

((0,1) + 4w(1,1) -

w(2,)) w(0,0) w(2,0)


=
+
0
=
+0.9510=0.95)

->π
↳W(1,1) -
w(2,7 0.95)
=

i 2
=

w(,1) 4w(2,1) w(3,1) w((,0) w(3,0) 0.5875 0.9510 1.5388t


-
+
= + = +
-
=

i 3
=

w(2,1) 4w(3,1) + -
w(4,1) w(,0) w(4,0) 1.5988
=
+ =
-
i 4 =

-
W(3,1) 45(4,1) + -
((5,1) 2(3,0) w(5,0) 0.9510-
=
+
=

(((,j) w(4,1) =

⑦ 0.6 ( in
=
= =

ix0.2
u(,1) w(3,)8 -

5 i 3,004
=

j7 5x004
=

1 = =

=> i1
=

AndW(31D 0.6460
=
Indian Institute of Technology Indore
Semester: Spring 2023
Numerical Methods (MA 204): Numerical Integration
Tutorial-1
————————————————————————————————————–
R1
1. Evaluate 1 ex dx by dividing the interval into (i) 2 trapezoids and (ii) 4 trapezoids.
2. Find the volume of the trapered wood whose radius of cross sections from one end are given
below:
-

Traperoded
x 0 5 10 15 20 25
r 4 6 7 10 7 2
or i
R1 dx
3. Evaluate 0 1+x2
by Simpson’s 1/3 rule and find the value of ⇡.

Fraped Any 6
-

43
-

Even n =

3x
38
↳a

1
the
fishydecimals
comes same.
=

0.518
=
>x
3
->
New Section 1 Page 17
-> equate with all a

find their respectivevalues.


2-

=Ear
22
I
E
x =

assuming
n 0.25
-

fa convenience

GK,7):22
Ot
wee
assumie
ng
POST MIDSEM

1513123 Numerical solutions of ODE


Lex-1

yn: f (x, y, y'.y"...... yr)

Boundary problem (BVP)


value
a&x b(b) a)
x (Ivp)
=
=

Bounded domain- ab x C
=

x> a

Ay
=
y f(x,y),I.y((0) =
=

=e or
yctys, y(ra) b
at =

methods
① Semi numerical method-Pecards method


hinge
step method
method
·
cayor's heries

I Euler's Method
-
Runge-Kutta method (RK Method)

③ Multi-step method
method
predictor-corrector
series method
Taylor's
4 f(x,y),y(x) Yo
=

y(x) y(x x k)
-
+

y(x)
(x
x)y(x) (x)y"(d) dy1(6)t.......
+ -
= +
+

↳I
LetM x-70
=

y(x) yxxx 4yx0 x4y"(6) 2840)+......


->
=

+ + +

where
y'(0) 5(0,y0) =

y"(,90) 5'40,40)
=

y"
=
fx
fyy
+

y
=
(5,x) fxy5) (5yx 5yy5) +
(fx
5y5y)fy
+
+ +
+

#2ffy ffyyf15y 5fy2


Ex
=

+
+
-
8

from
y(x
+

4)
y,
=

kf(x,hr)
+ +

2 27,40,y) ty(0120)549013]
+

-
at (2, Y0)]
3!

e
3
yet 3 t
[kn,<n+1]
-
El-
A=x4y2,y(1) 2 iec
1,y 2
=
=
=

Since
y(1,2)=?

-(x,y) x7y2
=

f(x10,4) (1222) 5 =
=

5x Sy zy fees:2 fyy: Sxy


0
=

2) = 2
=

At
C0=1, C0 2
=

5x
=> 2
=

Sy 4
=

55x 2
=

dyy= 2

0
fxy =

Taylor's formula
is

y(x h) y(x) n f(0,40) 2 [f+


by5]egtfastayt syy 5xty +
+

+
+ = + +

+
7y23310y
-

y((+h) 5
2(2+ 4x5)+ C
+
2
= +

2 5h 1142
xo
+ + +
=

y(1.2)
=>
Picard's Method

d f(x,y) y(x) 40,x0>0


=
=

integrating
-x
w.r.t

yx! =

+
x,y)dx

y(x) y(x)
=>
-

()f(x,y)dx
=

y y,
=

y, -7
=>
35x,y)dx
=

=>
y, 4 5x,ydx
=
+

y =4 +

4 x,y,)d
+

yn+xx y+ fe,yn)dx,
=

neo,1,2.....

nt
y" denote iteration

the Ivp
Feli compute y(0.1) from using picard's method

=CHY, y10)=1, c10 = 0, 4 = 1, fR,y):City

y, 1
=

(x,y)dx
+
=

1 x + +
I
, y, (0.1) 1.105
=

yz
1
=
+

."F(,,y,)dx =
(t) +
1213,3101) 1.110167 =
fer-4
2413123
Milne predictor method

84 y
=
+

Y" xx,y)d +

interpolation formula
using
f(x,y) A50 MYADIN-2 &to
f. rDto
4
+..---
+
=

+ +

3!

kn x at n
n
P-4 4h
=

4
= =

=>
+

3 y
=

j. 50+B to +

m?
D250+
unn-
ft....... a

24 x
=

4h,
+

24 y n)(5 nD5o
4) at.....)
+
+
= +

D E
=
- 1 -

E(fn 1) frtz
> =

yy y n5450 81f
2250 51350+-....] +
+
= +
+

fally y y
=

[25x,y)
+ -

5x,y) 2fx,y)]
+

or,
&x [25, 52 2533
40
4
+
-
=
+
Favor=
D45.=I *sE

y = 22 [
+
+
2 453
+

544]
+

ay! yz
=

[5e(2,y)
+
+

4543,y,) 5414,y4)]
+

dy= I say

22 y
=

15f
+ +

45,+523
-

450
watch be written,
may
84 y2 252 453 543
+
+
= +

D*.=
-yin a
goor:

y(P y. =
+

[25, -

72 2535
+

y yz
=

btf 47 418]
+ +
+

Ifind y(10) of dcytI given


(0,1), (12,2.3), (1.4,4.5), (16,8.55 , (1.0,y4)
14
240170) 191.8,7 192,827
x3,4z7

34 1.8,
=
n 0.2
=

=3 4525, Y
= +
52 253
-
+

.(] 0.28675156-7.34223 8.84,


=

42[27(12,2.3,
+ 1
= +

1 . . . .
.
-
=
y y2 55kx,y) +

4743,y,7 7(4,y4)]
+ +

45
=

025(14,45) 4f(16,8.5)
+ +

((18,8.3236]
+

10.008
=

Simulaneous D.E

:
Ex: 5,777,8,27
AY 52(x,y,2
=

I.Cy(x) y, z(0) 20
=
=

RK Method
using
y, y(oth) 2410th)
=

2 =

Si"

E 12
45,(+14+ 4,20 1)
=
+

M2=nE2
/10+, yo
+1,20 +M

y(x n) 4 2(k2 k3) 14]


jtk,
+ = +
+ +
+

2(4th) [M, +2(m+M3) M4]


I
=

20 + +

o(nt)
F
d x z
=

y
+ +

a 2
3y 42,y(0) 1,2(0) 1
+
= +
=

=?,
y(0.2) p 0.2,
=

Not:
-
x0
=

0, Y0-1, Zo =1
n 0
=
-

51 x
y 2,52 3y
1x
=

42
= + +
+ +
Preparation section

Topics
V
Branchise
-

Definitions
~

Results
=
Practice

Cheat sheet
V

Presentation
Indian Institute of Technology Indore
Semester: Spring 2023
Numerical Methods (MA 204): Numerical Integration
Tutorial-2 (SM) : 12-03-2023
————————————————————————————————
————–
1. Given f (x) = 3x25 2 , x > 1. (a) Complete the table below, giving the values of
f (x) to 2 decimal places:
x 2 2.25 2.5 2.75 3
f(x) 0.5 0.38 ? ? 0.2
(b) Use the trapezium Rrule, with all the values of f (x) from the table, to find an
3
approximate value for 2 f (x)dx.

(c) Use your answer to part (b) to find an approximate value for the area of S.
2. Use Simpson’s 1/3 rule to integrate f (x) = 0.2 + 25x + 3x2 + 2x4 from 0 to 2.
Also find the relative error.
3. Evaluate the following interval by Trapezoidal
R 2 x2 rule, Simpson’s 1/3 rule, Simpson’s
3/8 rule and Weddle’s rule respectly, 0 (e 1)dx correct up to three decimal
places.
4. Using Simpson’s one-third rule find the mess of plane lamina bounded by the
curve
p y 2 = 4x and y = x. The density ⇢ of plane lamina at any point is given by
x2 + y 2 .
R1R2
5. Evaluate 0 0 (1+x22xy
)(1+y 2 )
dxdy using Simpson’s 1/3 rule with step size h=k=0.25.
6. Evaluate Z Z
1
dxdy
D (x2+ y2)
where D is the square with corners at (1, 1), (2, 2), (1, 2) and (2, 1).
R1R1
7. Evaluate 0 0 ex+y dxdy using the trapezoidal and simpson’s rules (take h=k=0.5).
R 1 R 1 sin xy
8. Using Simpson’s 1/3 to compute the integral 0 0 (1+xy) dxdy with h = k = 0.25.
Rb
9. Write a code to find a f (x)dx, a = 0, b = 0.8 using composite (a) trapezium
rule, (b) Simpson’s 1/3 rule and (c) Simpson’s 3/8 rule, where f (x) = 0.2 + 25x
200x2 + 675x3 900x4 + 400x5 .
1
post MIDSEM

15/3/23 Tutorial-2

① f(x) = 5
I
3) I
3x2 -
2

So xi 99223 -4

x 2 2..25 2.5 2.75 3

f(x)050.38 ! ?0.2

@ f(25): 5 =0.3
3(25)22
↓5
f (2.75) 0.24 =

⑯?
2
3
fxxd
(f(x)
= +

fx(y)
+

2 3

0543
=
0.3175
=

x)Ifx() 1x =

1x02 0.215
=

② f(x7 2572 32+2x4


=

0.2 + +

a 0b 2
= =
I = b. a
-

take n
1, relative
=

error is less.


Ice dx
n6
=

weddle's rule Applicable if his divisible


by
ofxxdx 5(140tyn) 5(y,+8,+ -...) (y+y8+....) 6(y+yat....)
=
+
+ +

(yx y,+
+
+
-
...) 5(y5 y,,t......)
+
+

3
75(0)
0.5,,,,5,2
40 0
=

0
= =

=1 =)5(14
x
=
(e -

1)

"
I f(j)
=

=
25 1)
=
-
0.152
=

(e 1)
"2
2=5(z)
-

0.55
=
=
=

x4 I 5(5) (et 1) 49
=
- =

= =

x5
3 =
5(z) 15.08
=
=

xj 2 =)5(2) 53.59
= =

A: 145387

⑭ P(x,y) vity2
=

P(x,y) bit
=

mass:)irgddy
M
=x)
y

Ay x
=

F(x)
4*
=

Fy dy ->

mass=?*Fe des n
4
=

for convenience
F(4) 4(F(1) F(3)],F(0) 0, F(1) 1.81, F(2) 2.59,
[f(0) F(z)
+ +
=
=
+ + = -

F(3) 2.047,
=

F(4) 0
=

=
6.875,

SY tys"" "y k 0.25,k 0.25
= =

I
I Fly)dy
= -> n= 0.25

(f(x)
F(1 4(F(0.25) F(0-5)
F(0.75))}
+
=
+ + +
Indian Institute of Technology Indore
Semester: Spring 2023
Numerical Methods (MA 204): Numerical Integration
Tutorial-3 (SM) : 19-03-2023
————————————————————————————————
dy
1. Compute y(0.2) from the IVP using Picard’s method dx
= x2 + y with y(0) = 1.
dy
2. Given the di↵erential equation dx = x3 + 2xy 2 + y 3 with the initial condition
y(0) = 1, use Taylor’s series method to determine the value of y(0.2).

3. Solve y 00 xy 0 y = 0, y(0) = 1, y 0 (0) = 0 at x = 0.1, by Taylor’s series method.


dy 2
4. Solve dx = y2x+1 , y(0) = 0 at x = 0.25, 0.5, 1.0, by Picard’s method (correct upto
three decimal places).

5. Using Euler’s method, find the solution of


dy y x
= , y(0) = 1 at x = 0(0.02)0.1.
dx y+x

6. Using Euler’s method compute y1 and y2 taking h = 0.1 from the following dif-
ferential equation,
dy
= 1 + xy 2 , y(0) = 1.
dx
Also compute the error therm for both y1 and y2 .

7. Give the solution to the initial value problem y 0 = 2x + y, with y(1) = 2. Then
create the approximation using Improved Euler’s method with a step size of h =
0.1 and compare the results to the true solution on the interval [1,2].
dy
8. Give the solution to the initial value problem dx = y 2 + yx, y(1) = 1 at x = 1.2
and 1.4, by Improved Euler’s method. Also calculate the error in the Improved
Euler’s method for those values of x.
dy
9. Solve dx
= x2 + y, y(0) = 1 at x = 0.1 with h = 0.05, by modified Euler’s method.
dy
10. Solve dx = 2x + y, with y(1) = 2 by first, second, third and fourth order Runge-
Kutta methods at x = 1.2.

11. Write a program for Improved Euler’s method and Taylor’s series method to
implement the above problems.

1
2213/23 Tutorial-3

(P
1.
y(0.2) a +y2,y(0) 1
= =

G(x,y)
=

ricard method

yn+,x y.
=

-. (x,y)dx
+

y y(0)
=
1
=
+

Y) f(x,zn)
y, 1
=

Yfx, des

1
=

Y(x)dx
+
1 x
= +

1
+

y 1
=

Yfx,y,)dx
+

1
=

Ix
+
+

1 x +

+3)d
1
4 x
2 1
-
+
+
+ +

12

y,(0.2) 1.2228
=

y(0.2) 1 x
2 +
+ + +
=

y(0.2) 1.2214
=
: ,y(0)
4: 0
=

Yr =, y
=

+ x,yn)
+

dx

y,xx) 0
=

yf(x,0)dx
+

-Y = d

+ xx19x
Yen.....
2xx:
=

y(x) 13
3
=

x9 10.0005
-

(0.25) 5.208 10-3 81


0.005
y
= x x

y(0.5) 0.042
=

x
2.
4 x(y2+ y3y(0) 14s y=
=
+ =
0
=

y(0.2)

y(x x)
y(x) hy(0) a tad
+
= +
+

y(x) hf(x,y) (fx 5yf)


=
+
+
+

2 1, 7) 5x+
syd= fx by
-
= +

de fx*2 yf +
siy
+
hity sy5
+

Ang:1.33857
-

y" xy) y 0y(0) 1yx) 0
=
=
=
- -

y y" xy yy"(x) y(0) 1


=
= =
+

y"(x) xy" y' y'


= +
+

y((0) 0
=

2y/(0)
+
0
=

y(x) y(0) xy) 2y() 1y (0) y(0)-....


+
-
+ +

1.0050125
y(0.1)
=

⑤ at x 0 (0.02) (0.1)
y
=

y(0), y10.02),y10.04),y(0.06),y10.08), yc0.)

5xxy 1410:
EE,
1
*

euler method

y, y, 4fx!,2i)
+
=

i 0
=

y, y(0.02) y
=
=

hf(x,y)
+

If0.02
=

f (0,1)
1+
0.02(78) 102
= =

yz y(0.04)
=

=

dy 1
xy2 f(x,y), y (0) =
=
=
+

y(0.1) y, y
=
=
h
+

(s,y0)
-

1
=

0.15(0,1)
+

1
= +

0.1x1 11
=

y(0.2) yz 1.2121
=
=

x
5y"(z),029201
=

y"(x y2 2xy(1+xy-)
+

=
(y10.172 2x01xy10.77 +
(1+0.1 10.7)
x

=0.00728

d=
1
xy2 5(x,y),y(0.1 -
=
+

n 0.1
=

G,(1+
2
nfyx,y,) by"(3)
=
+

=0.0179


d cy,y (0.1)
=

modified
Euler method

n+ 1
7, y. z(540180)
= + +

- (x1,y,4)

y,0 Yo hfk(0,40)
=

+
1
=

0.05
+

f(0,)) 1.05
=
y,1 y =

7(7(x,y) f(x,,y,))
+
+

10513125
four digit
=

1.0513
=

y,2 y 5(5(x,y) 7(x,,y,))


=
+
+

1
=

0(1+f(0.05,105131)
+

1.0513
=

yy y, hf(,,y)y, 10513,x, =0.05


=

+ =

Euler's method
⑦ Improved

Ent Yn
=
+
(5x, y) 5
+

(n2))

where E =

2n n=n,yn)+

xn+ 1
2n + n
=

=
y 2iyy(1
2
=

6e - 2
y(x) x1
=

x0 1, 2
y0
=
=

[a,b]:51,2]
59), y)
y' City, n 01
=
=
=

0,y(,) y, y (7xx,y) fx,,y,2)) 2


(4 5(11,24k)
+ +
= +

n
= +
=

0(4 f(1.1,2.41)
=

2
+
+

0(4 46) 2.43


=

2 + +
=
x 40th 170.1 1.1, 2, y0 h +(x0,80) 2+8.)(4)
2.4
= =
= = =
+
=

Resultcomparison

Di IEM Y, one vo onor

i /

i
=

0
/

i=
-


d 2x
y
with
y(1) 2 x0
1,y=2
= + = + =

n 0
=

x 1.2, h 0.2
=
=

method
Rungs-Kutta
x, n5((n
=

2n) 0.8
=

13 h5(xn
=

1,8n 2)
+
+
1.088
=

k2 nf(xn 44 h5(n+h,yn k3) 10664


kiyn 4) 0.92
=
+
= = +
=
+

Kutta
Firstorder
Range method

Second order
Runge Kutta method

bratt-y.+(14,
Third
-

y, y
=
+

I(k+ 41+1) 2.928


= +212 2
+
+

K)
Indian Institute of Technology Indore
Semester: Spring 2023
Numerical Methods (MA 204): Numerical Integration
Tutorial-4 (SM) : 26-03-2023
————————————————————————————————

1. Consider the Runge-Kutta second order method


1 1
yn+1 = yn +(1 )k1 + k2 with k1 = hf (xn , yn ), k2 = hf (xn +↵h, yn + k1 )
2↵ 2
Find the region of absolute stability.

2. Solve for y(03) and y(0.6) using Runge-Kutta method of order 4 when y(x) is the
solution of the second order equation.

y 00 xy 0 + y = 0, with y(0) = 1, y 0 (0) = 1

by taking h = 0.3.

3. Derive an implicit Runge-Kutta method of the form

yn+1 = yn + w1 k1

where k1 = hf (xn + ↵h, yn + k1 )

4. Solve y 0 = 2xy 2 , y(0) = 1 with h = 0.3 second order implicit Runge-Kutta


method.

5. Obtain the solution of the system

y 0 = z, and z 0 = 4y 2z

with y(0) = 1 and z(0) = 1

by (i) Euler’s method and (ii) Runge-Kutta 4th order using step size h = 0.2,
compute y(0.2) and y(0.4).

6. Solve 2y 00 (t) 5y 0 (t) 3y(t) = 45e2t at t = 0 with x(0) = 2, x0 (0) = 1 and compare
the solution with true solution y(t) = 4e t/2 + 7e3t 9e2t . (If the method is not
mentioned then one should use a method which has the best accuracy).

7. Use Milne’s predictor-corrector method to obtain the value of y(0.3) of the system:
y 0 = x2 + y 2 2 with ( 0.1, 1.09), (0, 1), (0.1, 0.89), (0.2, 0.7605).

8. Given y 0 = 1+y 2 , where y(0) = 0, , h = 0.2 compute y(0.8) using Adams-Moulton


predictor-corrector method.

9. Solve the following ordinary di↵erential equations by finite di↵erence method:


(i) y 00 (x) xy(x) = 0, y(0) + y 0 (0) = 1, y(1) = 1, with h = 0.5.
(ii) xy 00 (x) + xy 0 (x) 2y(x) = 2(x + 1), y(0) = 0, y 0 (1) = 0, with h = 1/3.
1
1.

8n+ 1 yn
=
(1
+
-

)nxyn in x8n Bk)(: B)


+
+ =

=[1 x(- ) +xx)7yr


+
+

->
s
[1 xn
aE
= +
+

stability-stable if
In-E In, where 15

for 111, 11+ xn


E
+

-> 1 x
+

+
=
let
2

x =[-2,0]

xn=
=>
[-2,0]


y" xy' y 0,y(0) 17( 0 +
y, 1,y0) 1, ty6 )
= = =
- + =
= =
- -

I
Let2 y', =

2'=y" }= z
y'
=

=
f(x,y,z) 2
=

2 x2
y 0,2 xz
y g(),y,z)
= x2
y
+ =
- - = -

E
D 0, 4 =, Zo -1
=

=
RK- order 4

ky) 447
Yn+ 2n (k, +2(k2
+

+
+

k, f(x,y,z), k2 f(x x,y 1,2 n)


=
= + = +

kz f(x
2,y x2,z N22),4y f(x
h,y hkz,z (ly)
= +
+
= +
+
+ +

2(b (z) ly)


2n+1 2n
(1,
+ + +
= +

11
g(x,y,z)(12 y(x x,y 4,z 1))
=
=
+
+
+

13 y(x+1,y 12,2 42),14 g(x h,y nk),z h()


= = +
+
+ +
+

y(x,y,2) x2
7
-
=

n 0.3, y(0.3) <10 0, 70=1, Z0=1


= =

=>
=
cloth
=

0+0.3=0.3, K, 5(10,70,20)= -1, li


=
=
-

k2 f(x
2,+/+
+
=

f(0,1+0.341, 83) 1)
= -

1 + -
-
=
115

12 1.0225 13 10005
1y =
-0.92992
=
=
-
-

kz -

= 1.153375 k4 =
-

1.30015

y, y(0.3) yo () 1.298796
= =
= + -

2, = -

1.298796
3.
~new
where
8kn+th,p
BI
14 4
Ent Yp+ Wiki,
=

+
=

↳ w, =?, x ?, B
=

= ?
od

4 f(x,y)
=

Ent yn +nf(c(n,yn)
=

(+fny)+..-.+oh
+

11 -(((n 2h,yn Bk) h[f(n,yr)


h
dr)+BKft....
=
+ +
+
=

=h[fxni2n) (6+
y(45k(nin) 2h(5) B4,65)]
+

+ +

Q.3
n f(In, (n)
Ent=Yn+ Wiki,
=

2 with
entanth2f Bak)...
=
+ +

-Yn+wiht wich w, hin


+ +

, 1 En +hn+
th+5 =
=

Remember method
En Yn*hen
Eny) rylorries
=
+

= 1

2y2 y(0) 1
=
⑭ y
=

5(x,y) n 0-3
=

inorder Yat:Yn+1
ki
n5xnt4n 1)
=
+
Don:
f(x,y) =
x(y2
-

x 0, 40:1
=

Need to
find y (0.3)-?
k1 n = (4n 2,8n + 1)
=

x1 n (0
2,4 +)
= +

k, 0.3) 2(03)(1+1)2
= -

4k1 -(0.3)2(1 4,2 2k)


=

+
+

k1 12.0287k1 -0.0831 y, Yo + k1
=
-

=
=

=1-0.00831 [ 1

y1
⑮ =
2 5k,y,2),2
=
-
=

4y-22 =g(x,y,z)
y(0) 1 2(0) 1
=

40 0, y
= =
1, Z0 = 1

(i) Euler's
(ii) R "KM (Q2-same)

Fuler's method

Ent Yn+k5(nignizn),
=

2n+1=2n +

hg((0,y,20)

y, Y0 h5(40,20120)
=
+
1
=
0.24)
+

=
12

21 20 =

Hng(70,40,2) 1
=
62))
+ -

4-2)=-0.2
=
y 5(x,y)
I predictory, you In/zy1-1 2y's
+

y f(4,44)
=

corrector 84 yz 1(2y! 48' 2!


= +
+ +

y
=
x y2 + -
z

(-0.1,109) (0,1) (01,0.89) (0.2,0.7605)


10,70 (11,4,
x238213,43

y,1 f(x,,y,) 1,yz f((x,z -1.19790,y, 5(3,yz) 1.38164


=

-
=
-
=
=
= =

44 0.614616,y4 5414,44)
=

=
-
=

153224,yy 0.614776
=

8) Moulton correcter method


Adams -

predictor

predictor 24 y,
= +

(55y'
-

59y 3y,1-9y4)
+

corrector
24 y3 194, 194, 542' y,
=
+ + - +

=
y 1
y2,y(0) 0,n 0.2
= =
+

f(,,z,)12 5(2,24)
=

y(0.8) 2, =

P-K method

0.4228,y yG(z) y(0.6)


0.684)
y, y(x,) y(0.2) 0.2027, yz y(x2) y(0.4)
=
= = = =
= =
= =

y =1.0223 predicter formula


-

8 5(4,44) 0.8,10233,24 = 1.0296


=
9. (i) =
y xy,y(0) y/(0) 1,y() 1,h 0.5
+ = =
=

y,"=Zit,-2y, *Yin, Y.Ziti-Ei-


Lie 2n

&; +, -24; 8i x;,2;


+

22

4(fix,- 24; y, 1)
+

-
-

(iyi 0
=

i
1,2
=

i
1,4(72-24, + y0) 2 0
= =
-

8.58, 70
44
-

4
- =

Mi 24(yz-2y2 y)) yz 0
+ -
=

y(07 y(x) y1=1.y


2
1,30
+ =

y,- z
=
+ =

=
1
Yo Y'
+

nuti 0, =

4(y, -240 y
+

- 1) -

40% 0
=

y, -240 y_, 0
+ =

e.g, 3
Yo = -1, y, 0
=

=-4
Indian Institute of Technology Indore
MA-204 Numerical Methods
System of lLinear Equations

1. Solve the following systems of equations by Gauss-Jordan elimination method:

(a) x+2y+z=0 (b) x+2y+3z=14 (c) 2x+3y+z=9


2x+2y+3z=3 2x+3y+4z=20 x+2y+3z=6
x+3y= -2 3x+4y+z=14 3x+y+2z=8

2. Solve the following linear systems by Gauss-Jordan method, with partial pivoting if necessary (but
without scalling):

(a) 4x+y+z=4 (b) x+y-z=2 (c) 2x+3y+z=9


x+4y-2z=4 2x+3y+5z=-3 x+2y+3z=6
3x+2y-4z= 6 3x+2y-3z=6 3x+y+2z=8

3. Find the inverse of the following matrices by the Gauss-Jordan method:


! ! ! !
1 2 1 0 1 2 1 2 3 1 2 1
(a) 2 3 1 (b) 1 2 3 (c) 1 3 4 (d) 2 1 0
2 1 3 3 1 1 1 4 3 1 1 2

4. Solve the following systems of equations by (Gauss-Jordan) matrix inversion method, Doolittle’s and
Crout’s methods. Are the answers you are getting in each method same?

(a) x+y=0 (b) 2x+y-z=0 (c) x+y+z=2


y+z=1 x+y+z=9 2x+2y+3z=7
x+z= 3 2x+5y+7z=52 5x-y+13z=0

5. Solve the following systems of equations by Doolittle’s and Crout’s methods:

(a) 10x+y+z=12 (b) 3x+5y+2z=8


x+10y+z=12 8y+2z=-7
x+y+10z= 12 6x+2y+8z=26

6. Verify whether the following matrices are positive definite:


0 1
15 4 2 9 0
! !
1 2 3 2 1 0 B 4 7 1 1 1 C
B C
(a) 2 3 4 (b) 1 2 1 (c) B 2 1 18 6 6 C
3 4 1 0 1 2 @ 9 1 6 19 3 A
0 1 6 3 11

7. Solve the following systems of equations by Cholesky’s method, if the method is applicable. If it is not
applicable, give the reason.
! ! ! ! ! !
2 3 1 x1 9 1 2 3 x1 14
(a) 1 2 3 x2 = 6 (b) 2 3 4 x2 = 20
3 1 2 x3 8 3 4 1 x3 14

8. Solve the following system of equations by Gauss-Jacobi method with initial approximation other than
(1, 1, 1):

8x + 2y 2z = 8
x 8y + 3z = 4
2x + y + 9z = 12 .

9. Solve the following linear system by Jacobi method with X (0) = (0, 0, 1)T . Find out three iterations:

10x1 + 3x2 + x3 = 14
2x1 10x2 + 3x3 = 5
x1 + 3x2 + 10x3 = 14 .
5) 4/23
elimination
1.
x+2y+z 0
caux-fordan
=

32 3
2y
x
=
+ +

3y
x +
-
=
2

Ax B =

-12

soi]:[i]
I

223

--

R2 -2xR,, R3-R1, R2-R2/72)

2 4x y
+ +

z
4
=

x 22 4
4y
=
+ -

3x 42 6
2y
- =

- e -

4 I I C 4 -> R2 R
I

-
2
4 I

Y
-

3 2 4
-

- -

4 114 R3 -
14-2
-

32
-

4
I
-

4 114

-
Rz R2x
-

(i) (E)
-

en

i'l

use backward substitution.

A)
y
2. x +

z 2
+
=

52

21+2y =4
+

42 6
3x
2y
-
+
=

is 1]
-

YY
3

- 2

- 1 I

III (151

I I
2 I

A = 23-1

13
-

I I I R
E 2 1 I

23

2-13
-1098
I:I I
I
2,100


R2x( 1) -

Rz 5R2 +

I I in in o I
R3/16
I 21

O I 3 2 - 1 0

00 I

& x
y
+
0
=

y z
+
= I

x 2
+

3
=


=

1
-

I
AX B=

A I ⑧ B = 0 X = x
I / /
I
0 I I y
S 0 I 3 - 2
-

Doolittle's method

A LU =

↑is an enterthe
- 100

too
-

-
Mil M.2 Mis

-
y
x
4. a 0
+
=

1
y z
=
+

x 2
+

3
=

-
-

L =
10 0 V = I I 0

010 ⑧ 11

-11- -
o 0 2

A=

LV, Ax B =

LUX B =

12 =

B, UX 2 =

?1
2 = x - 1
=

I -

- 2

-e
eerie
I
A =

is
M2y
0 l

- 13 - oo I-court's method

-
6. Pa

pivot elements
symetrie - the
+

Notallowed to do
scaling

I
*23
I
R2 = Rz
-

2R

? ↳ R3 R3-3,

GR, 7
R3-2R2
pioot element = 1, -1, "4 NPD
Inii) in
det A
-3 4
=

(ii) (ii) In'i)


*

be
-

I -

ve


holosky method Application only if positive definition
-

AX=B

I
a I
a,,,2 as

asthe
as

a air
4i -

Detof I, II should be positive

chobosky
Ax A =

↓ Step 5 -
-
Ly=b
-1- pd
Step-2 ->
A LL
=
Afindy
-

LL*X:A
Dent y =
Y
-3 ->
findx

N4 ->
y
(x- rector
=

-(
E)t?]:[i] I I
L= ei 00

92122 0

931132 123

lki = ari - lighig


lis

&K12

akke
=

itk R x 1=
=

fei 910 =
=

1
en E

f Vair-ti =

88 Xo (1,0,0)
=

8x
2y
22 8 x y18 2y 22) )((x 1
118 2y 22)
=
= -
+ - = - +

+
= + =

x y -y)4 x 32) fx 1 -y 4 32k)


8y 32 4
= - -
+
-

-
=
- -
= =
=
+

y 92 12 x
2y 2) 2+ (124(x y)
I(8
2x
= =
+ = -
+
-
+
=
=

ko I ex
5(8 0) 1
=

0
= +
-
=

y 0
=

y, -
=

y( -

4
-
1 -

3(0)

26
0
=

2, 4(12
= -

21 -

0)
illconditioned
condition number- IIA"11 11Al1 >1000= system.
④ A -

(ii)
[22], 8]
a =
=

Az R,a,
=

5)5,5)
=

a2
=

[*8], t?"]
as 02:

As P292
[8,2]
=
=

and appromisation [

ThereareI ↳itis
A:

3x3

[ I
Ix-aiilgaj
t, 3

An At
i 1
=

E
-q)
1x
1,31
=

1x -922)
19as =
Iu
=

11911 11es
= -x'*1)

11e "No M* ne'llL104 1o4

(f) o"I C
104

vo-4 k1888
log
(f)
+
-

0.045

=k> 888
preparation

⑪ Picard method

Taylor series method
③ Subehod

④Cube's modilatedt Kutia method of second order


runzeo

⑮ Runge-Kutte Method of
fourth order
① milne's predicter of correcto method

⑦ Adam Bashforth Predictor And Corrector Method


① Gauss-Jordan method

exchange the row R, Ps


->

to
keep smallestnumber
front elementatthe top.

② Grauss-scidal iterative method


③ ositor
method foulitile, method (factorization
a

I
Nepy:X=Y
-
- We solve for X.

Frsample
⑬ Locobi itration method

④ elimination
gause

↳ Youss jordan

You might also like