0% found this document useful (0 votes)
9 views11 pages

Numerical Methods and Interpolation Techniques

The document contains a series of mathematical problems and their solutions, including calculations for percentage error, divided differences, numerical integration using various methods, and the application of interpolation formulas. It also includes the derivation of Newton's Forward Interpolation Formula and the Trapezoidal Rule, as well as the use of the Runge-Kutta method for solving differential equations. Each problem is presented with a step-by-step solution, providing clear answers to each mathematical inquiry.

Uploaded by

tatheutkarsha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

Numerical Methods and Interpolation Techniques

The document contains a series of mathematical problems and their solutions, including calculations for percentage error, divided differences, numerical integration using various methods, and the application of interpolation formulas. It also includes the derivation of Newton's Forward Interpolation Formula and the Trapezoidal Rule, as well as the use of the Runge-Kutta method for solving differential equations. Each problem is presented with a step-by-step solution, providing clear answers to each mathematical inquiry.

Uploaded by

tatheutkarsha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1) Attempt any five questions out of seven

[5 × 2 = 10]

(a) Find percentage error of the number 5/9 whose approximate value is
0.56.

Exact value of the number = 5/9 = 0.5555

Approximate value = 0.56

Absolute error = |0.56 – 0.5555| = 0.0045

Percentage error = (0.0045 / 0.5555) × 100

Percentage error = 0.81 %

Answer: Percentage error is 0.81 %

(b)Prove that ∇ = Δ E⁻¹ by usual notations.

We know that

Δ=E–1

Multiplying both sides by E⁻¹,

Δ E⁻¹ = (E – 1) E⁻¹

Δ E⁻¹ = 1 – E⁻¹

But,

∇ = 1 – E⁻¹

Therefore,

∇ = Δ E⁻¹

Hence proved.

© Let f(x) = 1/x. Find divided difference [a, b, c].

Given,

F(a) = 1/a

F(b) = 1/b

F© = 1/c

First divided difference:


[a, b] = (f(a) – f(b)) / (a – b)

= (1/a – 1/b) / (a – b)

= −1 / (ab)

[b, c] = −1 / (bc)

Second divided difference:

[a, b, c] = ([a, b] – [b, c]) / (a – c)

= (−1/ab + 1/bc) / (a – c)

= 1 / (abc)

Answer: Divided difference [a, b, c] = 1 / (abc)

(c) Given that

F(1)=1, f(2)=4, f(3)=9, f(4)=16, f(5)=25

Find ∫ from 1 to 5 f(x) dx using Trapezoidal rule.

Step size h = (5 – 1) / 4 = 1

Table:

X 1 2 3 4 5

F(x) 1 4 9 16 25

Trapezoidal rule:

∫ f(x) dx = h/2 [y₀ + yₙ + 2(y₁ + y₂ + y₃)]

= ½ [1 + 25 + 2(4 + 9 + 16)]

= ½ [26 + 58]

= 42

Answer: ∫ from 1 to 5 f(x) dx = 42

€ Using Euler’s method find y(0.1) given

Dy/dx + 2y = 0, y(0) = 1

Dy/dx = −2y

Step size h = 0.1

Euler’s formula:
Y₁ = y₀ + h f(x₀, y₀)

Y(0.1) = 1 + 0.1 (−2 × 1)

Y(0.1) = 0.8

Answer: y(0.1) = 0.8

(f) Write Simpson’s (3/8) rule for numerical integration.

Simpson’s (3/8) rule is

∫ y dx = (3h / 8) [ y₀ + yₙ + 3(y₁ + y₂ + y₄ + y₅ + …) + 2(y₃ + y₆ + …) ]

(g) Evaluate Δ² x² with h = 1.

Table:

X 0 1 2 3

X² 0 1 4 9

Δ 1 3 5

Δ² 2 2

Therefore,

Δ² x² = 2

Answer: Δ² x² = 2

Q.2) Attempt any three of the following

[3 × 5 = 15]

