Q1. The function to be integrated numerically is

a) Graph of the function in the region of integration is given below. This graph has been generated using MS Office Excel by calculating the value of the function for values of x in the range 0 to 1 at the step size of 0.1.

b)

c) Using Mid-Point Rule

Let us take step size h = 0.5

Now the value of the integral will be

M2 = h*[f(0.25) + f(0.75)] = 0.5* (0.964929 + 0.836029) = 0.909169

Similarly, for step size h = 0.25

M4 = 0.25*[f(0.125) + f(0.375) + f(0.6250) + f(0.875)] = 0.904098

Similarly, for step size h = 0.125

M8 = 0.125 * [f(0.0625) + f(0.1875) + f(0.3125) + f(0.4375) + f(0.5625) + f(0.6875) + f(0.8125) + f(0.9375)] = 0.902808

Using Trapezium rule with

Step size h = 0.5

The integral will be

T2 = (h/2)*[f(0) + 2*f(0.5) + f(1.0)] = 0.25 * 3.554699 = 0.888675

Step size h = 0.25

The integral will be

T4 = (h/2)*[f(0) + 2*[f(0.25) + f(0.5) + f(0.75)] + f(1.0)]

= 0.125 * 7.191373 = 0.898922

Step size h = 0.125

The integral will be

T8 = (0.125/2) * 14.424154 = 0.901510

Simpson’s Method:

Simpson’s method gives

Where n is the number of steps, M and T represent value of the integral corresponding to the n number of steps. In this case I have chosen n to be 10; therefore,

c) Extrapolation to infinity

is a geometric series with a = (first term) and r = ¼

Therefore,

d) The value of integral has been calculated up to six decimal places to minimize truncation error arising out of large number of steps.

Q2. (i) The finite difference table was constructed using MS Office Excel. It is presented below:

xi

fi

Dfi

D2fi

D4fi

D6fi

-2

0.014264

0.331327

-1

0.345591

0.323083

0.654409

-1.631901

0

1.000000

-1.308818

3.263802

-0.654409

1.631901

1

0.345591

0.323083

-0.331327

2

0.014264

Because h = 1 here, therefore, the Newton Interpolating polynomial will be

(ii) Therefore,

(iii) Using Midpoint rule Let us take a step size h = 0.20; then

M4 = 0.20*[f(0.10) + f(0.30) + f(0.50) + f(0.70) + f(0.90)] = 0.20 * 3.682 = 0.74

Using Trapezium rule and again taking step size h = 0.20

T5 = (h/2)*[f(0)+2*[f(0.20) + f(0.40) + f(0.60) + f(0.80)] + f(1.0)]

= (0.20/2) * 7.327243 = 0.73

Now, using Simpson’s rule

Thus, it can be seen that N(x) is a good approximation of f(x) because the value of the integral for the function as well as the corresponding N(x) is agreeing with each other with great accuracy.

Q3. Given equation is

To solve this equation in 0 to 5 range, what is required is to compute roots of f(x) in the same range such that f(x) =

f’(x) =

Value of f(x) was computed in (0, 5) range at step size of 0.1 and it was found that value of f(x) changes its sign from +ve to –ve between x = 1.0 and x = 1.2 and again from –ve to +ve between x = 2.8 to x = 2.9 and nowhere else.

Thus it can be concluded that the given equation has two solutions in (0, 5) range – one solution is near x = 1 and another near x = 2.8. Further iterations will be made around these two points to get more accurate solution points.

Iteration between x = 1.0 and x = 1.1

x =1 f(x) = 0.121029; x = 1.1 f(x) = -0.01962

Therefore, x0 = 1.0 f(x) = -0.01535

x1 = 1.05 f(x) = 0.047458

x2 = 1.075 f(x) = 0.013142

x3 = 1.0875 f(x) = -0.00343

x4 = 1.08125 f(x) = 0.004809

x5 = 1.084375 f(x) = 0.000679

Thus solution of the given equation up to six decimal places is x = 1.084375

Iteration between x = 2.8 and x = 2.9

x =2.8 f(x) = -0.01535; x = 2.9 f(x) = 0.068078

Therefore, x0 = 2.8 f(x) = -0.01535

x1 = 2.85 f(x) = 0.025899

x2= 2.825 f(x) = 0.005152

x3 = 2.8125 f(x) = -0.00513

x4 = 2.81875 f(x) = 0.00000355

x5 = 2.815625 f(x) = -0.00256

Thus solution of the given equation up to six decimal places is x = 2.815625.

Hence the solutions of the given equation in the (0, 5) range are x = 1.084375 and 2.815625.

Q4. (i) Given

x

x0 = 0

x1 = 0.5

x2 = 1.0

f(x)

1

0.92853351

0.69763147

Therefore,

This leads to

M1 = 1 * f(0.5) = 0.9285

T1 = (1/2)[f(0) + f(1)] = 0.8488

Hence,

Comparing the answers it appears that S1 for

(iii) Based on these observations it can be inferred that Sn for