Skip to main content

casio watch link removal


our today's topic is gaussian integration.so far, when we considered numerical integration rules, what we did were, we fixed the interpolationpoints. so, we started with interpolation points x 0 x 1 x n.we fitted an interpolating polynomial and then integration of that interpolating polynomialthat was approximation to integral a to b f x d x. now today, what we are going to dois, we will not fix the interpolation points before hand. we will try to write an interpolationformula of the form, summation w i f x i where w i's are the bits and x i's are the interpolationpoint. so, we are going to have, i going from 0 ton. so, in total we have got 2 n plus 2 constants to be determined. now these we will try todetermine, so that, there is no error for

polynomials of degree less than or equal to2 n plus 1. so, that is the idea of gauss integration.so, when we fix points x 0 x 1 x n in the interval a b and look at p n x to be equalto summation f x i l i x i goes from 0 to n where l i is the lagrange polynomial. so,it is product j goes from 0 to n x minus x j divided by x i minus x j, j not equal toi; this is lagrange polynomial. then integral a to b f x d x is approximatelyequal to integral a to b p n x d x which will be equal to summation i goes from 0 n f xi integral a to b l i x d x. now, what you have to note is that l i x thelagrange polynomial, it depends only on the interpolation points x 0 x 1 x n. so, thereis no function f coming in to picture there;

it is a polynomial of degree n.so, you can integrate. so, you integrate and then you are going to get the weights w i.so, we have this to be equal to summation i goes from 0 to n f x i w i. so, these arereal numbers independent of our function f. now this is going to be our starting point.so, let us start with a formula integral a to b f x d x is approximately equal to summationw i f x i, i goes from 0 to n. so, our starting point is integral a to bf x d x is approximately equal to summation i goes from 0 to n w i f x i and we want todetermine x i's and w i's, such that integral a to b f x d x is equal to summation w i fx i, i goes from 0 to n for polynomials of degree less than or equal to 2 n plus 1.so, we want that there should not be any error,

if our function f is a polynomial of degree2 n plus 1. this can be achieved provided there is no error for functions 1 x, x square,up to x raise to 2 n plus 1 because any polynomial of degree 2 n plus 1 is going to be combinationof this functions 1 x, x square, x raise to 2 n plus 1.so, now put f x is equal to 1 and then equate an integral a to b 1 d x is equal to summationw i f x i, i goes from 0 to n. so, f x is 1. so, that will give us one equation andlike that you will have 2 n plus 2 equations because there will be f x is equal to 1 thenx, x square up to x raise to 2 n plus 1 and then our unknowns are also 2 n plus 2 in number;the unknowns are going to be the weights w 0 w 1 w n and x 0 x 1 x i. so, we have got2 n plus 2 equations into n plus 2 unknowns.

so, let us look at some special cases. so,suppose we are taking n is equal to 0; that means, we have got x 0 is 1 point and w 0is the weight. we want integral a to b f x d x, is equalto w 0 f x 0 is f is a polynomial of degree 1 which we mean that once take function fx is equal to 1 then take f x is equal to x, you will get 2 equations and from thatwe will try to determine w 0 and x 0. so, let us do that. so, we have integral ato b f x d x is approximately equal to w 0 f x 0, w 0 x 0 these are unknowns.f x is equal to 1 constant function; we want that there is no error.that means integral a to b d x should be exactly equal to w 0 of f x 0.f of x is 1, so that means, it is equal to

w 0.so, this imposes the condition that w 0 should be equal to b minus a. so, which means thatif i choose w 0 to be equal to b minus a and x 0 to be any point in the interval a b, thenthe formula w 0 f x 0 is going to be exact for constant polynomials.so, now we want our formula to be exact for linear polynomials. so, we will impose onemore condition for f x is equal to x. so, w 0 we have already determined the conditionf x is equal to x that will determine our point x 0.so, we have f x is equal to x; in this case also no error that will happen, provided integrala to b x d x is equal to w 0 x 0, which will imply b square minus a square by 2 which isthe integral a to b x d x should be equal

