You are on page 1of 7

Directorate of Online Education

NAME
ROLL NO
PROGRAM BCA
SEMESTER III
COURSE CODE & NAME DCA2101 &
COMPUTER ORIENTED NUMERICAL
METHODS

SET-I
SOLUTION 1(a)

Prove that

As we know, μ = (E1/2 + E-1/2)/2

δ = (E1/2 – E-1/2),

δμ = (E1/2 – E-1/2) [(E1/2 + E-1/2)/2] [Formula-(a2 – b2) = (a+b) (a – b)]

= (E – E-1) /2 [Result ∆ = E – 1, and, ∇ = 1 – E-1]

= [(1+∆ ) – (1 –∇ )]/2 … (1)

1
δμ = (∆+ ∇)
2
Hence, proved L.H.S. is equal to R.H.S.

SOLUTION 1(b) -

Starting from the R.H.S

∆ ∇ = (E – 1) (1 – E -1)
= (E – 1) [1 – (1/E)]

= E – 1 – 1 + (1/E)

= (E – 1) – [1 – (1/E)]

= ∆ – ∇ = L.H.S

Hence, proved

SOLUTION 2- Using the Gauss elimination method, firstly creating the augmented matrix for
the given pair of linear equations

1st rule - R2 = R2 -2R1

| |
2 1 4 :12
0 9 −9 :9
8 −3 2 :20

2nd Rule- R3 = R3 -4R1

| |
2 1 4 :12
0 9 −9 :9
0 −7 −14 :−28

3rd rule - R2 = R2/9

| |
2 1 4 :12
0 1 −1 :1
0 −7 −14 :−28

4th Rule- R3 = R3 + 7R2

| |
2 1 4 :12
0 1 −1 :1
0 0 −21 :−21

So, here is the upper triangular matrix

Comparing linear equations with upper triangular matrix

2x + y + 4z = 12 …….. (1)

y–z=1 …….. (2)


-21z = -21 …….. (3)

z=1

Substitute the value of z = 1 in the (2) equation

y=2

And now putting the value of z and y in (1) equation

x=3

So, here is the solution of given pair of linear equations x = 3, y = 2, z = 1

SOLUTION 3-
Given Table that consists the value of x and y variable

X 1 3 4 6 8 9 11 14
Y 1 2 4 4 5 7 8 9

(x_a) = (Sum of all x values) / number of x terms

= (1+3+4+6+8+9+11+14) / 8

=7

(y_a) = (Sum of all y values) / number of y terms

= (1+2+4+4+5+7+8+9) / 8

=5

x y x_a y_a x-(x_a) y-(y_a) [x-(x_a)]2 [x-(x_a)][ y-(y_a)]

1 1 7 5 -6 -4 36 24
3 2 7 5 -4 -3 16 12
4 4 7 5 -3 -1 9 3
6 4 7 5 -1 -1 1 1
8 5 7 5 1 0 1 0
9 7 7 5 2 2 4 4
11 8 7 5 4 3 16 12
14 9 7 5 7 4 49 28
Slope (m) = sum of the [x-(x_a)][ y-(y_a)] / sum of the [x-(x_a)]2

= 84 / 132

= 0.63 ………. (1)

The best fitting straight line Equation is (y_a) = m (x_a) + b

On Using the values of m, (y_a), and (x_a),

5 = (0.63)(7) + b

On solving b = 0.59 …… (2)

So, the best fitting straight line is y = 0.63x +0.59 …….. (y = mx+b)

SET-II
SOLUTION 4- With the use of given data table of x and y

Now, finding the value of f(15)

As we can see the given data, value x=15 is lie between first 2 intervals 10 to 20

f(15) = f(10) + [(f(20) – f(10))/ (x2 – x1)] (15 – 10)

f(15) = 46 + [(66- 46)/(20 – 10)] (5)

f(15) = 46 + (20 /10) 5

f(15) = 46 + 10

f(15) = 56

Thus, the value of f(15) = 56

