22.01.2014 Views

download searchable PDF of Circuit Design book - IEEE Global ...

download searchable PDF of Circuit Design book - IEEE Global ...

download searchable PDF of Circuit Design book - IEEE Global ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Romberg Integranon 17<br />

Truncation Error O(h!l O(h1) O(ht) O(hl)·· .<br />

Step<br />

~<br />

0 1 2 3<br />

Length hi<br />

b-a=ho 0 To,o .-TTI.O VT,.o ~T3.0···<br />

b-a<br />

-2-==hj 1 TO,1 VTI.I V T,.,_ .,.<br />

b-a =h) 2 T O,2 V T ,., _ ...<br />

4 •<br />

b-a<br />

-8-~h3 3 ...<br />

TO,J_<br />

h=1 0.7500000oo 0.694444445 0.693174603 0.693147478 0.693147182<br />

h=O.5 0.708333333 0.693253968 0.693147902 0.693147183<br />

h =0.25 0.69702381 0.693154531 0.693147194<br />

h-0.125 0.69412185 0.693147653 I(x) =.!. a=l<br />

x b:;;,2<br />

Figure 2.S.<br />

Table <strong>of</strong> T values in the Romberg integration algorithm.<br />

2.3.3. Romberg Integration Program. BASIC language Program B2-3 in<br />

Appendix B implements (2.27), as iIlustrated in Figure 2.5. The only storage<br />

required is in vector (single-subscript array) AU(·). The integrand function<br />

should be coded by the user beginning in line 10,000; the values relurned by<br />

the user's subroutine are expected to be labeled by the variable name "FC."<br />

The table <strong>of</strong> values in the format <strong>of</strong> Figure 2.5 can be compared 10 the<br />

program's computing sequence by adding lines to Program B2-3, as shown in<br />

Table 2.1.<br />

Run the example in the subroutine programmed in line 10,000 and after.<br />

The integrand is Ilx, so that the integral is known in closed form, namely In x.<br />

Input limits a= I to b=2, sO that the answer should be In2. The progress <strong>of</strong><br />

the Romberg algorilhm for this example is shown in Figure 2.5, and the<br />

answer at termination is underlined. Parameter NO= I I in Appendix-B Program<br />

B2-3 limits the algorithm to a maximum <strong>of</strong> 1025 evaluations <strong>of</strong> the<br />

integrand function. The accuracy parameter EP = I.E - 5 usually produces at<br />

Table 2.1.<br />

Statements to Output tbe<br />

Romberg Table<br />

9062 PRINT"I1 AVOI)"<br />

9064 PRINT.0; AV(I)<br />

9282 PRINT<br />

9284 PRINT.0; AV(I)<br />

9352 PRINTII; AV(II)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!