to w 0 is b minus a multiplied by x 0.so, this means x 0 should be equal to midpoint a plus b by two. so thus, integral a to bf x d x if you approximate it by b minus a into f of a plus b by 2 this is going to beexact for linear polynomials. and this is nothing, but the midpoint rule.so thus, we have solved a problem for case n is equal to 0. now let us look at the casen is equal to 1. so, when you put n is equal to 1 you are tryingto approximate integral a to b f x d x by a formula of the type w 0 f x 0 plus w 1 fx 1, unknowns w 0 w 1 x 0 x 1 we will like to determine in such a manner that now ourrule is exact for polynomials of degree less than or equal to 3.this will be achieved provided there is no

error for 4 functions which are 1 x, x squarex cube any cubic polynomial is going to be of the form a 0.plus a 1 x plus a 2 x square plus a 3 x cube. so, if there is no error for the 4 functions1 x, x square, x cube there will not be any error for a cubic polynomial a general cubicpolynomial. so, let us equate and get the 4 equations.so, we have integral a to b f x d x is approximately equal to w 0 f x 0 plus w 1 f x 1. first putf x is equal to 1 then we want b minus a should be equal to w 0 plus w 1.so, that is the first condition. then f x is equal to x. so, that is going to be b squareminus a square by 2 it is the integral a to b x d x and on the right hand side it is goingto be w 0 x 0 plus w 1 x 1. next look at the

function f x is equal to x square, its integralis x cube by 3. so, this is going to be b cube minus a cube by 3, on the right handside it will be w 0 x 0 square plus w 1 x 1 square and f x is equal to x cube that willbe b raise to 4 minus a raise to 4 divided by 4 is equal to w 0 x 0 cube plus w 1 x 1cube. so, let me call these 4 equations 1 2 3 4.so, we have got 4 equations in 4 unknowns, which are w 0 w 1 x 0 x 1. now these 4 equations,we got 4 equations in 4 unknowns, but these are non-linear equations if they were linearequations then solving them is easy, but we have got 4 non-linear equations.now, in this particular case one can do some manipulation and one can try to find w 0 w1 x 0 x 1, but what we want is we want to

look at a general case that when you are consideringa formula of the type summation i goes from 0 to n w i f x i.how i should choose the weights w i's and the interpolation points x i's in such a mannerthat i have no error for as high degree polynomial as possible.so, that is why we will not do manipulation for this, but look at a general case. nowfor the general case, the method which we are going to use, i am going to explain againfor this particular case n is equal to 1 and then we will see how to generalize.so, the first thing we are going to do is, we are going to obtain the conditions on x0 x 1 which will guarantee that if you interpolate, if you choose x 0 x 1 in a certain manner,fit a linear polynomial, integrate then the

formula which you are going to get it willbe exact for cubic polynomial. so, let us derive the condition which theinterpolation points x 0 and x 1 should satisfy. once we find this condition there are goingto be 2 conditions; then we will see, how to choose x 0 and x 1.so, that these conditions are satisfied. so, first we are finding the conditions whichthe interpolation points x 0 and x 1 should satisfy and then find the points x 0 x 1 whichsatisfy this condition. so, let us look at 2 points x 0 and x 1, fita linear polynomial no matter how you choose your 2 points x 0 and x 1 if you fit a linearpolynomial then the interpolating polynomial is same as the function if the function isa linear polynomial. so, there will not be

any error in our integration formula for linearpolynomials, but we want something more we want that the error should not be there orerror should be equal to 0 for cubic polynomial. so, we have f x is equal to f x 0 plus divideddifference based on x 0 x 1 in to x minus x 0 and then you have got error term f ofx 0 x 1 x multiplied by x minus x 0,x minus x 1.so, this is our polynomial p 1 x and this is our error and hence integral a to b f xd x will be equal to integral a to b p 1 x d x plus integral a to b f of x 0 x 1 x xminus x 0 x minus x 1 d x. so, this is going to be the error in the integration. now wehave used this technique beforehand. if your points x minus x 0, if your points x 0 andx 1 are such that integral a to b x minus

x 0 x minus x 1 d x is equal to 0.then we will like to make use of this relation, in order to manage our error we had done thisfor the midpoint rule; in the case of midpoint rule we had integral a to b x minus a plusb by 2 b x is equal to 0. so, our error formula has got 2 parts; it has got a divided differenceand then you are multiplying by the function w i. so, this divided difference in the errorformula it depends on x. so, we cannot take it out of the integration sign.but if i replace this divided difference which is based on x by a divided difference whichis independent of x and then plus extra term then i can take the divided difference out.so, let us look at the error. and then f of x 0 x 1 x this divided difference,let me write it as f of y 0 x 0 x 1 plus f