(a) Derive Newton’s Forward Interpolation Formula for equal intervals.

Let the given data be at equally spaced points with interval h.

X : x0, x1, x2, x3, …

Y : y0, y1, y2, y3, …

Where

X1 = x0 + h,

X2 = x0 + 2h, and so on.

Using forward differences,

Δy0 = y1 – y0
Δ²y0 = Δy1 – Δy0

Δ³y0 = Δ²y1 – Δ²y0

Let x = x0 + uh, where

U = (x – x0) / h

Newton’s forward interpolation formula is

Y = y0

U Δy0

U(u – 1)/2! Δ²y0

U(u – 1)(u – 2)/3! Δ³y0

………

This formula is used when the value of x is near the beginning of the table.

Hence, Newton’s Forward Interpolation Formula is derived.

(b)Find the real root of the equation

X³ − x – 4 = 0

In the interval [1, 2] correct up to two decimal places using Regula Falsi
Method.

Let

F(x) = x³ − x – 4

F(1) = 1 – 1 – 4 = −4

F(2) = 8 – 2 – 4 = 2

Since f(1) and f(2) are of opposite signs, a root lies between 1 and 2.

Regula Falsi formula is

X = [a f(b) – b f(a)] / [f(b) – f(a)]

First approximation:

X1 = [1(2) – 2(−4)] / [2 – (−4)]

X1 = (2 + 8) / 6

X1 = 1.67
F(1.67) ≈ −0.01

Second approximation gives

X ≈ 1.79

Correct up to two decimal places,

Answer: Real root of the equation is x = 1.79

© Using Lagrange’s Interpolation Formula find f(2)

Given that

F(1) = 1, f(3) = 27, f(4) = 64.

Lagrange’s interpolation formula is

F(x) = Σ yi Li(x)

Where

Li(x) = Π (x – xj) / (xi – xj), j ≠ i

Substituting given values,

F(2)

= 1 × [(2 – 3)(2 – 4)] / [(1 – 3)(1 – 4)]

27 × [(2 – 1)(2 – 4)] / [(3 – 1)(3 – 4)]

64 × [(2 – 1)(2 – 3)] / [(4 – 1)(4 – 3)]

After simplification,

F(2) = 8

Answer: f(2) = 8

(c) Evaluate ∫ from 0 to 6 (1 / (1 + x)) dx

Using Simpson’s 1/3 rule. Take h = 1.

Given

H=1

X = 0, 1, 2, 3, 4, 5, 6

Table:

X 0 1 2 3 4 5 6
Y 1 0.5 0.33 0.25 0.20 0.17 0.14

Simpson’s 1/3 rule is

∫ y dx = (h/3)[ y0 + yn + 4(y1 + y3 + y5) + 2(y2 + y4) ]

Substituting values,

∫ y dx = (1/3)[1 + 0.14 + 4(0.5 + 0.25 + 0.17) + 2(0.33 + 0.20)]

∫ y dx ≈ 1.95

Answer: Value of the integral is approximately 1.95

€ Find the missing value of the data.

X 1 2 3 4 5

F(x) 7 ? 13 21 31

The given data is at equal intervals.

Using interpolation method, the missing value at x = 2 is calculated.

After applying finite differences,

Missing value of f(2) = 9

Answer: Missing value is 9

Q.3) Attempt any one of the following

[10 Marks]

(a) Find √12 using Newton–Raphson method correct up to four decimal


places.

Let

F(x) = x² − 12

Then

F′(x) = 2x

Newton–Raphson formula is

Xₙ₊₁ = xₙ − f(xₙ) / f′(xₙ)

Choose an initial approximation

X₀ = 3.5 (since √12 lies between 3 and 4)


First iteration:

X₁ = 3.5 – (3.5² − 12) / (2 × 3.5)

X₁ = 3.5 – (12.25 – 12) / 7

X₁ = 3.5 – 0.25 / 7

X₁ = 3.4643

Second iteration:

X₂ = 3.4643 – (3.4643² − 12) / (2 × 3.4643)

