Computational Engineering Problem Set: Numerical Methods and Approximations, Assignments of Engineering

Problem set questions for engr 6101: computational engineering course. The questions cover topics such as numerical approximations, square roots, and numerical differentiation. Students are required to perform calculations using given formulas and find the absolute and relative errors.

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-zwp-1
koofers-user-zwp-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ENGR 6101: COMPUTATIONAL ENGINEERING
Problem Set 1 (due Thursday, 8/28)
Show all your work on all problems. Correct answers without enough work will be graded as 0/3.
Questions:
1. (3 pts.) A computer with 4 digit precision would recognize the given values as follows:
π
0.3142×101
12347.89 0.1235×105
0.0001231234 0.1231×103
10.1000×101
We can emulate the algebraic operations on such a computer by doing the same operation on a higher
precision machine (eg. a calculator,matlab, etc.) and than decrease the precision as shown above
(rounding to the nearest decimal). But, we have to round after each basic operation, such as sum,
product, square root, etc.
(a) Consider the following expression: x3
On such a computer, compute the expression above for x=9.01. 1
(b) Note that
x3=(x3)(x+3)
x+3=x9
x+3
On the same computer, evaluate the last expression above, again for x=9.01.
(c) Use a higher precision machine (at least 8 digits) to compute 9.01 3, and write down this
result. Assuming that this results is “true”, compute the absolute and relative errors (accurate
upto at least 6 digits) for the results you obtained in part (a) and (b).
2. (3 pts.) Consider the following numerical differentiation formula:
f(x)
α
f(x+h) +
β
f(x2h)
γ
h
Find the appropriate values for
α
,
β
and
γ
for this formula to work (using Taylor series expansion).
What is the order of your approximation?
3. (3 pts) Consider the following numerical differentiation formula:
f(x)f(x+2h) + 8f(x+h)8f(xh) + f(x2h)
12h
Prove that this is a valid formula (using Taylor’s expansion) and find its order.
1In 1(a) and 1(b), do the operations step by step. For example, in 1(a), first do the square root (on a high precision machine), and
then adjust the precision to four digits. Then do the difference (again on a high precision machine), and again limit the precision of
the result to four digits.
1
pf2

Partial preview of the text

Download Computational Engineering Problem Set: Numerical Methods and Approximations and more Assignments Engineering in PDF only on Docsity!

ENGR 6101: COMPUTATIONAL ENGINEERING

Problem Set 1 (due Thursday, 8/28)

Show all your work on all problems. Correct answers without enough work will be graded as 0/3.

Questions:

  1. (3 pts.) A computer with 4 digit precision would recognize the given values as follows:

π → 0. 3142 × 10 1

12347. 89 → 0. 1235 × 10

5

0. 0001231234 → 0. 1231 × 10

− 3

1 → 0. 1000 × 10

1

We can emulate the algebraic operations on such a computer by doing the same operation on a higher

precision machine (eg. a calculator,matlab, etc.) and than decrease the precision as shown above

(rounding to the nearest decimal). But, we have to round after each basic operation, such as sum,

product, square root, etc.

(a) Consider the following expression: √ x − 3

On such a computer, compute the expression above for x = 9 .01. 1

(b) Note that √ x − 3 =

x − 3 )(

x + 3 ) √ x + 3

x − 9 √ x + 3

On the same computer, evaluate the last expression above, again for x = 9 .01.

(c) Use a higher precision machine (at least 8 digits) to compute

  1. 01 − 3, and write down this

result. Assuming that this results is “true”, compute the absolute and relative errors (accurate

upto at least 6 digits) for the results you obtained in part (a) and (b).

  1. (3 pts.) Consider the following numerical differentiation formula:

f

′ ( x ) ≈

α f ( x + h ) + β f ( x − 2 h )

γ h

Find the appropriate values for α, β and γ for this formula to work (using Taylor series expansion).

What is the order of your approximation?

  1. (3 pts) Consider the following numerical differentiation formula:

f

′ ( x ) ≈

f ( x + 2 h ) + 8 f ( x + h ) − 8 f ( xh ) + f ( x − 2 h )

12 h

Prove that this is a valid formula (using Taylor’s expansion) and find its order.

(^1) In 1(a) and 1(b), do the operations step by step. For example, in 1(a), first do the square root (on a high precision machine), and

then adjust the precision to four digits. Then do the difference (again on a high precision machine), and again limit the precision of

the result to four digits.

  1. (3 pts) Consider the following function:

f ( x ) = x

2

  • sin ( x )

(a) Create a table by evaluating this function at x = 0. 6 , 0. 8 , 1 , 1 .2 and 1.4, accurate upto at least 8

digits 2

. Then compute the numerical approximation of the derivative at x = 1 using the following

methods below:

i. Forward, use values f ( 1 ) and f ( 1 .2).

ii. Backward, use values f ( 1 ) and f ( 0 .8).

iii. Central, use values f ( 0. 8 ) and f ( 1 .2).

iv. New method presented in problem 3, use values f ( 0. 6 ), f ( 0 .8), f ( 1. 2 ) and f ( 1 .4).

(b) Compute the exact value by taking the derivative of this function and evaluating the derivative

at x = 1 (accurate upto at least 8 digits). Assuming that this results is “true”, find the absolute

errors for all the methods above.

(^2) Note that x is in radians, that is, sin( 2 π) = 1.