of y 0 x 0 x 1 x multiplied by x minus y 0;this is the recurrence relation this you take on the other side divide by x minus y 0 thatis the recurrence formula for f of y 0 x 0 x 1 x.so, this i am going to substitute here; now here y 0 is a fix point. so, that will comeout of the integration sign and our error will be equal to f of y 0 x 0 x 1 integrala to b w x d x plus integral a to b f of y 0 x 0 x 1 x multiplied by x minus y 0 w xd x where i am calling this as w x. so, if this is equal to 0 then our error is goingto have this form. if integral a to b w x d x is equal to 0 thenerror is equal to integral a to b divided difference based on y 0 x 0 x 1 x w x x minusy 0 d x.

so, now look at the error; error has a divideddifference based on 4 points that is f of y 0 x 0 x 1 x if your function f is a quadraticpolynomial then this divided difference will be 0 and that means, error will be 0. so,if our points x 0 and x 1, if they are such that integral a to b w x d x is equal to 0then we get the formula to be exact for quadratic polynomial. so, earlier we had only exactitudefor linear polynomials, now we got for quadratic polynomial with 1 condition integral a tob w x d x. now we will use the same technique again and then obtain another condition whichwill give us the error to be 0 for cubic polynomials. so, now let us write down the divided differencey 0 x 0 x 1 x has f of y 1 y 0 x 0 x 1 minus f of y 1 y 0 x 0 x 1 x multiplied by x minusy 1. so, this is the recurrence relation;

this we substitute in the error. so, we willget error to be equal to f of y 1 y 0 x 0 x 1 integral a to b w x, x minus y 0 d x plus,here it should be plus not minus, plus integral a to b f of y 1 y 0 x 0 x 1 x, x minus y 1then we have got this w x y 0. so, it will be x minus y 0 w x d x.now, if this is equal to 0 then this will be the expression for the error. if integrala to b w x d x is 0 and integral a to b w x multiplied by x minus y 0 is equal to 0.if both the conditions are satisfied our error is integral a to b divided difference basedon 5 points the points are the divided difference is based on y 1 y 0 x 0 x 1 and x. so, wehave got 5 points. if f is a polynomial of degree 3 then thisdivided difference will be equal to 0. so,

our error is integral a to b, a divided differencemultiplied by w x into x minus y 0 x minus y 1 d x if the divided difference term is0 error is going to be equal to 0. so, thus we obtain 2 conditions, which guaranteethat there is no error for cubic polynomials and those 2 conditions are integral a to bw x d x is equal to 0 and integral a to b w x into x minus y 0 d x is equal to 0. we have w x is x minus x 0 x minus x 1 integrala to b w x d x is equal to 0 integral a to b w x, x minus y 0 d x is equal to 0 impliesthat the error is integral a to b f y 1 y 0 x 0 x 1 x multiplied by w x into x minusy 0 x minus y 1 d x and this term is equal to 0 if f is a cubic polynomial.so, this means error is equal to 0 if f is

a polynomial of degree, less than or equalto 3. now, look at the condition integral a to b w x x minus y 0 d x y 0 is a fixedpoint and we already have integral a to b w x d x is equal to 0.so that means, this condition will reduce to integral a to b w x x d x is equal to 0.so, the conditions which we get are integral a to b w x d x should be equal to 0 and integrala to b w x multiplied by x d x is equal to 0. so, we have to choose x 0 and x 1 such thatthese 2 conditions are satisfied and then for the error our y 0 and y 1 they can beany points in the interval a b. so, we can choose our y 0 to be equal to x 0 y 1 is equalto x 1 and we will get integral a to b f of

x 0 repeated twice x 1 repeated twice x xminus x 0 square x minus x 1 square d x. now, the reason for writing in this mannerwill be; now we have got a divided difference which is going to be continuous provided yourfunction f is sufficiently differentiable, your multiplying by a function x minus x 0square x minus x 1 square. so, this function is always bigger than or equal to 0. so, wecan apply mean value theorem for integrals and then the divided difference we can takeit out as divided difference based on x 0 repeated twice x 1 repeated twice and somepoint c, multiplied by integral a to b x minus x 0 square x minus x 1 square d x.we can integrate this and then obtain a more precise bound as compare to, if we had dominatedthe x minus x 0 and x minus x 1 by b minus

