51 Slices
Medium 9788131805220

ALLC12-7

Manish Goyal Laxmi Publications PDF

742

NUMERICAL METHODS AND STATISTICAL TECHNIQUES USING ‘C’

12.41. χ2 TEST AS A TEST OF INDEPENDENCE

With the help of χ2 test, we can find whether or not, two attributes are associated. We take the null hypothesis that there is no association between the attributes under study, i.e., we assume that the two attributes are independent. If the calculated value of χ2 is less than the table value at a specified level (generally 5%) of significance, the hypothesis holds good, i.e., the attributes are independent and do not bear any association. On the other hand, if the calculated value of χ2 is greater than the table value at a specified level of significance, we say that the results of the experiment do not support the hypothesis. In other words, the attributes are associated. Thus a very useful application of χ2 test is to investigate the relationship between trials or attributes which can be classified into two or more categories.

The sample data set out into two-way table, called contingency table.

See All Chapters
Medium 9788131805220

ALLC2-1

Manish Goyal Laxmi Publications PDF

2

Error Analysis and Estimation

2.1. ERRORS AND THEIR ANALYSIS

2.1.1. Sources of Errors

Following are the broad sources of errors in numerical analysis :

(1) Input errors. The input information is rarely exact since it comes from the experiments and any experiment can give results of only limited accuracy. Moreover, the quantity used can be represented in a computer for only a limited number of digits.

(2) Algorithmic errors. If direct algorithms based on a finite sequence of operations are used, errors due to limited steps don’t amplify the existing errors but if infinite algos are used, ideally exact results are expected only after an infinite number of steps. As this cannot be done in practice, the algorithm has to be stopped after a finite number of steps and as a consequence thereof the results are not exact.

(3) Computational errors. Even when elementary operations, such as multiplication and division are used, the number of digits increases greatly so that the results cannot be held fully in a register available in a given computer. In such cases, a certain number of digits must be discarded. Furthermore, the errors here accumulate one after another from operation to operation, changing during the process and producing new errors.

See All Chapters
Medium 9788131805220

ALLC9-1

Manish Goyal Laxmi Publications PDF

9

Numerical Solution of

Ordinary Differential Equations

9.1. INTRODUCTION

A physical situation that concerns with the rate of change of one quantity with respect to another gives rise to a differential equation.

Consider the first order ordinary differential equation dy

= f (x, y)

...(1) dx with the initial condition

...(2) y(x0) = y0

Many analytical techniques exist for solving such equations. But these methods can be applied to solve only a selected class of differential equations.

However, a majority of differential equations appearing in physical problems cannot be solved analytically. Thus it becomes imperative to discuss their solution by numerical methods.

In numerical methods, we donot proceed in the hope of finding a relation between variables but we find the numerical values of the dependent variable for certain values of independent variable.

It must be noted that even the differential equations which are solvable by analytical methods, can be solved numerically also.

9.2. INITIAL-VALUE AND BOUNDARY-VALUE PROBLEMS

See All Chapters
Medium 9788131805220

ALLC4-10

Manish Goyal Laxmi Publications PDF

302

NUMERICAL METHODS AND STATISTICAL TECHNIQUES USING ‘C’

(i) ui(xj) =

i≠ j i= j

RS0,

T1,

i≠ j i= j

(ii) vi(xj) = 0 ∀ i, j

(iii) ui′(xj) = 0 ∀ i, j

(iv) vi′(xj) =

UV

W

RS0,

T1,

...(3 (i))

...(3 (ii))

...(3 (iii))

UV

W

...(3 (iv))

Using the Lagrange fundamental polynomials Li(x), we choose ui(x) = Ai(x) [Li(x)]2 and vi(x) = Bi(x) [Li(x)]2 where Li(x) is defined as

UV

W

Li(x) =

...(4)

( x − x0 )( x − x1 ) ... ( x − xi −1 )( x − xi + 1 ) ... ( x − xn )

( xi − x0 )( xi − x1 ) ... ( xi − xi −1 )( xi − xi + 1 ) ... ( xi − xn )

Since Li2(x) is a polynomial of degree 2n, Ai(x) and Bi(x) must be linear polynomials.

Let

Ai(x) = aix + bi and

Bi(x) = cix + di so that from (4), ui(x) = (aix + bi) [Li(x)]2 vi(x) = (cix + di) [Li(x)]2

...(5) using conditions 3(i) and 3(ii) in (5), we get

UV

W

aix + bi = 1 cix + di = 0

and

...(6 (i))

...(6 (ii)) | since [Li(xi)]2 = 1

Again, using conditions 3 (iii) and 3 (iv) in (5), we get ai + 2Li′(xi) = 0 and

...(6 (iii))

ci = 1

From equations 6 (i), 6 (ii), 6 (iii) and 6 (iv), we deduce ai = – 2Li′(xi) bi = 1 + 2xiLi′(xi) ci = 1 di = – xi

See All Chapters
Medium 9788131805220

ALLC3-1

Manish Goyal Laxmi Publications PDF

3

Algebraic and Transcendental Equations

Consider the equation of the form f(x) = 0

If f(x) is a quadratic, cubic or biquadratic expression then algebraic formulae are available for expressing the roots. But when f(x) is a polynomial of higher degree or an expression involving transcendental functions e.g., 1 + cos x – 5x, x tan x – cos hx, e–x – sin x etc., algebraic methods are not available.

In this chapter, we shall describe some numerical methods for the solution of f(x) = 0, where f(x) is algebraic or transcendental or both.

3.1. BISECTION METHOD

f(x

)

Let the function f (x) be continuous between a and b. For definiteness, let f (a) be (–) ve and f(b) be (+)ve. Then

1

(a + b). the first approximation to the root is x1 =

2

If f (x1) = 0, then x1 is a root of f(x) = 0 otherwise, the root lies between a and x1 or x1 and b according as f(x1) is (+) ve or (–) ve. Then we bisect the interval as before and continue the process until the root is found to desired accuracy.

Y

y=

This method is based on the repeated application of intermediate value property.

See All Chapters

See All Slices