dy 2 2
SOLUTION 5- Given terms- =x + y and y ( 0 )=1
dx

For a function y(x) around a point x0, Taylor’s series will be

y(x) = y(x0) + y′( x0)(x− x0) + (y′′( x0)/2!) (x− x0)2 + (y′′′( x0)/3!) (x− x0)3+…

Finding few derivatives of y(x):


dy 2
1st derivative of given equation =2 xy + x
dx

2nd derivative d2y/dx2 = 2y +2x

3rd derivative d3y/dx3 = 2(y' +1)

dy 2 2
These are the derivatives of given equation =x + y
dx

At x=0, y(0) =1

dy/dx|x=0 = 1

d2y/dx2|x=0 = 2(1) + 0 = 2

d3y/dx3 |x=0 = 2(0 +1) = 2

Now putting all the values in the series

y (x) = 1 + 0(x – 0) + (2/2!)(x - 0)2 + (2/3!)(x - 0)3 + ………

On solving:

y(x) = 1 + x2 + x3/3 + ………

Now finding the values-

y(0.25) = 1 + (0.25)2 + (0.25)3/3

y(0.25) = 1 + 0.0625 + 0.00520

y(0.25) = 1.067

y(0.5) = 1 + (0.5)2 + (0.5)3/3

y(0.5) = 1 + 0.25 + 0.0416

y(0.5) = 1.291

SOLUTION 6- Using the Runge-Kutta fourth order method, we have to find the approximate
value of y at x = 0.1

Formula of Runge-Kutta method is

yn+1 = yn + (K1+2K2+2K3+K4)/6 …………….(1)


Let’s Compare all the terms f(x,y) = x 2− y

Let us Assumes that, xn = xn + h and yn = y(xn)

Assume x0 = 0

x1 = x0 + h = 0 +0.1 = 0.1

So, x1 = 0.1 and y0 = 1 {Because yn = y(xn)}

So for n=0, the formula becomes,

y1 = y0 + (K1+2K2+2K3+K4)/6

Similarly, we find the values of K1, K2, K3, K4 at n=0

K1 = hf(x0 , y0)

K1 = (0.1) f(0,1) [h=0.1, x0 = 0, y0 = 1]

K1 = (0.1) (02-1) [f(x,y) = x 2− y ]

K1 = -0.1 …..(a)

K2 = hf(x0 + (h/2) , y0 + (K1/2))

K2 = (0.1) f(x0 + (0.1/2) , y0 + (-0.1/2))

K2 = (0.1) f(0+0.05 , 1- 0.05)

K2 = (0.1) f(0.05 , 0.95)

K2 = (0.1) [(0.05)2 – 0.95] [f(x,y) = x 2− y ]

K2 = (0.1)(0.0025 – 0.95)

K2 = -0.09475 …..(b)

K3 = hf(x0 + (h/2) , y0 + (K2/2))

K3 = (0.1) f(0 + (0.1/2) , 1+ (-0.09475/2))

K3 = (0.1) f(0.05 , 0.95263)

K3 = (0.1) [(0.05)2 – 0.95263]

K3 = -0.095013 …..(c)

K4 = hf(x0 + h , y0 + K3)
K4 = (0.1) f(0+0.1 , 1+(-0.095013))

K4 = (0.1) f(0.1 , 0.904988)

K4 = (0.1) [(0.1)2 – 0.904988]

K4 = (0.1) (-0.894988)

K4 = -0.089499

Put all the values here in this formula

y1 = y0 + (K1+2K2+2K3+K4)/6

y(0.1) = 1 + [-0.1 + (2) (-0.09475) + (2) (-0.095013) - 0.089499]/6

y(0.1) = 1 + [-0.1 – 0.1895 – 0.190026 - 0.089499]/6

y(0.1) = 1 + ( -0.5690250)/6

y(0.1) = 1 – 0.0948375

y(0.1) = 0.9051625 ᴝ 0.905

Approximate value of y when x = 0.1 is 0.905

You might also like