a. so, now, our problem is we have reducedour problem to finding x 0 and x 1 such that x minus x 0 x minus x 1 its integral is 0and if you multiply x minus x 0 x minus x 1 by x.then that integral also should be 0 now as i said we want to have a general method; thatmeans, here we have taken only n is equal to 1. so, we have got 2 interpolation pointsx 0 and x 1, but whatever we want to do we want to do it that, you should be able toextend it for the more general case like when you have got n plus 1 points then how i shouldchoose my n plus 1 points so, that we have got exactitude for polynomialsof degree less than or equal to 2 n plus 1. so, in order to do that what we are goingto do is we are going to recall what is the

inner product. so, on our space c and d itis the vector space of continuous real valued functions defined on interval a b, on thiswe will define a inner product as integral a to b f x into g x d x once we have innerproduct we can talk of 2 functions being perpendicular. so, if the inner product is equal to 0 wesay that f is perpendicular to g look at our condition which we want; it is integral ato b x minus x 0 x minus x 1 d x should be equal to 0; that means, we want our functionw x to be perpendicular to the constant function 1 and second condition tells us that our wx should be perpendicular to the function f 1 x is equal to x.so, we will start with 3 functions function constant 1 then x and then x square to thiswe will apply gram-schmidt orthonarmalisation

process and get a quadratic polynomial whichis perpendicular to constant function 1 and function x; this quadratic polynomial, lookat the roots of this, if the roots are x 0 and x 1 those are going to be our desiredpoint and what we will do is inner product we will defined on c a b, but in order tofind the points x 0 and x 1. we will first consider the interval minus1 to 1 and then we will look at a map from minus 1 to 1 to the interval a b which is1 to 1 on to n a fine and using this map we will transfer the results to interval a b.so, let us look at the inner product on c a b. so, the vector space is c a b, f and g theseare functions in c a b inner product f comma

g is integral a to b f x into g x into d x.so, this is inner product; its properties are inner product of f with itself is goingto be bigger than or equal to 0 because we will be looking at integral a to b f squarex d x f is a real valued function then f comma f is equal to 0 if and only if the functionf x is identically 0 if the function is identically 0 then integrala to b f square x d x will be 0; on the other hand if integral a to b f square x d x is0. so, integral a to b f square x d x is equal to 0 then f square is continuous f squarex is bigger than or equal to 0 and which will imply that f x has to be identically 0.so, this is the first property. second property is inner product of f with g it is same asinner product of g with f and that is because

our multiplication of real numbers is commutativeand third property which is known as linearity, f 1 plus f 2 its inner product with g willbe inner product of f 2 with g plus inner product of f 2 with g and alpha times f commag will be alpha times f comma g where alpha is a real number.f 1 and f 2 these are continuous function. so, these are the properties of inner product.so, we have defined the inner product and now we are going to look at the 3 functions f 0 x is equal to 1, f 1 x is equal to x,f 2 x is equal to x square, look at g 0 x this will be equal to we define it has f 0x divided by inner product of f 0 with itself and raise to half we have got an induced norm;if you define norm of f to be square root

of inner product of f with itself.this is going to be bigger than or equal to 0. so, it is going to be greater than or equalto 0 we can take its positive square root and this is generally denoted by norm f 2.so, this has properties that norm f 2 is bigger than or equal to 0 it is equal to 0 if andonly if f x is identically 0. second, norm of alpha f will be equal to mode alpha timesnorm f where alpha belongs to r and the third one is norm of f plus g is less than or equalto norm f plus norm g, this is known as triangle inequality and triangle inequality is proved using cauchyschwarz inequality, which is modulus of inner product of f with g that is less than or equalto norm f into norm g. so, we have, look at the 3 functions 1 x xsquare from this we want to construct 3 other

functions which i will denote by g 0 g 1 g2 which will have property that if you look at the norm of each function, it is goingto be equal to 1 and if you consider any 2 distinct functions like if you consider g0 and g 1 its inner product will be 0, inner product of g 0 with g 2 will be 0 and innerproduct of g 1 with g 2 is equal to 0. so this, the way we are going to do that isknown as gram schmidt orthonormalization process, we will do it for the 3 functions, but thenone can define it for n functions. so, we have our f 0 x is equal to 1, f 1 xis equal to x, f 2 x is equal to x square define g 0 x to be equal to f 0 upon normf 0 2 norm. so, which will imply the f 0 x, which willimply that norm g 0 2 norm is going to be

