4.12.2003

EE 443

COMPUTATIONAL METHODS IN ELECTRICAL ENGINEERING

Midterm Exam II

SURNAME:

NAME:

STUDENT ID:

SIGNATURE:

QUESTION / GRADE
1
2
3
4
5
TOTAL

Useful Formulae :

  • Bulirsh-Stoer Algorithm

Data / First Stage / Second stage / Third stage

1)(20 pts.) Assume that a function and its derivative are measured and tabulated as shown below.

/ 1 / 2 / 3
/ 13 / 2 / 7
/ 1 / 18 / 59

Determine an interpolating polynomial by using the Hermite interpolation and use this polynomial to estimate the value of the function and its derivative at x=2.5and at x=10. Discuss whether your results are meaningful or not.

x / f(x) /
1 / 13
1
1 / 13 / 10
11 / 3
2 / 2 / 7 / 6
18 / 15 / 1
2 / 2 / 23 / 8
5 / 31
3 / 7 / 54
59
3 / 7

The evaluation at x=2.5is an interpolation while the evaluation at x=10 is an extrapolation. Hence the results at x=10 are not reliable.

2)(20 pts.) The gamma function, , is defined by the formula

The values of the gamma function are tabulated (rounded to 3 decimal places) in the following table

/ 0.1 / 0.2 / 0.3
/ 9.51 / 4.59 / 2.99

i)obtain an interpolating polynomial in Newton’s form, and interpolate the function at accurate to 3 decimal places,

ii)interpolate the function at by using a rational approximation using the Bulirsh-Stoer algorithm accurate to 3 decimal places,

iii)The exact value (to 3 decimal places) of the gamma function at is . Determine the relative errors in both interpolations of parts (i) and (ii). Which method gives better result? Explain.

Hint : Note that

i.e., has a pole at

i)Polynomial approximation:

x / f(x)
0.1 / 9.51
49.2
0.2 / 4.59 / 166
16
0.3 / 2.99

ii)Rational function approximation:

x
0.1 / 9.51
8.59
0.2 / 4.59 / 8.60
8.85
0.3 / 2.99

iii)The relative error in polynomial approximation:

The relative error in rational approximation:

Since the gamma function has a nearby pole at , the rational approximation gives much better result.

3) (20 pts.) The switch in the following figure is closed at time and the voltage across the capacitor is observed. The capacitor has an unknown initial charge on it and therefore the capacitor voltage can be written as

where the time constant is known to be msec.

The capacitor voltage is measured and tabulated at several instants in the table below. However, there is an inevitable error in the measurements due to instrument accuracy. Determine a least squares approximation to the data in the form given above and estimate the initial, , and the steady state, , capacitor voltages.

Hence we have two equations: where

We need to calculate these terms. The following table gives the relevant quantities in three decimal places:

0,1 / 5,2 / 0,905 / 0,095 / 0,819 / 0,009 / 0,086 / 4,705 / 0,495
0,2 / 6 / 0,819 / 0,181 / 0,670 / 0,033 / 0,148 / 4,912 / 1,088
0,3 / 6,5 / 0,741 / 0,259 / 0,549 / 0,067 / 0,192 / 4,815 / 1,685
0,4 / 6,6 / 0,670 / 0,330 / 0,449 / 0,109 / 0,221 / 4,424 / 2,176
0,5 / 7 / 0,607 / 0,393 / 0,368 / 0,155 / 0,239 / 4,246 / 2,754
0,6 / 7,3 / 0,549 / 0,451 / 0,301 / 0,204 / 0,248 / 4,006 / 3,294
0,7 / 7,5 / 0,497 / 0,503 / 0,247 / 0,253 / 0,250 / 3,724 / 3,776
S3 / S1 / S2 / B / A
3,403 / 0,830 / 1,384 / 30,833 / 15,267

Thus,

4)(20 pts.) The sine integral is defined as

and is encountered in many problems of mathematical physics. This integral does not have a simple expression in terms of elementary functions and must be evaluated by using some computational method. Assume that we want to evaluate .

i)Expand the integrand into a Taylor (infinite) series at .

ii)Evaluate the integral of the resulting (infinite) series.

iii)Using only the terms up to and including the of the series you obtained in part (ii), determine an approximation to . Determine also the error in your calculation.

Hint :

i)

ii)

iii)

Since we truncate the series at the remainder will be

and the error will be less than

5)(20 pts.) The Taylor series expansion of the tangent function is

Obtain the Padé approximation where is a third order polynomial and is a second order polynomial.

Hint :

Padé approximation formula is

where are the coefficients of numerator, denominator and the Taylor approximation polynomials, respectively.