X₂ ≈ 3.4641

Since the value is stable up to four decimal places,

Answer: √12 = 3.4641

(b)Derive Trapezoidal Rule for numerical integration.

Let the interval [a, b] be divided into n equal parts, each of width h.

H = (b – a) / n

Let the ordinates be

Y₀, y₁, y₂, … , yₙ

The area under the curve between successive ordinates is approximated by


trapeziums.

Area of one trapezium = (h / 2)(sum of parallel sides)

Total area is the sum of areas of all trapeziums.

Therefore,

∫ from a to b f(x) dx

= h/2 [ y₀ + yₙ + 2(y₁ + y₂ + y₃ + … + yₙ₋₁) ]

This formula is known as the Trapezoidal Rule.

Hence, the Trapezoidal Rule is derived.

© Solve the differential equation

Dy/dx = x + y

With initial condition y(0) = 1


Using Runge–Kutta method of fourth order.

Find y(0.1) and y(0.2).

Given

Dy/dx = f(x, y) = x + y

Step size

H = 0.1

Initial values

X₀ = 0, y₀ = 1

Formulae:

K₁ = h f(x₀, y₀)

K₂ = h f(x₀ + h/2, y₀ + k₁/2)

K₃ = h f(x₀ + h/2, y₀ + k₂/2)

K₄ = h f(x₀ + h, y₀ + k₃)

For x = 0.1,

K₁ = 0.1(0 + 1) = 0.1

K₂ = 0.1(0.05 + 1.05) = 0.11

K₃ = 0.1(0.05 + 1.055) = 0.1105

K₄ = 0.1(0.1 + 1.1105) = 0.12105

Y(0.1) = y₀ + (1/6)(k₁ + 2k₂ + 2k₃ + k₄)

Y(0.1) ≈ 1.1103

For x = 0.2,

Using y(0.1) = 1.1103,

Y(0.2) ≈ 1.2428

Answer:

Y(0.1) = 1.1103

Y(0.2) = 1.2423
Question:

Given that

Dy/dx = 1 + y²

With y(0) = 0.

Obtain y(0.2) and y(0.4) using Runge–Kutta method of 4 th order.

Take step length h = 0.2.

Solution:

Given

Dy/dx = f(x, y) = 1 + y²

Initial value:

X₀ = 0, y₀ = 0

Step size: h = 0.2

Formulae of Runge–Kutta 4th order method:

K₁ = h f(x₀, y₀)

K₂ = h f(x₀ + h/2, y₀ + k₁/2)

K₃ = h f(x₀ + h/2, y₀ + k₂/2)

K₄ = h f(x₀ + h, y₀ + k₃)

Y₁ = y₀ + (1/6)(k₁ + 2k₂ + 2k₃ + k₄)

Step 1: To find y(0.2)

X₀ = 0, y₀ = 0

K₁ = 0.2 [1 + 0²]

K₁ = 0.2

K₂ = 0.2 [1 + (0 + 0.2/2)²]

K₂ = 0.2 [1 + 0.01]

K₂ = 0.202

K₃ = 0.2 [1 + (0 + 0.202/2)²]

K₃ = 0.2 [1 + 0.010201]
K₃ = 0.20204

K₄ = 0.2 [1 + (0 + 0.20204)²]

K₄ = 0.2 [1 + 0.04082]

K₄ = 0.20816

Now,

Y(0.2)

= 0 + (1/6)(0.2 + 2(0.202) + 2(0.20204) + 0.20816)

= (1/6)(1.21624)

= 0.2027

Step 2: To find y(0.4)

Now take

X₁ = 0.2, y₁ = 0.2027

K₁ = 0.2 [1 + (0.2027)²]

K₁ = 0.2 [1 + 0.0411]

K₁ = 0.20822

K₂ = 0.2 [1 + (0.2027 + 0.20822/2)²]

K₂ = 0.2 [1 + (0.30681)²]

K₂ = 0.21883