equal to 1. next look at r 1 x to be equalto f 1 x minus inner product of 1 with g 0 multiplied by g 0. so, this is my definition;if i look at inner product of r 1 with g 0, it is going to be inner product of f 1 minusinner product of f 1 with g 0 g 0 and then g 0.now, we use linearity of inner product to write this as inner product of f 1 with g0 minus this is going to be a scalar. so, it will come out of the inner product. so,it will be f 1 g 0 and what is left is inner product of g 0 with g 0; now our norm g 02 is positive square root of inner product of g 0 with itself.so, this is going to be equal to 1 and then this will get cancelled. so, you will getr 1 g 0 to be equal to 0, now when you look

at r 1 we have got f 1 x is equal to x, thisis going to be some scalar g 0 x is going to be multiple of 1. so, this is going tobe a linear polynomial so, by vary construction our r 1 is perpendicularto g 0 and now if i want r 1 to have norm 1, define g 1 to be equal to r 1 upon normr 1. so, we will have norm g 0 to be equal to 1 norm g 1 to be equal to 1 and inner productof g 0 with g 1 is equal to 0. so, now we will look at the function x square,we have got g 0 to be a constant polynomial g 1 to be a polynomial of degree 1 which isperpendicular to each other. f 2 x is our function x square. so, from thisfunction we will sort of subtract the component of our f 2 in the direction of g 0 and inthe direction of g 1.

so, we will construct our r 2 in such a mannerthat r 2 is perpendicular to both g 0 and g 1 our r 2 is going to be a quadratic polynomialwhich will be perpendicular to g 0 and g 1 define r 2 x to be equal to f 2 x minus innerproduct of f 2 with g 0 into g 0 x minus inner product of f 2 with g 1 into g 1 x.when you look at inner product of r 2 with g 0 that will be inner product of f 2 withg 0 minus inner product of f 2 with g 0 into inner product of g 0 with itself minus innerproduct of f 2 with g 1 and then inner product of g 1 with g 0 using the linearity of innerproduct. this is 1, this is 0. so, this gets cancelledand then you get r 2 comma g 0 to be equal to 0; then you look at inner product of r2 with g 1 that will be inner product of f

2 with g 1 minus inner product of f 2 withg 0 the coefficient and inner product of g 0 with g 1 minus inner product of f 2 withg 1 and inner product of g 1 with itself. so, this is going to be equal to 1, this isequal to 0, these 2 will get cancelled and then you get r 2 comma g 1 is equal to 0.next define g 2 to be equal to r 2 upon norm r 2. so this will imply that norm of g 2,2 norm is going to be equal to 1. so, this is the procedure for constructingg 0 g 1 g 2, 3 ortho normal functions which we have obtained from the functions 1 x xsquare this was the general procedure. now, let us look at the interval to be minus1 to 1 and find explicit expression for g 0 g 1 g 2. so, when you look at the intervalminus 1 to 1 our

f 0 x is equal to 1 x belonging to minus 1to 1 then norm f 0 will be integral minus 1 to 1 d x raise to half that is going tobe equal to root 2 and hence our g 0 x is function 1 by root 2 it is f 0 upon norm f0; next r 1 x is f 1 x which is x minus f 1 comma g 0 g 0.let us calculate the inner product f 1 comma g 0 that is integral minus 1 to 1 x g 0 is1 by root 2 d x. so, this is already equal to 0. so, we have got our r 1 x to be equalto x that will give us g 1 x to be equal to x divided by norm r 1.now, what will be norm r 1? so, norm r 1 2 norm will be integral minus 1 to 1 x squared x raise to half. so, this is going to be square root of 2 by 3 and that will give usg 1 x to be root 3 by 2 x and now the third

one so, let us look at r 2 x. so, r 2 x is goingto be equal to x square minus inner product of f 2 with g 0 into g 0 minus inner productof f 2 with g 1 g 1 where our f 2 x is x square, g 0 x is 1 by root 2 and g 1 x is equal toroot 3 by 2 x. so, inner product of f 2 with g 0 this will be integral minus 1 to 1 x squareby root 2 d x. so, this is going to be equal to 2 by 3 root2 2 by 3. so, this is going to be root 2 by 3 when we look at inner product of f 2 withg 1 this is going to be equal to integral minus 1.

Comments