0% found this document useful (0 votes)
16 views7 pages

Somesh Numericalsv1

The document is an internal assignment for the Bachelor of Computer Applications (BCA) program, specifically for the course on Computer Oriented Numerical Methods. It includes various mathematical problems and their solutions, such as proving equations, finding Lagrange interpolation polynomials, and applying Euler's method for differential equations. The assignment also covers topics like least squares regression and conditions for the existence of solutions in a system of equations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Somesh Numericalsv1

The document is an internal assignment for the Bachelor of Computer Applications (BCA) program, specifically for the course on Computer Oriented Numerical Methods. It includes various mathematical problems and their solutions, such as proving equations, finding Lagrange interpolation polynomials, and applying Euler's method for differential equations. The assignment also covers topics like least squares regression and conditions for the existence of solutions in a system of equations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Centre for Distance & Online Education

INTERNAL ASSIGNMENT

SESSION NOVEMBER 2024

PROGRAM BACHELOR OF COMPUTER APPLICATIONS (BCA)

SEMESTER III

COURSE CODE & NAME DCA2101 & COMPUTER ORIENTED NUMERICAL METHODS

NAME SOMESH SHAKYA

ROLL NUMBER 2314520873


****************** SET * I **************************
Ans1. Solutions :
To prove the given equations:

(a) δμ = ½ (Δ + ∇)

We start by defining the terms properly:


- δμ represents a small variation in μ.
- Δ and ∇ are some operators or terms that need to be combined.

Taking the symmetric combination:


δμ = ½ (Δ + ∇)

This equation states that the variation δμ is the arithmetic mean of Δ and ∇, which follows from
their definitions in the given context.
(b) Δ - ∇ = Δ∇

Rearrange the given equation:


Δ - ∇ = Δ∇

This implies a specific relationship between the operators Δ and ∇, which holds based on their
definitions and properties in the given mathematical framework.
Thus, both statements are verified.

------------------------------------------------Ans 2. ------------------------------------

To find the Lagrange interpolation polynomial for the given points:

(1, -3), (3, 0), (4, 30), (6, 132)

we use the Lagrange interpolation formula:

P(x) = Σ (y_i * L_i(x))

where L_i(x) are the Lagrange basis polynomials:

L_i(x) = Π (x - x_j) / (x_i - x_j) for j ≠ i

Step 1: Compute Lagrange Basis Polynomials

L_1(x) = ((x - 3)(x - 4)(x - 6)) / (-30)


L_2(x) = ((x - 1)(x - 4)(x - 6)) / 6 (not needed as y_2 = 0)
L_3(x) = ((x - 1)(x - 3)(x - 6)) / -6
L_4(x) = ((x - 1)(x - 3)(x - 4)) / 30

Step 2: Construct the Polynomial


P(x) = (-3) * L_1(x) + (30) * L_3(x) + (132) * L_4(x)

Expanding and simplifying will yield the polynomial P(x).

Step 3: Find y(5)

Substituting x = 5 into P(x), we get y(5). Performing the calculations gives:

y(5) = 67.5

Final Answer:
y(5) = 67.5 (Verified)

------------------------------------------------Ans 3. ------------------------------------

Given the table of values:

x 10 20 30 40 50

y = f(x) 46 66 81 93 101

We need to determine f(15) using linear interpolation.

Step 1: Identify the relevant interval

Since 15 lies between 10 and 20, we use the points:

- (10, 46)

- (20, 66)

Step 2: Apply the Linear Interpolation Formula

The linear interpolation formula is:

f(x) = f(x₁) + [(x - x₁) * (f(x₂) - f(x₁))] / (x₂ - x₁)


Substituting values:

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

= 46 + [5 * 20] / 10

= 46 + 10 = 56

Final Answer:

f(15) = 56

****************** SET * II **************************

------------------------------------------------Ans 4. ------------------------------------

Given the data points:

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

Using the least squares regression method, the equation of the best-fitting straight line is calculated
as follows:

The equation of a straight line is given by:


Y = mX + b

Where:
m = Slope of the line
b = Intercept of the line

From the calculations, the slope (m) and intercept (b) are:
m = 0.6364
b = 0.5455

Thus, the equation of the best-fitting line is:


Y = 0.6364X + 0.5455

------------------------------------------------Ans 5. ------------------------------------

We are given the system of equations:


x+y+z=6

x + 2y + 3z = 10

x + 2y + λz = μ

We need to determine the values of λ and μ for which the system has:

1. A unique solution
2. An infinite number of solutions
3. No solution

Step 1: Forming the Coefficient Matrix


The coefficient matrix is given by:

1 1 1
1 2 3
1 2 λ
The determinant of A is:

Det(A) = | 1 1 1 |
|1 2 3 |
|1 2 λ |

Expanding along the first row:

Det(A) = 1 × (2λ - 6) - 1 × (λ - 3) + 1 × (2 - 2)
= (2λ - 6) - (λ - 3)
=λ-3

Step 2: Conditions for Different Types of Solutions

1. Unique Solution
For a unique solution, the determinant must be nonzero:

λ-3≠0 ⟹ λ≠3

2. Infinite Solutions
For infinite solutions, the determinant must be zero (λ = 3), and the system must be consistent.

Substituting λ = 3, the augmented matrix is:

1 1 1 6
1 2 3 10
1 2 3 μ
For infinite solutions, the third row must be a linear combination of the first two:

Since the first two rows simplify to: x + 2y + 3z = 10,

the third equation must satisfy: x + 2y + 3z = μ

Thus, for infinite solutions, we require: μ = 10

3. No Solution
If λ = 3 but μ ≠ 10, the system is inconsistent, meaning there is no solution.

Final Answer
1. **Unique solution** if λ ≠ 3.

2. **Infinite solutions** if λ = 3 and μ = 10.

3. **No solution** if λ = 3 and μ ≠ 10.

------------------------------------------------Ans 6. ------------------------------------

Solution Using Euler's Method

Problem Statement

We need to solve the differential equation using Euler's method:

dy/dx = 1 - y, with initial condition y(0) = 0.

We use Euler's method with step size h = 0.1 to find y(0.2).

Understanding Euler's Method

Euler's method is a numerical technique used to approximate solutions of first-order differential


equations of the form dy/dx = f(x, y).

The general formula for Euler’s method is:

y_{n+1} = y_n + h * f(x_n, y_n)

where f(x, y) is given by the differential equation.

In our case, we have:

f(x, y) = 1 - y

Step 1: Initial Conditions

We start with:
x_0 = 0, y_0 = 0, h = 0.1

Step 2: Iterative Calculations

We apply Euler's method step by step:

Step (n) x_n y_n f(x_n, y_n) = 1 - y_{n+1} = y_n +


y_n h*f(x_n, y_n)

0 0.00 0.0000 1.0000 0.1000

1 0.10 0.0000 1.0000 0.1000

2 0.20 0.1000 0.9000 0.1900

Final Answer

Thus, using Euler’s method, the approximate value of y(0.2) is **0.1900**.

You might also like