a) Use base b = 10, precision k = 4, idealized, chopping floating-point arithmetic to show that fl(g(1.015)) is inaccurate, where

he298c

he298c

Answered question

2020-12-29

a) Use base b = 10, precision k = 4, idealized, chopping floating-point arithmetic to show that fl(g(1.015)) is inaccurate, where g(x)=x141x1 b) Derive the second order (n = 2) quadratic Taylor polynomial approximation for f(x)=x14 expanded about a = 1, and use it to get an accurate approximation to g(x) in part (a). c) Verify that your approximation in (b) is more accurate.

Answer & Explanation

avortarF

avortarF

Skilled2020-12-30Added 113 answers

(a) Compute g(x) for x=1.015.

g(1.015)=(1.015)1/411.0151=0.248605929

This is the exact value of g(x). In the ideal situation of chopping floating-point arithmetic, the operations are performed one at a time and the results are chopped after each operation. The floating-point number of the result with precision k=4 is fl(g(1.015))=fl((1.015)1/4)1fl(1.0151)

=1.00410.015

=fl(1.0041)0.015

=fl(0.0040.015)

=0.2667

The absolute value of g(x) is 0.248605929 and the floating-point value is 0.2667. The machine precision for b=10 and k=4 is mach=12b1k=121014=5×104 The absolute error is |fl(g(1.015))g(1.015)||g(1.015)|=|0.26670.248605929||0.248605929|0.0737.3%>5×104 Hence, fl(g(1.015)) is inaccurate. (b) The Taylor's polynomial of order 2 of a function f(x) around a point x = a is f(x)=f(a)+f(a)(xa)+f(a)2!(xa)2 Given f(x)=x1/4  f(x)=14x3/4 and f(x)=316x74 We shall take an expansion around the point x = 1. After substituting and simplifying, we get the Taylor's quadratic polynomial as follows: f(x)=x14=1+14(x1)332(x1)2 Now, approximate g(x) by using the Taylor`s polynomial f(x). fl(g(x))=fl(f(x)1x1)

=fl(1+14(x1)332(x1)21x1)

=fl(14(x1)332(x1)2x1)

Substitute values and use idealized, chopping floating-point arithmetic.

Jeffrey Jordon

Jeffrey Jordon

Expert2021-12-16Added 2605 answers

Answer is given below (on video)

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?