Saturday, August 11, 2012

Formulas using sample points as parameters.


Providing some added information to the examples chapter of the book Numerical Methods for Scientists and Engineers (19.2)

The problem is estimating the following integral from two samples:








The parameters here are w_1, w_2, x_1, and x_2. Just as in the previous posting we use four defining equations. Why four and why not three or less? As it turns our for each parameter we need to construct a set of unique linear equations to solve all of the given parameters...this follows from Linear algebra regarding a problem of 4 unknowns, so we'd need for four sets of unique linearly independent equations to solve each such parameter.

Thus we start using exact equations for f(x) in successive powers of xn where n = 0, 1, 2, and 3 in this case.

So the defining equations are :












Keep in mind the book actually evaluates these integrals, and I'll provide some brief explanation on evaluation techniques here.

For equation (1), we'd need to evaluate the definite integral on the left side of the equation. This could otherwise be rewritten as








Remember that while ex approaches a infinitely large number the inverse of this approaches zero. Also remember e0 = 1, from basic natural logarithmic identities (college level algebra).

I'll cover integration techniques given by integration by parts for equation (2), and then we'll rely on a handy integration tables formula which is








this formula can be seen more clearly in our given methods found in evaluating the integral from the left side of equation (2). Namely integration by parts in successive application occur here.

Also I'd mention at this point, we can also use another handy rule known as L'Hopital's rule which goes as follows:











Thus, for instance,









is in indeterminate form, so we can apply L'hopitals rule. Noting e-x = 1 / ex.

Thus we take the first derivatives of f(x) = x and g(x) = ex which yields









We can apply successive nth derivative applications of L'Hopital's Rule in the case of a nth power of x for the indeterminate case successively occurring so noting the factorial in the numerator after successive derivatives is a constant in the evaluation of such limit and thus is fixed 










By the way a factorial if you had forgotten is n! = n*(n-1)*...(2)*1
Thus, 3! = 3*2*1 for instance.
Let's go ahead and evaluate the integral of equation (2) on the left side

Using integration by parts, we have

















For the integral in eq.(3) on the left side, we'll use our handy integration formula eq.(5a) to evaluate (which is basically an integration by parts formula) here. We'll use the results of eq.(7) to further evaluate this integral.











Finally we'll evaluate the integral in eq.(4) on the left side, we'll use our handy integration formula eq.(5a) , and we'll use the results of eq.(8) to further evaluate this integral.











The defining equations (1), (2), (3), and (4) can now be rewritten using equations (6), (7), (8), and (9) as













To the right of the defining equations are coefficients c0, c1, and 1.
These are to applied to a polynomial that will be used for defining our sample points.

The polynomial we use is a second degree 








multiply eq. (10) by c0, eq. (11) by c1, and eq. (12) by 1, and the add these equations together so










Using the second multiplier column to the right of the first column on eq. (10), (11), (12), and (13),
we reapply the same process again as in (14) to get









We then have from eq. (14) and (15) two pairs of linear equations 









The solution to this is c1 = -4, and c0 = 2

These are the coefficients of eq. (13a), so we have






The quadratic equation solves this providing samples points 









Applying these sample points to the defining equations (10), and (11) gives


 




 
Again we solve these linear equations for w1 and w2
which yields










Our formula above becomes









indicated “exact for cubics using only two samples of the integrand”.

“How did we know that the weights we found from the first two defining equations would satisfy the last two equations? The answer is simple; we choose the xi so that the last two equations were linear combinations (with coefficients c0, c1, and 1) of the first two equations; hence the wi automatically satisfied the last two equations.”

Numerical Methods for Scientists and Engineers, Dover, pg.319.







1 comment:

  1. Thanks for providing information of calculus.Calculus is used in every branch of the physical sciences, actuarial science, computer science, statistics, engineering, economics, business, medicine, demography, and in other fields wherever a problem can be mathematically modeled and an optimal solution is desired. How to Find the Mean

    ReplyDelete

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...