Finite Differences, Interpolation, and Numerical Differentiation

Size: px
Start display at page:

Download "Finite Differences, Interpolation, and Numerical Differentiation"

Transcription

1 4 Fnte Dfferences, Interpolaton, and Numercal Dfferentaton 4. INTRODUCTION Lnear nterpolaton s dscussed n the precedng chapter as a method for fndng a partcular root of a polynomal, or, transcendental equaton when the upper and lower bounds of the nterval for search are provded. To contnue the dscusson of the general topc of nterpolatons whch not necessarly lnear could be quadratc (parabolc, cubc, quartc, and so on, we n ths chapter present methods for ths general need of nterpolaton n engneerng analyses by treatng not only equatons but also a set of N tabulated data, (x,y ) for = N. Fnte dfference table wll be ntroduced and constructed for the equally-spaced data, that s x 2 x = x 3 x 2 = = x N -x N. Ths table can be utlzed as a forward-dfference, backward- dfference, or, central-dfference table dependng on how ts s appled for the nterpolaton use. Taylor s seres and a shftng operator are to be used n dervaton of the nterpolaton formulas n terms of the forward-dfference, backward-dfference, and central-dfference operators. A program DffTabl has been developed for prntng out a dfference table of a set of equally-spaced data. Dfferentaton operator wll also be ntroduced for the dervaton of the numercal dfferentaton needs. When a set of equally-spaced data, (x,y ) for = N, are gven, formulas n terms of the forward-dfference, backward-dfference, and centraldfference operators are derved for the need of calculatng the value of dy/dx at a lsted x value or unlsted. If x s not equal to one of the x, nterpolaton and dfferentaton have to be done combnedly through a modfcaton of the Taylor s seres expanson. For curve-ft by polynomals and for nterpolaton, applcatons of the versatle Lagrangan nterpolaton formula are also dscussed. A program called LagrangI s made avalable for ths need. QuckBASIC, FORTRAN, and MATLAB versons of the above-mentoned programs are to be provded. Applcaton of the Mathematca s functon Interpolatng Polynomal n place of LagrangI s demonstrated. In soluton of the problems governed by a system of ordnary dfferental equatons wth ether some ntal and/or boundary condtons specfed, the fnte dfferences wll be appled. In Chapter 6, such method for fndng the approxmate answer to the problem s dscussed. Accuracy of such approxmate soluton wll depend on the ncrement of the ndependent varable, stepsze, adopted and on whch approxmate method s employed.

2 Because numercal dfferentaton s hghly naccurate, whenever possble numercal ntegraton should be preferred over numercal dfferentaton. In case that one needs to fnd the velocty of a certan moton study and has the opton of collectng the dsplacement or acceleraton data, then the acceleraton data should be taken not the dsplacement data. The reason s that one has the choce of applyng numercal dfferentaton to the dsplacement data or numercal ntegraton to the acceleraton data to obtan the velocty results. The numercal ntegraton whch s the topc of Chapter 5 has the smoothng effect and hence s more accurate! Graphcally, dfferentaton s of a local evaluaton of determnng the slope at a selected pont on a curve whch could be the result of fttng a number of data ponts dscussed n Chapter 3 whle ntegraton s of a global evaluaton of fndng the area under the curve between two specfed lmts of the ndependent varable. For a set of three gven ponts ftted lnearly by two lnear segments and quadratcally by a parabola, the slope at the md-pont could have very dfferent slope values whle the areas under the lnear segments and under the parabola would not dffer too sgnfcantly. Hence, t s worthy of emphaszng that learnng the computatonal methods s easer when compared to makng decson of whch method s best to solve the problem at hand. 4.2 PROGRAM DIFFTABL APPLICATIONS OF FINITE-DIFFERENCE TABLE Program DffTabl has been developed for the need of constructng a table of fnte dfferences of a gven set of N two-dmensonal ponts, (x,y ) for = N. The x values are assumed to be equally spaced,.e.,, x 2 x = x 3 x 2 = = x N -x N = h, h beng called the ncrement, or, stepsze. Ths so-called dfference table can be appled for nterpolaton of the y value for a specfed, unlsted x value nsde the range of x = x and x = x N (extrapolaton f outsde the range), and dfferentaton. Table shows a typcal dfference table. The symbol used n Table s called Forward Dfference Operator. If we refer the numbers lsted n the x and y columns as x to x 6 and y to y 6, respectvely, the frst number lsted under y,.9495, s obtaned from the calculaton of y 2 y and s dentfed as y. The last number lsted n the y column, 5.305, s equal to y 6 y 5 and referred to as y 5. Or, we may wrte the general formula as, for = to 5, y = y y + () y s called the frst forward dfference of y at x. The hgher order forward dfferences lsted n Table are obtaned by extended applcaton of Equaton. That s, 2 y = ( y y )= y y = y 2y + y (2)

3 TABLE Dfference Table (y = to 2x + 3x 2 to 4x 3 + 5x 4 ). x y y 2 y 3 y 4 y 5 y y = ( y y )= y y + + = ( y 2y + y ) y 2y + y = y 3y + 3y y (3) and so on. We shall show later how the thrd through seven columns of Table can be nterpreted dfferently when the backward and central dfference operators are ntroduced. Frst, we wll demonstrate how Table can be appled for nterpolaton of the y value at an unlsted x value, say y(x =.24). To do that, the shftng operator, E, needs to be ntroduced. The defnton of E s such that: Ey = y + (4) That s, f E s operatng on y, the y value s shfted down to the next provded y value. Interpolaton s a problem of not shftng a full step but a fractonal step. For the need of fndng y at x =.24, the x value falls between x 2 =.2 and x 3 =.3. Snce the stepsze, h, s equal to 0., a full shft from y 2 = would lead to y 3 whch s equal to We expect the value of y(x =.24) to be between y 2 and y 3. Instead of E y 2, the value of E 0.4 y 2 s to be calculated by shftng only 40%. To fnd the meanng of E 0.24, or, more generally E r for 0<r<, we substtute Equaton 4 nto Equaton to obtan: y = y y = Ey y = E y + = E, or, E = + (5,6)

4 By applcaton of bnomal expanson, we can then have: E r r r = + k = k= 0 k (7) where the bnomal coeffcents are defned as: r ( 0)= and ( r k)= [ ] rr ( ) r k 2 Lk (8) We can now use Equaton 7 to obtan: yx ( = 24. )= E yx ( = 2. )= E y = + y = y = y 2 (9) Equaton 9 can be appled for lnear nterpolaton f up to the y 2 terms are adopted; for parabolc nterpolaton f up to the 2 y 2 terms are adopted; and so on. Snce Table has up to the ffth order forward dfferences avalable but the last column contans a zero value, Equaton 9 can therefore be effectvely up to the fourth-order forward-dfference nterpolaton. The numercal results of y(x =.24) usng lnear, parabolc, cubc, and fourth-order are 7.406, 7.390, , and , respectvely. Snce we know y = 2x + 3x 2 4x 3 + 5x 4, the exact value of y(x =.24) s equal to An explanaton for dscrepances n all of these four attempts of nterpolatons, relatve to the exact value, s provded n a homework exercse gven n the Problems set. BACKWARD-DIFFERENCE OPERATOR Notce that the frst numbers lsted n columns three through seven n Table are the fve forward dfferences of y, and that only four forward dfferences (the second numbers n columns three through sx) of y 2 are avalable. Lesser and lesser forward dfferences are avalable for later y s untl there s only y 5 for y 5. That s to say, to nterpolate y(x) for an x value between x 5 =.5 and x 6 =.6, Equaton 9 can only be used up to the y 5 term. To remedy ths stuaton and to make most use of the provded set of 6 (x,y) data, t s approprate at ths tme to ntroduce the backward-dfference operator,, whch s defned as: y = y y (0)

5 By combnng Equatons, 7, and 0, we notce that: and So, y = y y = y + + y = y+ y = E y + = E, or, E = () (2) (3,4) Equaton 2 s an mportant result because t ndcates that the last numbers lsted n columns three through seven of Table are the frst through fve backward dfferences of y 6. If we could derve an nterpolaton formula n terms of, there are up to ffth-order backward dfference of y 6 avalable. Toward that end, let us consder the need of nterpolatng the value of y(x =.56). Ths y value can be reached by shftng backward by 0.4 step from x =.6 snce the stepsze for Table s h = 0.. By usng Equaton 4 and notcng Equatons 7 and 8, we can have: yx ( = 56. )= E yx ( = 6. )= E y = y = ( ) ( ) + 6 y 6 = y 6 (5) One can then apply Equaton 5 to obtan the nterpolated y(x =.56) values usng up to the ffth order backward dfferences. Ths s left as a homework exercse gven n the Problems set. CENTRAL-DIFFERENCE OPERATOR For the nterest of completeness and later applcaton n numercal soluton of ordnary dfferental equatons, we also ntroduce the central dfference operator,. When t s operatng on y, the defnton s: δy h h = y x + y x 2 2 (6) The frst-order central dfference s seldom used and the second-order central dfference s frequently appled, whch s: 2 h h δ y = δ y x + δ y x yx h 2yx yx h 2 2 = ( + ) + = y 2y + y + (7)

6 DIFFERENTIATION OPERATOR Another mportant operator that needs to be ntroduced n connecton wth the applcaton of dfference table s the dfferentaton operator, D, whch s defned as: dy x Dy( x = x ) dx Dy x= x (8) As t s our ntenton to apply an avalable dfference table for numercal dfferentaton at one of the lsted x values, or, at an unlsted x value, by usng ether the forward or backward dfferences of y values. For example, we may want to fnd Dy at x =.2, or, at x =.24. To derve an expresson for D n terms of, we recall the Taylor s seres of a functon y(x = a + h) near the neghborhood of x = a for a small ncrement of h: = ()+ () ya+ h ya () j y a y a y a h h 2 () j h +! 2! j! (9) where y (j) s the jth dervatve wth respect to x. Usng the notaton of dfferentaton operator D and the shftng operator E, the above expresson can be wrtten as: or, () + () + + () j j hdy a h D y a h D y a Ey()= a y()+ a! 2! j! [ ] ()= () 2 2 j j hd = + hd + h D + + h D + y a e y a hd E = e and D = lne h (20) (2) In order to use the dfference table for numercal dfferentaton, we substtute Equaton 6 nto Equaton 2 to obtan: D = ln + h (22) By substtutng the logarthmc functon n Equaton 2 wth an nfnte seres and applyng the D operator for y, the result s: Dy = y h 2 3 (23) Hence, to fnd Dy(x =.2) by usng the fnte dfferences n Table, Equaton 23 can be appled to obtan:

7 Dy 2 = x =. Notce that the above result s when up to the fourth-order forward dfferences of y 2 are all utlzed. Lnear, parabolc, and cubc numercal dfferentatons at x =.2 could also be calculated by takng only one, two, and three terms nsde the parentheses of the above expresson. The respectve results are , 22.05, and Snce y(x) = 2x + 3x 2 4x 3 + 5x 4 and y (x) = 2 + 6x 2x x 3, the exact value of y(x =.2) = = ndcates that the fourth-order calculaton s the best. When Dy s needed for x near the end of x lst, t s better to express D n terms of the backward-dfference operaton, whch based on Equatons 4 and 2 s: Dy x [ ] h n E y h n l l ( ) y = = = 2 3 y h 2 3 = y h (24) The shftng operator E and dfferentaton operator D can be combned to derve formulas for numercal dfferentaton of y(x) at x values unlsted n the dfference table ether n terms of forward-dfference operator or backward-dfference. Frst, let recall Equatons 7 and 23 and apply them to fnd y (x = x + rh) n terms of the forward-dfference operator as follows: y ( x + rh)= = ( + )( + ) h DE r y h n 4 y l 2 3 rr 2 = h r y (25) r 2 3r 6r r 9r + r 3 4 = y h Smlarly, y (x -rh) can be expressed n terms of backward-dfferental operator, as: y ( x rh)= = ( ) h DE r y ln h [ ] r y = rr + + h r y (26) r r r+ r r + r = y h 2 6 2

8 It should be partcularly ponted out that n usng Equaton 26 for fndng y (x) where x <x<x, r s to be calculated as (x -x)/h and not as (x-x )/h. For example, n usng Table, to calculate y (x =.56) based on Equaton 26 r should be equal to (.6.56)/0. = 0.4 and not equal to (.56.5)/0. = 0.6, and equal to 6 not 5 because n Table x 6 =.6 and x 5 =.5. Program DffTabl has been prepared for nteractve nterpolaton and dfferentaton usng a dfference table such as Table. User can nteractvely specfy the data ponts and where the nterpolaton or dfferentaton s to be calculated and also up to what order of fnte dfferences should the computaton be performed. Both QuckBASIC and FORTRAN versons of the program are made avalable. Lstngs are gven below along wth some sample applcatons. At present, the hghest order of fnte dfference allowed s the fourth. QUICKBASIC VERSION

9 Sample Applcaton FORTRAN VERSION

10

11

12 Sample Applcaton Usng the nput data and dfference table as for the QuckBASIC verson, the nteractve applcaton of the FORTRAN verson gves a sample run as follows: MATLAB APPLICATION A fle DffTabl.m can be created and added to MATLAB m fles for prntng out the dfference table. Ths fle may be wrtten as:

13 Ths m fle then can be appled as llustrated by the followng examples: The statement format compact requests the results to be dsplayed wthout unnecessary lne spaces on screen. It s approprate at ths tme to demonstrate how some graphc capablty of MATLAB can be effectvely utlzed here n connecton wth the dfference table. Frst, the calculaton of the frst dervatves can be graphcally nterpreted as the slope of the lnear segments connectng the gven ponts as shown n Fgure whch s obtaned wth the followng nteractvely entered statements:

14 FIGURE. The calculaton of the frst dervatves can be graphcally nterpreted as the slope of the lnear segments connectng the gven ponts. The frst, X =, statement creates an array havng 6 elements whose values start at. and ends at.6 and have a unform ncrement of 0.. In the plot statement, the character nsde the frst set of sngle quotaton sgns requests that the gven set of ponts specfed by the coordnates arrays X and Y are to be connected by sold lnes whle the character * nsde the second set of sngle quotaton sgns s for markng those ponts. It also s approprate at ths tme to ntroduce the bar graph feature of MATLAB when we consder data set and dfference table. Fgure 2 s presented to show the use of bar and num2str commands of MATLAB. The bar command plots a seres of vertcal bars based on a set of coordnates arrays X and Y where X values must be equally spaced. The num2str command converts a numercal value nto a strng, t often facltates the dsplay of numercal values n conjuncton wth the text command. The followng nteractvely entered statements have enabled Fgure 2 to be dsplayed:

15 FIGURE 2. Notce that the frst two arguments for text are where the text strng should be placed whereas the thrd argument converts the value of Y(I) to be prnted as a strng. The for-end loop allows all Y values to be placed at proper heghts. MATHEMATICA APPLICATIONS To produce a plot smlar to Fgure 3 n the program DffTabl by applcaton of Mathematca, we may enter statements and obtan the followng: Input[]: = X = Table[,{,.,.6,0.}; Y = Exp[X]; Input[2]: = g = Show[Graphcs[Lne[Table[{X[[]],Y[[]]},{,,6}]]]] Input[3]: = g2 = Show[g, Frame->True, AspectRato->, FrameLabel->{ X-axs, Y-axs }] Input[4]: = g3 = Show[g2,Graphcs[Table[Text[ X,{X[[]],Y[[]]}, {,,6}]] Input[5]: = Show[g3,Graphcs[Text[ Lnearly Connected,{.2,4.8}, {,0}],Text[ Data Ponts,{.2,4.6},{,0}]]]

16 FIGURE 3. Only the fnal plot s presented here. The ntermedate plots desgnated as g, g2, and g3 can be recalled and dsplayed f necessary. The Lne command n Input[3] drects the specfed pars of coordnates to be lnearly connected. A bar graph can be drawn by applcaton of Mathematca command Rectangle and ther respectve values by the command Text. The followng statements recreate Fgure 4 n the program DffTabl.: Input[]: = X = {,2,3,4,5}; Y = {2,4,7,,24}; Input[2]: = g = Show[Graphcs[Table[Rectangle[{X[[]] 0.4,0}, X[[]] + 0.4,Y[[]]}],{,,5}]]] Input[3]: = g2 = Show[g,Graphcs[Table[Text[Y[[]], {X[[]] 0.,Y[[]] + }],{,,5}]]] Input[4]: = g3 = Show[g2, Frame->True, AspectRato->] Input[5]: = g4 = Show[g3,Graphcs[Text[ Bar Graph of X Y Data, {0.5,8},{,0}]]] Input[6]: = Show[%,FrameLabel->{ X-axs, Y-axs }]

17 FIGURE 4. Notce that when no expresson nsde a par of doubt quotes s provded for the command Text, the value of the specfed varable wll be prnted at the desred locaton. Ths s demonstrated n Input[3]. Mathematca also has a functon called BarChart n ts Graphcs package whch can be appled to plot Fgure 5 as follows (agan, some ntermedate Output responses are omtted): FIGURE 5.

18 Input[]: = Y = {2,4,7,,24}; Input[2]: = <<Graphcs`Graphcs` Input[3]: = g = BarChart[Y] Input[4]: = g2 = Show[g,Graphcs[Table[Text[Y[[]], {,Y[[]] + }],{,,5}]] To prnt out a dfference table of a gven set of n y values, we can arrange the y values and up to the n-st order of ther dfferences n a matrx form. The y values are to be lsted n the frst column and ther th-order dferences are to be lsted n the + st column for =,2,,n. The followng Mathematca nput and ouput statements demonstrate the prnt out of a set of 6 y values: Input[]: = y = {,3,7,2,44,78}; Input[2]: = n = Length[y]; yanddys = Table[x,{,n},{j,n}]; MatrxForm[yanddys] Output[2] = x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x Input[3]: = Do[yanddys[[,]] = y[[]]; MatrxForm[yanddys] Output[3] = x x x x x 3 x x x x x 7 x x x x x 2 x x x x x 44 x x x x x 78 x x x x x Input[4]: = Do[Do[yanddys[[,j]] = yanddys[[ +,j ]]-yanddys[[,j ], {,n-j + }],{j,2,n}]; MatrxForm[yanddys] Output[4] = x x x x x x x x x x 78 x x x x x

19 Notce that n Input[2], the Mathematca functons Length has been appled to determne the number of components n the array y, Table s used to ntalze a matrx of n by n wth the character x, and MatrxForm allows the matrx, yanddys, to be prnted n a matrx form. Input[3] stores the y array nto the frst column of the matrx yanddys by applcaton of the Mathematca command Do. Such loopng s extended n Input[4] where the hgher order dfferences are generated by usng an nner ndex and an outer ndex j. The column number j of the matrx yanddys s ncreased from 2 to n but the length of each column s contnuously decreased to n-j +. Such DoDo arrangement s made possble by keepng the y values and ther dfferences n a column-by-column form. 4.3 PROGRAM LAGRANGI APPLICATIONS OF LAGRANGIAN INTERPOLATION FORMULA Program LagrangI s desgned to curve-ft a gven set of n ponts, (x,f ) for =, 2,,n, by a polynomal of n-st degree based on the Lagrangan Interpolaton Formula: n n fx = f ( x x) x x = k= k [ k ( k) ] () If only the value of the functon f(x) at a specfed value of x = x s s needed, then Equaton can be appled to compute n n fx ( s)= f ( x2 x) x x = k= k [ k ( k) ] (2) In Equatons and 2, the symbol s to represent a product of a specfed number of factors such as: n F = k FF 2 F k= n (3) Equaton can be proven f we wrte the equaton whch fts the n gven ponts (x,f ) for = to n by a combnaton of n functons L to n (x) as: = fx fl x fl x fl x 2 2 n n (4) Notce that the ordnates f to n are utlzed n Equaton 4. We expect the functons L to n (x) to behave n such a way that when x = x only the f L (x) term n Equaton 4 wll contrbute to f(x). That s to say when x = x, L (x ) should be equal to unty and the other L(x) should be equal to zero. Mathematcally, we wrte demand that:

20 = = L x and L x 0 for j j (5) The second condton of Equaton 5 suggests that x-x k are factors of L (x) for k =,2,,n but not x-x. Therefore, we may wrte: L ( x)= c ( x x )( x x ) ( x x )( x x ) x x 2 + n (6) The constant assocated wth L (x), c s to be determned by satsfyng the frst condton of Equaton 5. That s: n c = x x k= k k (7) Consequently, the complete expresson for L (x) s: [ ] n k xk k= k L ( x)= x x x (8) And, when Equaton 8 s substtuted nto Equaton 4, we arrve at Equaton. A numercal example wll clarfy the applcaton of Equaton 2. Consder the case of three gven ponts (x,f ) = (,2), (x 2,f 2 ) = (.5,2.5), (x 3,f 3 ) = (3,4), then n = 3. If we need to calculate f(x = 2), Equaton 2 can be used to fnd the equaton whch passes all three ponts. That s: fx = ( ) ( ) x x2 x x3 x x x x f x x x x3 + x x x x f 2 3 ( ) ( ) x x x x2 + x x x x f ( x 5. )( x 3) = ( ) ( ) ( x ) x ( ) ( ) ( x ) ( x 3) ( ) = 2( x 4. 5x+ 4. 5) ( x 4x+ 3)+ x 25. x = x + 2

21 When x = 2, f(x = 2) = 3. Actually, the value of f(x = 2) can be specfcally calculated as: fx ( = 2)= QUICKBASIC VERSION ( ) ( ) ( ) ( ) x x2 x x3 x x x x f x x x x3 + x x x x f 2 3 ( ) ( ) x x x x2 + x x x x f ( 2. 5) ( 2 3) = ( 3) ( ) ( 2 ) = = ( 2 ) ( 2 3) ( ) 2

22 Sample Applcaton FORTRAN VERSION

23 Sample Applcaton MATLAB APPLICATION A m fle called LagrangI.m can be created and added to MATLAB m fles for nterpolatng a Y value for a gvng X value based on a set of (X,Y) data pont usng the Lagrangan formula. Ths fle may be wrtten as: Ths m fle can then be appled by specfyng the data ponts, X vs. Y, as llustrated by the followng examples: The graphc capablty of MATLABcan also be utlzed here to nterpret Lagrangan nterpolaton. In Fgure 6, fve gven ponts marked wth the character * have been exactly ftted wth a fourth-order polynomal whch s plotted for X 5 wth a sold lne. The nterpolaton at X = 4.56 usng Lagrangan formula s llustrated by the broken lne and dotted lne. The nteractvely entered MATLAB statements, n addton to those already dsplayed above, are:

24 FIGURE 6. Fve gven ponts marked wth the character * have been exactly ftted wth a fourth-order polynomal whch s plotted for X 5 wth a sold lne. The nterpolaton at X = 4.56 usng Lagrangan formula s llustrated by the broken lne and dotted lne.

25 Notce that plot.m automatcally uses sold, broken, and dotted lnes to plot the four-order polynomal curve based on arrays XC and YC, and the vertcal lne based on arrays XV, YV, and the horzontal lne based on arrays XH, YH, respectvely. The detals nvolved n exact curve-ft of the fve gven pont by applyng Least- SqG.m already has been dscussed n the program Gauss. The coeffcents, {C}, of the fourth-order polynomal determned by LeastSqG.m are arranged n descendng order. In order to apply polyval.m of MATLAB, the order of {C} has to be reversed and stored n {Creverse} whch s mplemented above by the for and end loop. MATHEMATICA APPLICATIONS Dervaton of the polynomal whch passng through a set of gven (x,y) ponts based on the Lagrangan formula can be acheved by applcaton of the Interpolatng Polynomal functon of Mathematca. For example, a fourth-order polynomal can be derved for a gven set of 5 (x,y) data ponts as follows: In[]: = pofx = InterpolatngPolynomal [{{,2},{2,4},{3,6},{4,8},{5,}},x] Out[]: = x x x ( + x) 24 To nterpolate the y value of usng the derved polynomal at x equal to 4.56, we replace all x s appearng n the above expresson (saved n pofx) wth a value of 4.56 by nteractvely enterng In[2]: = pofx/. x -> 4.56 Out[2]: = Lnear and parabolc nterpolatons can also be mplemented by selectng approprate data ponts from the gven set. For example, to nterpolate the y value at x =.25 by lnear nterpolaton, we enter: In[3]: = p = InterpolatngPolynomal[{{,2},{2,4}},x] Out[3]: = ( + x) In[4]: = p/. x ->.25 Out[4]: = 2.5 ( + )( + ) To parabolcally nterpolate the y value at x = 3.75 usng the ponts (3,6), (4,8), and (5,), the nteractve applcaton of Mathematca goes as: In[5]: = p2 = InterpolatngPolynomal[{{3,6},{4,8},{5,}},x]

26 4 Out[5]: = x 3 2 ( + x ) In[6]: = p2/. x -> 3.75 Out[6]: = PROBLEMS DIFFTABL. Construct the dfference table based on the followng lsted data and then fnd the y value at x = 4.5 by usng the backward-dfference formula up to the thrd-order dfference. x y Explan why nterpolatons usng Equaton 9 by the frst through fourth orders all fal to match the exact value of y(x =.24) = by makng 4 plots for x values rangng from.2 to.3 wth an ncrement of x = These 4 plots are to be generated wth the 4 equatons obtaned when the frst 2, 3, 4, and 5 ponts are ftted by a frst-, second-, thrd-, and fourth-degree polynomals, respectvely. Also, draw a x =.24, vertcal lne crossng all 4 curves. 3. Fnd the frst-, second-, thrd-, and fourth-order results of y(x =.56) by use of Equaton Wrte E r n terms of bnomal coeffcent and the backward-dfference operator, smlar to Equaton Fnd the frst-, second-, thrd-, and fourth-order results of y (x =.24) by use of Equaton Fnd the frst-, second-, thrd-, and fourth-order results of y(x =.56) by use of Equaton Gven 6 (x,y) ponts (,0.2), (2,0.4), (3,0.7), (4,.5), (5,2.9), and (6,4.7), parabolcally nterpolate y(x = 3.4) frst by use of forward dfferences and then by use of backward dfferences. 8. Modfy ether the QuckBASIC or FORTRAN verson of the program DffTabl to nclude the ffth dfference for the need of forward or backward nterpolaton and numercal dfferentaton. 9. Gven 5 (x,y) ponts (0,0), (,), (2,8), (3,27), and (4,64), construct a complete dfference table based on these data. Compute () y value at x =.25 usng a forward, parabolc (second-order) nterpolaton, (2) y value at x = 3.7 usng a backward, cubc (thrd-order) nterpolaton, and (3) dy/dx value at x = 0 usng a forward, thrd-order approxmaton. 0. Based on Equaton 2, derve the forward-dfference formulas for D 2 y and D 3 y.. Use the result of Problem 0 to compute D 2 y 2 and D 3 y by adoptng the forward-dfference terms n Table as hgh as avalable.

27 2. Use the data n Table to compute the frst dervatve of y at x =.55 by ncludng terms up to the thrd-order forward dfference. 3. Apply MATLAB for the ponts gven n Problem to prnt out the rows of x, y, y, 2 y, 3 y, and 4 y. 4. Same as Problem 3 but the ponts n Problem Apply Mathematca and DO loops to prnt out a dfference table smlar to that shown n Mathematca Applcaton of Secton 4.2 for the ponts gven n Problem. 6. Apply Mathematca and DO loops to prnt out a dfference table smlar to that shown n Mathematca Applcaton of Secton 4.2 for the ponts gven n Problem Compute the bnomal coeffcent for r = 0.4 and k =,2,3,4,5 accordng to Equaton (8) n Secton 4.2 usng MATLAB. 8. Rework Problem 7 but usng Mathematca. LAGRANGI. Gven fve ponts (,), (2,3), (3,2), (4,5), and (5,4), use the last three ponts and Lagrangan nterpolaton formula to compute y value at x = A set of 5 (x,y) ponts s gven as (,2), (2,4), (4,5), (5,2), (6,0), apply the Lagrangan nterpolaton formulas to fnd the y for x = 3 by parabolc nterpolaton usng the mddle three ponts. Check the answer by (a) wthout fttng the three ponts by a parabolc equaton, and (b) by dervng the parabolc equaton and then substtutng x equal to 3 to fnd the y value. 3. Apply the Lagrangan formula to curve-ft the followng lsted data near x = 5 by a cubc equaton. Use the derved cubc equaton to fnd the y value at x = Use the data set gven n Problem 3 to exactly curve-ft them by a quartc equaton y(x) = a + a 2 x + a 3 x 2 + a 4 x 3 + a 5 x 4. Do ths manually based on the Lagrangan formula. 5. Wrte a program and call t ExactFt.Ln5 for computaton of the coeffcents a 5 n the y(x) expresson n Problem Generalze the need n Problem 4 by extendng the exact ft of N gven (x,y) ponts by a polynomal y(x) = a + a 2 x + + a x + + a N x N based on the Lagrangan formula. Call ths program ExactFt.LnN. 7. Based on the Lagrangan formula, use the frst four of the fve ponts gven n Problem to nterpolate the y value at x = 2.5 and then the last four of the fve ponts also at x = Wrte a program and call t Expand. whch wll expand the set of fve ponts gven n Problem 2 to a set of 2 ponts by usng an ncrement of x equal to 0.2 and lnear nterpolaton based on the Lagrangan formula. For any x value whch s not equal to any of the x values of the fve gven x y

28 ponts, ths x value s to be tested to determne between whch two ponts t s located. These two gven ponts are to be used n the nterpolaton process by settng N equal to 2 n the program LagrangI. Ths procedure s to be repeated for x values between and 6 n computaton of all new y values. 9. As for Problem 8 except parabolc nterpolaton s to be mplemented. Call the new program Expand Extend the concept dscussed n Problems 8 and 9 to develop a general program Expand.M for usng N gven ponts and Mth-order Lagrangan nterpolaton to obtan an expanded set.. Apply the functon InterpolatngPolynomal of Mathematca to solve Problems and Check the result of Problem 4 by Mathematca. 3. Apply LagrangI.m to solve Problem by MATLAB. 4. Apply LagrangI.m to solve Problem 2 by MATLAB. 5. Apply LagrangI.m to solve Problem 7 by MATLAB. 4.5 REFERENCE. R. C. Weast, Edtor-n-Chef, CRC Standard Mathematcal Tables, the Chemcal Rubber Co. (now CRC Press LLC), Cleveland, OH, 964, p. 38.

NUMERICAL DIFFERENTIATION

NUMERICAL DIFFERENTIATION NUMERICAL DIFFERENTIATION 1 Introducton Dfferentaton s a method to compute the rate at whch a dependent output y changes wth respect to the change n the ndependent nput x. Ths rate of change s called the

More information

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE Analytcal soluton s usually not possble when exctaton vares arbtrarly wth tme or f the system s nonlnear. Such problems can be solved by numercal tmesteppng

More information

Lecture 2: Numerical Methods for Differentiations and Integrations

Lecture 2: Numerical Methods for Differentiations and Integrations Numercal Smulaton of Space Plasmas (I [AP-4036] Lecture 2 by Lng-Hsao Lyu March, 2018 Lecture 2: Numercal Methods for Dfferentatons and Integratons As we have dscussed n Lecture 1 that numercal smulaton

More information

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law: CE304, Sprng 2004 Lecture 4 Introducton to Vapor/Lqud Equlbrum, part 2 Raoult s Law: The smplest model that allows us do VLE calculatons s obtaned when we assume that the vapor phase s an deal gas, and

More information

Lecture 10 Support Vector Machines II

Lecture 10 Support Vector Machines II Lecture 10 Support Vector Machnes II 22 February 2016 Taylor B. Arnold Yale Statstcs STAT 365/665 1/28 Notes: Problem 3 s posted and due ths upcomng Frday There was an early bug n the fake-test data; fxed

More information

APPENDIX 2 FITTING A STRAIGHT LINE TO OBSERVATIONS

APPENDIX 2 FITTING A STRAIGHT LINE TO OBSERVATIONS Unversty of Oulu Student Laboratory n Physcs Laboratory Exercses n Physcs 1 1 APPEDIX FITTIG A STRAIGHT LIE TO OBSERVATIOS In the physcal measurements we often make a seres of measurements of the dependent

More information

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system Transfer Functons Convenent representaton of a lnear, dynamc model. A transfer functon (TF) relates one nput and one output: x t X s y t system Y s The followng termnology s used: x y nput output forcng

More information

Negative Binomial Regression

Negative Binomial Regression STATGRAPHICS Rev. 9/16/2013 Negatve Bnomal Regresson Summary... 1 Data Input... 3 Statstcal Model... 3 Analyss Summary... 4 Analyss Optons... 7 Plot of Ftted Model... 8 Observed Versus Predcted... 10 Predctons...

More information

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems Numercal Analyss by Dr. Anta Pal Assstant Professor Department of Mathematcs Natonal Insttute of Technology Durgapur Durgapur-713209 emal: anta.bue@gmal.com 1 . Chapter 5 Soluton of System of Lnear Equatons

More information

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Structure and Drive Paul A. Jensen Copyright July 20, 2003 Structure and Drve Paul A. Jensen Copyrght July 20, 2003 A system s made up of several operatons wth flow passng between them. The structure of the system descrbes the flow paths from nputs to outputs.

More information

Formulas for the Determinant

Formulas for the Determinant page 224 224 CHAPTER 3 Determnants e t te t e 2t 38 A = e t 2te t e 2t e t te t 2e 2t 39 If 123 A = 345, 456 compute the matrx product A adj(a) What can you conclude about det(a)? For Problems 40 43, use

More information

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials MA 323 Geometrc Modellng Course Notes: Day 13 Bezer Curves & Bernsten Polynomals Davd L. Fnn Over the past few days, we have looked at de Casteljau s algorthm for generatng a polynomal curve, and we have

More information

Module 14: THE INTEGRAL Exploring Calculus

Module 14: THE INTEGRAL Exploring Calculus Module 14: THE INTEGRAL Explorng Calculus Part I Approxmatons and the Defnte Integral It was known n the 1600s before the calculus was developed that the area of an rregularly shaped regon could be approxmated

More information

Bezier curves. Michael S. Floater. August 25, These notes provide an introduction to Bezier curves. i=0

Bezier curves. Michael S. Floater. August 25, These notes provide an introduction to Bezier curves. i=0 Bezer curves Mchael S. Floater August 25, 211 These notes provde an ntroducton to Bezer curves. 1 Bernsten polynomals Recall that a real polynomal of a real varable x R, wth degree n, s a functon of the

More information

= z 20 z n. (k 20) + 4 z k = 4

= z 20 z n. (k 20) + 4 z k = 4 Problem Set #7 solutons 7.2.. (a Fnd the coeffcent of z k n (z + z 5 + z 6 + z 7 + 5, k 20. We use the known seres expanson ( n+l ( z l l z n below: (z + z 5 + z 6 + z 7 + 5 (z 5 ( + z + z 2 + z + 5 5

More information

One-sided finite-difference approximations suitable for use with Richardson extrapolation

One-sided finite-difference approximations suitable for use with Richardson extrapolation Journal of Computatonal Physcs 219 (2006) 13 20 Short note One-sded fnte-dfference approxmatons sutable for use wth Rchardson extrapolaton Kumar Rahul, S.N. Bhattacharyya * Department of Mechancal Engneerng,

More information

Numerical Solution of Ordinary Differential Equations

Numerical Solution of Ordinary Differential Equations Numercal Methods (CENG 00) CHAPTER-VI Numercal Soluton of Ordnar Dfferental Equatons 6 Introducton Dfferental equatons are equatons composed of an unknown functon and ts dervatves The followng are examples

More information

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES COMPUTATIONAL FLUID DYNAMICS: FDM: Appromaton of Second Order Dervatves Lecture APPROXIMATION OF SECOMD ORDER DERIVATIVES. APPROXIMATION OF SECOND ORDER DERIVATIVES Second order dervatves appear n dffusve

More information

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems Chapter. Ordnar Dfferental Equaton Boundar Value (BV) Problems In ths chapter we wll learn how to solve ODE boundar value problem. BV ODE s usuall gven wth x beng the ndependent space varable. p( x) q(

More information

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0 MODULE 2 Topcs: Lnear ndependence, bass and dmenson We have seen that f n a set of vectors one vector s a lnear combnaton of the remanng vectors n the set then the span of the set s unchanged f that vector

More information

Bézier curves. Michael S. Floater. September 10, These notes provide an introduction to Bézier curves. i=0

Bézier curves. Michael S. Floater. September 10, These notes provide an introduction to Bézier curves. i=0 Bézer curves Mchael S. Floater September 1, 215 These notes provde an ntroducton to Bézer curves. 1 Bernsten polynomals Recall that a real polynomal of a real varable x R, wth degree n, s a functon of

More information

Comparison of Regression Lines

Comparison of Regression Lines STATGRAPHICS Rev. 9/13/2013 Comparson of Regresson Lnes Summary... 1 Data Input... 3 Analyss Summary... 4 Plot of Ftted Model... 6 Condtonal Sums of Squares... 6 Analyss Optons... 7 Forecasts... 8 Confdence

More information

Section 8.3 Polar Form of Complex Numbers

Section 8.3 Polar Form of Complex Numbers 80 Chapter 8 Secton 8 Polar Form of Complex Numbers From prevous classes, you may have encountered magnary numbers the square roots of negatve numbers and, more generally, complex numbers whch are the

More information

Report on Image warping

Report on Image warping Report on Image warpng Xuan Ne, Dec. 20, 2004 Ths document summarzed the algorthms of our mage warpng soluton for further study, and there s a detaled descrpton about the mplementaton of these algorthms.

More information

DUE: WEDS FEB 21ST 2018

DUE: WEDS FEB 21ST 2018 HOMEWORK # 1: FINITE DIFFERENCES IN ONE DIMENSION DUE: WEDS FEB 21ST 2018 1. Theory Beam bendng s a classcal engneerng analyss. The tradtonal soluton technque makes smplfyng assumptons such as a constant

More information

EEE 241: Linear Systems

EEE 241: Linear Systems EEE : Lnear Systems Summary #: Backpropagaton BACKPROPAGATION The perceptron rule as well as the Wdrow Hoff learnng were desgned to tran sngle layer networks. They suffer from the same dsadvantage: they

More information

Difference Equations

Difference Equations Dfference Equatons c Jan Vrbk 1 Bascs Suppose a sequence of numbers, say a 0,a 1,a,a 3,... s defned by a certan general relatonshp between, say, three consecutve values of the sequence, e.g. a + +3a +1

More information

November 5, 2002 SE 180: Earthquake Engineering SE 180. Final Project

November 5, 2002 SE 180: Earthquake Engineering SE 180. Final Project SE 8 Fnal Project Story Shear Frame u m Gven: u m L L m L L EI ω ω Solve for m Story Bendng Beam u u m L m L Gven: m L L EI ω ω Solve for m 3 3 Story Shear Frame u 3 m 3 Gven: L 3 m m L L L 3 EI ω ω ω

More information

DEMO #8 - GAUSSIAN ELIMINATION USING MATHEMATICA. 1. Matrices in Mathematica

DEMO #8 - GAUSSIAN ELIMINATION USING MATHEMATICA. 1. Matrices in Mathematica demo8.nb 1 DEMO #8 - GAUSSIAN ELIMINATION USING MATHEMATICA Obectves: - defne matrces n Mathematca - format the output of matrces - appl lnear algebra to solve a real problem - Use Mathematca to perform

More information

6.3.4 Modified Euler s method of integration

6.3.4 Modified Euler s method of integration 6.3.4 Modfed Euler s method of ntegraton Before dscussng the applcaton of Euler s method for solvng the swng equatons, let us frst revew the basc Euler s method of numercal ntegraton. Let the general from

More information

Module 3: Element Properties Lecture 1: Natural Coordinates

Module 3: Element Properties Lecture 1: Natural Coordinates Module 3: Element Propertes Lecture : Natural Coordnates Natural coordnate system s bascally a local coordnate system whch allows the specfcaton of a pont wthn the element by a set of dmensonless numbers

More information

Salmon: Lectures on partial differential equations. Consider the general linear, second-order PDE in the form. ,x 2

Salmon: Lectures on partial differential equations. Consider the general linear, second-order PDE in the form. ,x 2 Salmon: Lectures on partal dfferental equatons 5. Classfcaton of second-order equatons There are general methods for classfyng hgher-order partal dfferental equatons. One s very general (applyng even to

More information

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity Week3, Chapter 4 Moton n Two Dmensons Lecture Quz A partcle confned to moton along the x axs moves wth constant acceleraton from x =.0 m to x = 8.0 m durng a 1-s tme nterval. The velocty of the partcle

More information

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography CSc 6974 and ECSE 6966 Math. Tech. for Vson, Graphcs and Robotcs Lecture 21, Aprl 17, 2006 Estmatng A Plane Homography Overvew We contnue wth a dscusson of the major ssues, usng estmaton of plane projectve

More information

Nice plotting of proteins II

Nice plotting of proteins II Nce plottng of protens II Fnal remark regardng effcency: It s possble to wrte the Newton representaton n a way that can be computed effcently, usng smlar bracketng that we made for the frst representaton

More information

Modelli Clamfim Equazione del Calore Lezione ottobre 2014

Modelli Clamfim Equazione del Calore Lezione ottobre 2014 CLAMFIM Bologna Modell 1 @ Clamfm Equazone del Calore Lezone 17 15 ottobre 2014 professor Danele Rtell danele.rtell@unbo.t 1/24? Convoluton The convoluton of two functons g(t) and f(t) s the functon (g

More information

1 Matrix representations of canonical matrices

1 Matrix representations of canonical matrices 1 Matrx representatons of canoncal matrces 2-d rotaton around the orgn: ( ) cos θ sn θ R 0 = sn θ cos θ 3-d rotaton around the x-axs: R x = 1 0 0 0 cos θ sn θ 0 sn θ cos θ 3-d rotaton around the y-axs:

More information

Kernel Methods and SVMs Extension

Kernel Methods and SVMs Extension Kernel Methods and SVMs Extenson The purpose of ths document s to revew materal covered n Machne Learnng 1 Supervsed Learnng regardng support vector machnes (SVMs). Ths document also provdes a general

More information

Chapter 13: Multiple Regression

Chapter 13: Multiple Regression Chapter 13: Multple Regresson 13.1 Developng the multple-regresson Model The general model can be descrbed as: It smplfes for two ndependent varables: The sample ft parameter b 0, b 1, and b are used to

More information

More metrics on cartesian products

More metrics on cartesian products More metrcs on cartesan products If (X, d ) are metrc spaces for 1 n, then n Secton II4 of the lecture notes we defned three metrcs on X whose underlyng topologes are the product topology The purpose of

More information

Inductance Calculation for Conductors of Arbitrary Shape

Inductance Calculation for Conductors of Arbitrary Shape CRYO/02/028 Aprl 5, 2002 Inductance Calculaton for Conductors of Arbtrary Shape L. Bottura Dstrbuton: Internal Summary In ths note we descrbe a method for the numercal calculaton of nductances among conductors

More information

CIVL 8/7117 Chapter 10 - Isoparametric Formulation 42/56

CIVL 8/7117 Chapter 10 - Isoparametric Formulation 42/56 CIVL 8/77 Chapter 0 - Isoparametrc Formulaton 4/56 Newton-Cotes Example Usng the Newton-Cotes method wth = ntervals (n = 3 samplng ponts), evaluate the ntegrals: x x cos dx 3 x x dx 3 x x dx 4.3333333

More information

2 Finite difference basics

2 Finite difference basics Numersche Methoden 1, WS 11/12 B.J.P. Kaus 2 Fnte dfference bascs Consder the one- The bascs of the fnte dfference method are best understood wth an example. dmensonal transent heat conducton equaton T

More information

THE VIBRATIONS OF MOLECULES II THE CARBON DIOXIDE MOLECULE Student Instructions

THE VIBRATIONS OF MOLECULES II THE CARBON DIOXIDE MOLECULE Student Instructions THE VIBRATIONS OF MOLECULES II THE CARBON DIOXIDE MOLECULE Student Instructons by George Hardgrove Chemstry Department St. Olaf College Northfeld, MN 55057 hardgrov@lars.acc.stolaf.edu Copyrght George

More information

Polynomial Regression Models

Polynomial Regression Models LINEAR REGRESSION ANALYSIS MODULE XII Lecture - 6 Polynomal Regresson Models Dr. Shalabh Department of Mathematcs and Statstcs Indan Insttute of Technology Kanpur Test of sgnfcance To test the sgnfcance

More information

Professor Terje Haukaas University of British Columbia, Vancouver The Q4 Element

Professor Terje Haukaas University of British Columbia, Vancouver  The Q4 Element Professor Terje Haukaas Unversty of Brtsh Columba, ancouver www.nrsk.ubc.ca The Q Element Ths document consders fnte elements that carry load only n ther plane. These elements are sometmes referred to

More information

This column is a continuation of our previous column

This column is a continuation of our previous column Comparson of Goodness of Ft Statstcs for Lnear Regresson, Part II The authors contnue ther dscusson of the correlaton coeffcent n developng a calbraton for quanttatve analyss. Jerome Workman Jr. and Howard

More information

CALCULUS CLASSROOM CAPSULES

CALCULUS CLASSROOM CAPSULES CALCULUS CLASSROOM CAPSULES SESSION S86 Dr. Sham Alfred Rartan Valley Communty College salfred@rartanval.edu 38th AMATYC Annual Conference Jacksonvlle, Florda November 8-, 202 2 Calculus Classroom Capsules

More information

Lecture 12: Discrete Laplacian

Lecture 12: Discrete Laplacian Lecture 12: Dscrete Laplacan Scrbe: Tanye Lu Our goal s to come up wth a dscrete verson of Laplacan operator for trangulated surfaces, so that we can use t n practce to solve related problems We are mostly

More information

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

The optimal delay of the second test is therefore approximately 210 hours earlier than =2. THE IEC 61508 FORMULAS 223 The optmal delay of the second test s therefore approxmately 210 hours earler than =2. 8.4 The IEC 61508 Formulas IEC 61508-6 provdes approxmaton formulas for the PF for smple

More information

Analytical Chemistry Calibration Curve Handout

Analytical Chemistry Calibration Curve Handout I. Quck-and Drty Excel Tutoral Analytcal Chemstry Calbraton Curve Handout For those of you wth lttle experence wth Excel, I ve provded some key technques that should help you use the program both for problem

More information

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix Lectures - Week 4 Matrx norms, Condtonng, Vector Spaces, Lnear Independence, Spannng sets and Bass, Null space and Range of a Matrx Matrx Norms Now we turn to assocatng a number to each matrx. We could

More information

Physics 5153 Classical Mechanics. Principle of Virtual Work-1

Physics 5153 Classical Mechanics. Principle of Virtual Work-1 P. Guterrez 1 Introducton Physcs 5153 Classcal Mechancs Prncple of Vrtual Work The frst varatonal prncple we encounter n mechancs s the prncple of vrtual work. It establshes the equlbrum condton of a mechancal

More information

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal Inner Product Defnton 1 () A Eucldean space s a fnte-dmensonal vector space over the reals R, wth an nner product,. Defnton 2 (Inner Product) An nner product, on a real vector space X s a symmetrc, blnear,

More information

= = = (a) Use the MATLAB command rref to solve the system. (b) Let A be the coefficient matrix and B be the right-hand side of the system.

= = = (a) Use the MATLAB command rref to solve the system. (b) Let A be the coefficient matrix and B be the right-hand side of the system. Chapter Matlab Exercses Chapter Matlab Exercses. Consder the lnear system of Example n Secton.. x x x y z y y z (a) Use the MATLAB command rref to solve the system. (b) Let A be the coeffcent matrx and

More information

Convexity preserving interpolation by splines of arbitrary degree

Convexity preserving interpolation by splines of arbitrary degree Computer Scence Journal of Moldova, vol.18, no.1(52), 2010 Convexty preservng nterpolaton by splnes of arbtrary degree Igor Verlan Abstract In the present paper an algorthm of C 2 nterpolaton of dscrete

More information

THE SUMMATION NOTATION Ʃ

THE SUMMATION NOTATION Ʃ Sngle Subscrpt otaton THE SUMMATIO OTATIO Ʃ Most of the calculatons we perform n statstcs are repettve operatons on lsts of numbers. For example, we compute the sum of a set of numbers, or the sum of the

More information

Section 3.6 Complex Zeros

Section 3.6 Complex Zeros 04 Chapter Secton 6 Comple Zeros When fndng the zeros of polynomals, at some pont you're faced wth the problem Whle there are clearly no real numbers that are solutons to ths equaton, leavng thngs there

More information

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4) I. Classcal Assumptons Econ7 Appled Econometrcs Topc 3: Classcal Model (Studenmund, Chapter 4) We have defned OLS and studed some algebrac propertes of OLS. In ths topc we wll study statstcal propertes

More information

Linear, affine, and convex sets and hulls In the sequel, unless otherwise specified, X will denote a real vector space.

Linear, affine, and convex sets and hulls In the sequel, unless otherwise specified, X will denote a real vector space. Lnear, affne, and convex sets and hulls In the sequel, unless otherwse specfed, X wll denote a real vector space. Lnes and segments. Gven two ponts x, y X, we defne xy = {x + t(y x) : t R} = {(1 t)x +

More information

Module 9. Lecture 6. Duality in Assignment Problems

Module 9. Lecture 6. Duality in Assignment Problems Module 9 1 Lecture 6 Dualty n Assgnment Problems In ths lecture we attempt to answer few other mportant questons posed n earler lecture for (AP) and see how some of them can be explaned through the concept

More information

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results. Neural Networks : Dervaton compled by Alvn Wan from Professor Jtendra Malk s lecture Ths type of computaton s called deep learnng and s the most popular method for many problems, such as computer vson

More information

Linear Regression Analysis: Terminology and Notation

Linear Regression Analysis: Terminology and Notation ECON 35* -- Secton : Basc Concepts of Regresson Analyss (Page ) Lnear Regresson Analyss: Termnology and Notaton Consder the generc verson of the smple (two-varable) lnear regresson model. It s represented

More information

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers Psychology 282 Lecture #24 Outlne Regresson Dagnostcs: Outlers In an earler lecture we studed the statstcal assumptons underlyng the regresson model, ncludng the followng ponts: Formal statement of assumptons.

More information

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty Addtonal Codes usng Fnte Dfference Method Benamn Moll 1 HJB Equaton for Consumpton-Savng Problem Wthout Uncertanty Before consderng the case wth stochastc ncome n http://www.prnceton.edu/~moll/ HACTproect/HACT_Numercal_Appendx.pdf,

More information

Note 10. Modeling and Simulation of Dynamic Systems

Note 10. Modeling and Simulation of Dynamic Systems Lecture Notes of ME 475: Introducton to Mechatroncs Note 0 Modelng and Smulaton of Dynamc Systems Department of Mechancal Engneerng, Unversty Of Saskatchewan, 57 Campus Drve, Saskatoon, SK S7N 5A9, Canada

More information

Chapter 4: Root Finding

Chapter 4: Root Finding Chapter 4: Root Fndng Startng values Closed nterval methods (roots are search wthn an nterval o Bsecton Open methods (no nterval o Fxed Pont o Newton-Raphson o Secant Method Repeated roots Zeros of Hgher-Dmensonal

More information

Review of Taylor Series. Read Section 1.2

Review of Taylor Series. Read Section 1.2 Revew of Taylor Seres Read Secton 1.2 1 Power Seres A power seres about c s an nfnte seres of the form k = 0 k a ( x c) = a + a ( x c) + a ( x c) + a ( x c) k 2 3 0 1 2 3 + In many cases, c = 0, and the

More information

New Method for Solving Poisson Equation. on Irregular Domains

New Method for Solving Poisson Equation. on Irregular Domains Appled Mathematcal Scences Vol. 6 01 no. 8 369 380 New Method for Solvng Posson Equaton on Irregular Domans J. Izadan and N. Karamooz Department of Mathematcs Facult of Scences Mashhad BranchIslamc Azad

More information

CHAPTER 14 GENERAL PERTURBATION THEORY

CHAPTER 14 GENERAL PERTURBATION THEORY CHAPTER 4 GENERAL PERTURBATION THEORY 4 Introducton A partcle n orbt around a pont mass or a sphercally symmetrc mass dstrbuton s movng n a gravtatonal potental of the form GM / r In ths potental t moves

More information

Numerical Heat and Mass Transfer

Numerical Heat and Mass Transfer Master degree n Mechancal Engneerng Numercal Heat and Mass Transfer 06-Fnte-Dfference Method (One-dmensonal, steady state heat conducton) Fausto Arpno f.arpno@uncas.t Introducton Why we use models and

More information

A new Approach for Solving Linear Ordinary Differential Equations

A new Approach for Solving Linear Ordinary Differential Equations , ISSN 974-57X (Onlne), ISSN 974-5718 (Prnt), Vol. ; Issue No. 1; Year 14, Copyrght 13-14 by CESER PUBLICATIONS A new Approach for Solvng Lnear Ordnary Dfferental Equatons Fawz Abdelwahd Department of

More information

Chapter Newton s Method

Chapter Newton s Method Chapter 9. Newton s Method After readng ths chapter, you should be able to:. Understand how Newton s method s dfferent from the Golden Secton Search method. Understand how Newton s method works 3. Solve

More information

TR/95 February Splines G. H. BEHFOROOZ* & N. PAPAMICHAEL

TR/95 February Splines G. H. BEHFOROOZ* & N. PAPAMICHAEL TR/9 February 980 End Condtons for Interpolatory Quntc Splnes by G. H. BEHFOROOZ* & N. PAPAMICHAEL *Present address: Dept of Matematcs Unversty of Tabrz Tabrz Iran. W9609 A B S T R A C T Accurate end condtons

More information

Indeterminate pin-jointed frames (trusses)

Indeterminate pin-jointed frames (trusses) Indetermnate pn-jonted frames (trusses) Calculaton of member forces usng force method I. Statcal determnacy. The degree of freedom of any truss can be derved as: w= k d a =, where k s the number of all

More information

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1 P. Guterrez Physcs 5153 Classcal Mechancs D Alembert s Prncple and The Lagrangan 1 Introducton The prncple of vrtual work provdes a method of solvng problems of statc equlbrum wthout havng to consder the

More information

APPENDIX A Some Linear Algebra

APPENDIX A Some Linear Algebra APPENDIX A Some Lnear Algebra The collecton of m, n matrces A.1 Matrces a 1,1,..., a 1,n A = a m,1,..., a m,n wth real elements a,j s denoted by R m,n. If n = 1 then A s called a column vector. Smlarly,

More information

Chapter 11: Simple Linear Regression and Correlation

Chapter 11: Simple Linear Regression and Correlation Chapter 11: Smple Lnear Regresson and Correlaton 11-1 Emprcal Models 11-2 Smple Lnear Regresson 11-3 Propertes of the Least Squares Estmators 11-4 Hypothess Test n Smple Lnear Regresson 11-4.1 Use of t-tests

More information

Lecture Note 3. Eshelby s Inclusion II

Lecture Note 3. Eshelby s Inclusion II ME340B Elastcty of Mcroscopc Structures Stanford Unversty Wnter 004 Lecture Note 3. Eshelby s Incluson II Chrs Wenberger and We Ca c All rghts reserved January 6, 004 Contents 1 Incluson energy n an nfnte

More information

Linear Approximation with Regularization and Moving Least Squares

Linear Approximation with Regularization and Moving Least Squares Lnear Approxmaton wth Regularzaton and Movng Least Squares Igor Grešovn May 007 Revson 4.6 (Revson : March 004). 5 4 3 0.5 3 3.5 4 Contents: Lnear Fttng...4. Weghted Least Squares n Functon Approxmaton...

More information

SPANC -- SPlitpole ANalysis Code User Manual

SPANC -- SPlitpole ANalysis Code User Manual Functonal Descrpton of Code SPANC -- SPltpole ANalyss Code User Manual Author: Dale Vsser Date: 14 January 00 Spanc s a code created by Dale Vsser for easer calbratons of poston spectra from magnetc spectrometer

More information

ALGORITHM FOR THE CALCULATION OF THE TWO VARIABLES CUBIC SPLINE FUNCTION

ALGORITHM FOR THE CALCULATION OF THE TWO VARIABLES CUBIC SPLINE FUNCTION ANALELE ŞTIINŢIFICE ALE UNIVERSITĂŢII AL.I. CUZA DIN IAŞI (S.N.) MATEMATICĂ, Tomul LIX, 013, f.1 DOI: 10.478/v10157-01-00-y ALGORITHM FOR THE CALCULATION OF THE TWO VARIABLES CUBIC SPLINE FUNCTION BY ION

More information

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1 C/CS/Phy9 Problem Set 3 Solutons Out: Oct, 8 Suppose you have two qubts n some arbtrary entangled state ψ You apply the teleportaton protocol to each of the qubts separately What s the resultng state obtaned

More information

ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM

ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM An elastc wave s a deformaton of the body that travels throughout the body n all drectons. We can examne the deformaton over a perod of tme by fxng our look

More information

Erratum: A Generalized Path Integral Control Approach to Reinforcement Learning

Erratum: A Generalized Path Integral Control Approach to Reinforcement Learning Journal of Machne Learnng Research 00-9 Submtted /0; Publshed 7/ Erratum: A Generalzed Path Integral Control Approach to Renforcement Learnng Evangelos ATheodorou Jonas Buchl Stefan Schaal Department of

More information

PHYS 705: Classical Mechanics. Calculus of Variations II

PHYS 705: Classical Mechanics. Calculus of Variations II 1 PHYS 705: Classcal Mechancs Calculus of Varatons II 2 Calculus of Varatons: Generalzaton (no constrant yet) Suppose now that F depends on several dependent varables : We need to fnd such that has a statonary

More information

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X Statstcs 1: Probablty Theory II 37 3 EPECTATION OF SEVERAL RANDOM VARIABLES As n Probablty Theory I, the nterest n most stuatons les not on the actual dstrbuton of a random vector, but rather on a number

More information

Differentiating Gaussian Processes

Differentiating Gaussian Processes Dfferentatng Gaussan Processes Andrew McHutchon Aprl 17, 013 1 Frst Order Dervatve of the Posteror Mean The posteror mean of a GP s gven by, f = x, X KX, X 1 y x, X α 1 Only the x, X term depends on the

More information

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U) Econ 413 Exam 13 H ANSWERS Settet er nndelt 9 deloppgaver, A,B,C, som alle anbefales å telle lkt for å gøre det ltt lettere å stå. Svar er gtt . Unfortunately, there s a prntng error n the hnt of

More information

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11)

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11) Gravtatonal Acceleraton: A case of constant acceleraton (approx. hr.) (6/7/11) Introducton The gravtatonal force s one of the fundamental forces of nature. Under the nfluence of ths force all objects havng

More information

Solution Thermodynamics

Solution Thermodynamics Soluton hermodynamcs usng Wagner Notaton by Stanley. Howard Department of aterals and etallurgcal Engneerng South Dakota School of nes and echnology Rapd Cty, SD 57701 January 7, 001 Soluton hermodynamcs

More information

Canonical transformations

Canonical transformations Canoncal transformatons November 23, 2014 Recall that we have defned a symplectc transformaton to be any lnear transformaton M A B leavng the symplectc form nvarant, Ω AB M A CM B DΩ CD Coordnate transformatons,

More information

Global Sensitivity. Tuesday 20 th February, 2018

Global Sensitivity. Tuesday 20 th February, 2018 Global Senstvty Tuesday 2 th February, 28 ) Local Senstvty Most senstvty analyses [] are based on local estmates of senstvty, typcally by expandng the response n a Taylor seres about some specfc values

More information

Generalized Linear Methods

Generalized Linear Methods Generalzed Lnear Methods 1 Introducton In the Ensemble Methods the general dea s that usng a combnaton of several weak learner one could make a better learner. More formally, assume that we have a set

More information

Chapter 9: Statistical Inference and the Relationship between Two Variables

Chapter 9: Statistical Inference and the Relationship between Two Variables Chapter 9: Statstcal Inference and the Relatonshp between Two Varables Key Words The Regresson Model The Sample Regresson Equaton The Pearson Correlaton Coeffcent Learnng Outcomes After studyng ths chapter,

More information

Foundations of Arithmetic

Foundations of Arithmetic Foundatons of Arthmetc Notaton We shall denote the sum and product of numbers n the usual notaton as a 2 + a 2 + a 3 + + a = a, a 1 a 2 a 3 a = a The notaton a b means a dvdes b,.e. ac = b where c s an

More information

Kinematics in 2-Dimensions. Projectile Motion

Kinematics in 2-Dimensions. Projectile Motion Knematcs n -Dmensons Projectle Moton A medeval trebuchet b Kolderer, c1507 http://members.net.net.au/~rmne/ht/ht0.html#5 Readng Assgnment: Chapter 4, Sectons -6 Introducton: In medeval das, people had

More information

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification E395 - Pattern Recognton Solutons to Introducton to Pattern Recognton, Chapter : Bayesan pattern classfcaton Preface Ths document s a soluton manual for selected exercses from Introducton to Pattern Recognton

More information

PHYS 705: Classical Mechanics. Canonical Transformation II

PHYS 705: Classical Mechanics. Canonical Transformation II 1 PHYS 705: Classcal Mechancs Canoncal Transformaton II Example: Harmonc Oscllator f ( x) x m 0 x U( x) x mx x LT U m Defne or L p p mx x x m mx x H px L px p m p x m m H p 1 x m p m 1 m H x p m x m m

More information

Application of B-Spline to Numerical Solution of a System of Singularly Perturbed Problems

Application of B-Spline to Numerical Solution of a System of Singularly Perturbed Problems Mathematca Aeterna, Vol. 1, 011, no. 06, 405 415 Applcaton of B-Splne to Numercal Soluton of a System of Sngularly Perturbed Problems Yogesh Gupta Department of Mathematcs Unted College of Engneerng &

More information