Dca2101 - Computer Oriented Numerical Methods
Dca2101 - Computer Oriented Numerical Methods
Dca2101 - Computer Oriented Numerical Methods
NAME DHANANJAY
ROLL NO 2214504860
SEMESTER
III
Set I
1
(a) δμ= (∆+ ∇)
2
{
δij= 1∧if i= j
0∧if i ≠ j
1
δμ= (∆+ ∇)
2
When µ = µ :
𝛿µµ = 1
When µ = µ :
𝛿µµ = 0
1
Therefore , the expression δμ µ= ( ∆+∇ ) doesn’t hold true for arbitrary µ .
2
(b) ∆−∇=∆ ∇
+ (
∂ ∂ ^
∂z ∂ y
j )+
∂z(∂z )
∂ ∂ ^
k
It appears that Δ−∇ is not equal to Δ ∇ based on thew definitions of the Laplacian and gradient
operators . The result dose not simplify to the from Δ−∇=¿ Δ ∇.
Therefore ,
2 x+ y+ 4 z=12
4 x+11 y−z=33
8 x−3 y +2 z=20.
1. 2 x+ y+ 4 z=12
2. 4 x+11 y−z=33
3. 8 x−3 y +2 z=20
( )
2 1 412
2 11 −133
8 −3 220
Now, let's perform row operations to bring this matrix to row-echelon form:
R2 = R2 - 2 * R1
R3 = R3 - 4 * R1
2 1 12 12
( 0 9
)
9 33
0 0 −21- 21
-21 z = -21
z=1
Substituting z =1 into the second row:
9y -9=9
9 y 18
Y=2
2 x + 2 + 4 = 12
2x=6
X=3
Therefore ,
Question .3.) Find the equation of the best fitting straight line for the data:
X 1 3 4 6 8 9 11 14
Y 1 2 4 4 5 7 8 9
Answer.:-
Given data:
X: 1, 3, 4, 6, 8, 9, 11, 14
Y: 1, 2, 4, 4, 5, 7, 8, 9
Calculations:
n=8
Set - II
x 10 20 30 40 50
y = f (x) 46 66 81 93 101
Answer.:-
Given the points (x, y):
(10, 46) and (20, 66)
The formula for linear interpolation between two points is:
(x−x 0).(f (x 1)−f (x 0 ))
f ( x )=f ( x 0 )
x 1−x 0
Where .:-
x 0∧f (x 0 )are t h e values at t h e point before t h e target value(¿ t his case , x=10∧f (x )=46)
x 1∧f (x 1)are t h e va lues at t h e point before t h e target value (¿ t h is case , x=20∧f (x)=66)
¿ f ( x )=66 ¿ ,
(15−10).(66−46)
f ( 15 )=46 +
20−10
5.20
f ( 15 )=46 +
10
f ( 15 )=46 +10
f ( 15 )=56
So ,
Based on linear interpolation from the given table , f ( 15 )=56
Question .5.) Use Taylor’s series method to solve the initial value problem:
dy 2 2
=x + y for x=0 . 25∧0 . 5 given that y (0)=1 .
dx
Answer.:-
To solve for the coefficients, equate the corresponding powers of x on both sides of the
equation.
At x = 0 :
2 2
y 1=0 + y 0 ¿
So , y1 = 1 .
At x = 0 :
y 1=¿ 2y2(0)= 02
So , y2 = 0 .
We've found the first two coefficients. Now, we can express y(x) using the Taylor series
expansion:
Substituting the values we found:
y (x) = 1 + x
Now, we'll use this approximation to find the values of Y AT X = 0.25 and x = 0.5 :
Y ( 0 . 25) = 1 + 0.25 = 1.25
Y ( 0.5) = 1 + 0.5 = 1.5
So, using Taylor's series method, the approximated values of y at x = 0.25 and x = 0.5
are 1.25 and 1.5 respectively , based on the first – order Taylor series expansion around
x=0.
Answer .:-
dy 2
Given the initial condition =x − y , y ( 0 )=1 , we need to solve for y at x = 0.1
dx
The fourth-order Runge-Kutta method involves the following steps:
1. Define the step size , h .
2. Using following formulas to iterate and approximate y :
k 1=h f (x n , y n)
h k1
k 2=h f (x n + , y n + )
2 2
h k 2
k 3=h f (x n+ , y n+ )
2 2
k 4=h f (x n +h , y n +k 3)
1
y n +1= y n+ ( k 1+ 2 k 2+ 2k 3+ 2 k 4 )
6
w h ere .:−¿
h is the step size .
x n and y n are the known x and y values at the current step .
F(x,y) is the differential equation : x2 – y .
Let's implement this algorithm to find the approximate value of y when x = 0.1 we’ll
start with h = 0.1 for this example .
Let me recompute the solution using the fourth-order Runge-Kutta method.
dy 2
Given the differential equation =x − y and the initial condition y(0) = 1 , we want
dx
to find the approximate value of y at x = 0.1 .
1. Define the function f(x,y) based on the given differential equation .:-
2. Using the following formulas to iterate and approximate y :
k 1=h . f (x n , y n)
h k1
k 2=h . f ( x n + , y n + )
2 2
h k 2
k 3=h . f ( x n + , y n + )
2 2
k 4=h . f (x n+ h , y n+ k 3)
1
y n +1= y n+ ( k 1+ 2 k 2+ 2k 3+ 2 k 4 )
6
Let's compute the approximate value of y at x 0.1 using the given method and
initial conditions .
Let's use the fourth-order Runge-Kutta method to approximate the value of y
where x = 0.1 for the given differential equation :-
dy 2
=x − y
dx
with the initial condition y (0) = 1.
The fourth-order Runge-Kutta method involves iterative steps. We'll use a step
size h and perform calculations to approximate y at x = 0.1. The
formulas for the method are:
1. k 1=h . f (x n , y n)
h k
2. k 2=h . f ( x n + , y n + 1 )
2 2
h k
3. k 3=h . f ( x n + , y n + 2 )
2 2
4. k 4=h . f (x n+ h , y n+ k 3)