

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Show all your work on all problems. Correct answers without enough work will be graded as 0/3.
π → 0. 3142 × 10 1
5
− 3
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
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).
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?
f
′ ( x ) ≈
− f ( x + 2 h ) + 8 f ( x + h ) − 8 f ( x − h ) + 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.
f ( x ) = x
2
(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.