Semester III BCA3010 Computer Oriented Numerical Methods
Semester III BCA3010 Computer Oriented Numerical Methods
method
x+y+z=1
x + 2y + 3z = 6
x + 3y + 4z = 6
Answer:
The given equation can be written as
AX=B
X => A-1 B
(*)
Where
B=
Det
= 1(8 - 9) 1 (4 - 3) + 1 (3 2) = -1 0
A-1 exists
A-1 =
1
adj A
det A
Cofactor of A =
Adjoint of A
A-1 =
1 1 1
1 3 2
1 2 1
1 1 1
1 3 2
1 2 1
1 1 1
1 3 2
1 2 1
1
1
adj A=
det A
1
1 1
1
1 3 2
1 2 1
X=
1 1 1 1
1
1 3 2 6 5
1 2 1 6 5
2 4 3
A=
Answer:
| AI |=0
The characteristic equation of A is
8 6
6 7
That is
2
4
3
where
0 0
0 0
0 0
Expanding we get
(8 -
That is,
+ 18
3
Therefore,
+ 18
- 3) (
45
2
45
=0
= 0 on simplification.
- 15) = 0
(A -
, the we have
8
6
I) X =
2
4
7
y
4 3 z
0
0
0
That is,
(8- ) x 6y + 2z
= 0
-6x + (7- ) y 4z = 0
2x 4y + (3-)z
= 0
= 0
= 0
= 0
(i)
(ii)
(iii)
y
8
6 4
z
8
x
y
z
24 14 32 12 56 36
x
y
z
x y z
or
10 20 20 1 2 2
1
2
2
(iv)
(v)
(vi)
y
5
2
6 4
z
5 6
6 4
That is,
That is,
x y
z
16 8 16
x y
z
2
1
2
Thus X2 =
1
2
(vii)
(viii)
(ix)
40 40 20
That is,
x
y
z
2 2 1
2
Thus X3 =
1
2
2
1
2
and
2
1
are
y
y0 = 1
y1 = 0
y2 = 1
y3 = 10
0
1
2
3
y0 = -1
y1 = 1
y2 = 9
2y0 = 2
2y1 = 8
3y0 = 6
p( p1) 2
p ( p1 ) ( p2) 3
y 0+
+ y 0 where x =x0 + ph
2!
3!
Here h = 1, x0 = 0, therefore p = x
y ( x )=1+ x (1 )+
x ( x1 )
x ( x 1 )( x2 )
2+
6
1.2
1.2 .3
1x + ( x 2x ) + ( x 33 x 2+2 x )
y ( x )=x 3 2 x 2 +1
which is the polynomial from which we obtained the above tabular values.
To compute y(0.5)
Here x0 + ph = x = 0.5
p=0.5 since x0 =0h=1
1+ 0.5 (1 ) +
y ( 0.5 )= y 0 + p y 0 +
p ( p1 ) 2
p ( p1 )( p2 ) 3
y0 +
y0
2!
3!
0.625
which is the same value as that obtained by substituting x = 0.5 in the cubic
polynomial.
ROLL # 1505007223 BCA 3010
cos
by Simpsons
1
rd
3
rule by dividing
[ ]
0,
Answer:
Here a = 0, b =
2 , n = 6,
0
ba 2
h=
=
= 15
n
6
12
The values of
cos correct to
12
2
12
3
12
4
12
5
12
6
12
y0
y1
y2
y3
y4
y5
y6
1.0000
0.9828
0.9306
0.8409
0.7071
0.5087
0.0000
y= cos
By Simpsons
6
1
rd rule
3
for n = 6 given by
yd = 3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3+ y 5 ) +2 ( y 2+ y 4 ) ]
0
1.1873
Therefore
cos d=1.1873
0
find
y3
'
y=
dy
=y,
dx
Answer:
On comparing
y'=
dy
=y,
dx
and
y 0=2, x 0=0
y 2= y 0 + f ( x , y 1 ) dx
2+ y 1 dx
to eq(1), we get
f ( x , y )= y
y 1= y 0 + f ( x , y 0 ) dx
x0
2+ y 0 dx
2+ 2 dx
2+2 ( x )0x
2+2 x
x0
x
0
2+ ( 2+2 x ) dx
y 3= y 0 + f ( x , y 2 ) dx
x0
x
2
2+ ( 2+2 x +2 x ) dx
x0
x3
2+2 x +2 x +
3
2
At
x=0.8
3
(0.8)
y 3=2+2 ( 0.8 ) +( 0.8) +
=4.41
3
2
10
Question 6: Solve x
Answer:
x 0=1, x 1=1.5, x 2=2
y 0= y ( x 0 )= y ( 1 )=?
y 1= y ( x 1) = y ( 1.5 )=?
y 2= y ( 2 )=1
y 0 =( y ' ( x0 ) )
'
We have
xi
y i +12 y i+ y i1
h2
+ y i =0
4 x i ( y i+12 y i + y i1 ) + y i=0 ( 1 )
Put
i=0 ( 1 ) ,
4 x 0 ( y 12 y 0 + y1 ) + y 0=0
Also,
y 'i=
y i+1 y i1
= y i+1 y i1
2h
y 0= y 1 y1
4 ( y 12 y 0+ y 1) + y 0=0
8 y 17 y 0 =0 ( 2 ) Put i=1,
11
4 x 1 ( y 22 y 1+ y 0 ) + y 1=0
6 ( y 22 y 1 + y 0 ) + y 1=0
6 y 211 y 1 +6 y 0=0
11 y 1 +6 y 0 =6 (3 )
y 0=
48
42
=1.6552, y 1= =1.4482
29
29
12