K₃ = 0.2 [1 + (0.2027 + 0.21883/2)²]

K₃ = 0.2 [1 + (0.31212)²]

K₃ = 0.21948

K₄ = 0.2 [1 + (0.2027 + 0.21948)²]

K₄ = 0.2 [1 + (0.42218)²]

K₄ = 0.23564

Now,

Y(0.4)

= 0.2027 + (1/6)(0.20822 + 2(0.21883) + 2(0.21948) + 0.23564)


= 0.2027 + (1/6)(1.32048)

= 0.2027 + 0.22008

= 0.4228

Final Answer:

Y(0.2) = 0.2027

Y(0.4) = 0.4228

Common questions

Powered by AI

Newton's Forward Interpolation is derived by expanding the function in terms of forward differences for equally spaced data points. The formula is \(Y = y_0 + uΔy_0 + u(u-1)Δ²y_0/2! + u(u-1)(u-2)Δ³y_0/3! + \ldots\), where u = (x - x₀)/h .

Runge–Kutta method involves iterative calculations for higher precision. Given dy/dx = x + y, initial y(0)=1, step size h=0.1. It computes K1 through K4 for x=0.1 yielding Y(0.1)=1.1103 and repeats with Y(0.1) to find Y(0.2)=1.2428, using the formula \(Y_{n+1} = Y_n + (1/6)(K1 + 2K2 + 2K3 + K4)\).

Regula Falsi method, or false position method, estimates the root by linearly interpolating between points where the function changes signs. For X³ - x - 4 = 0 in [1, 2], it calculates intermediate points using \(X = [a f(b) - b f(a)] / [f(b) - f(a)]\) until the desired accuracy is reached, giving a root of 1.79 .

The percentage error is calculated using the formula: \((|\text{approximate value} - \text{exact value}| / \text{exact value}) \times 100\). For the fraction 5/9, the approximate value is 0.56 and the exact value is 0.5555. The absolute error is 0.0045, and the percentage error is \((0.0045 / 0.5555) \times 100 = 0.81\%\).

The Trapezoidal Rule approximates the area under a curve as a series of trapezoids. The formula is \(\int_a^b f(x) dx \approx (h/2) [y_0 + y_n + 2(y_1 + y_2 + \ldots + y_{n-1})]\), where h is the step size, and y's are the function values at the respective points .

Euler's method estimates the value of a solution to a differential equation at a point by taking steps along the direction given by the derivative. For Dy/dx = -2y with y(0) = 1 and step size h = 0.1, the calculation is \(Y(0.1) = 1 + 0.1(-2 \times 1)\), giving \(Y(0.1) = 0.8\).

Simpson’s 1/3 Rule is applied by computing \(\int_{0}^{6} \frac{1}{1+x} dx\) with h=1 and function values at x = 0, 1,...,6. The formula is \(\int y dx = (h/3)[ y_0 + y_n + 4(y_1+y_3+y_5) + 2(y_2+y_4)]\), approximating the integral as 1.95 .

The proof involves using the definitions of Δ and E. Given Δ = E - 1, multiplying both sides by E⁻¹ gives ΔE⁻¹ = (E - 1)E⁻¹. This simplifies to ΔE⁻¹ = 1 - E⁻¹. Since ∇ is defined as 1 - E⁻¹, it follows that ∇ = ΔE⁻¹ .

Lagrange’s Interpolation constructs a polynomial through given data points by setting \(f(x) = Σ y_i L_i(x)\), where \(L_i(x) = ∏ (x-x_j)/(x_i-x_j)\), j ≠ i. Given points F(1)=1, f(3)=27, f(4)=64, this calculates f(2) = 8 using substitution in the polynomial .

Simpson's (3/8) rule approximates the integral by fitting parabolas through sets of function values. The formula is \(\int y dx = (3h/8) [y_0 + y_n + 3(y_1 + y_2 + y_4 + y_5 + \ldots) + 2(y_3 + y_6 + \ldots)]\), where h is the step size .

You might also like