(a) Find the Taylor series with n+1 terms and the associated truncation error for log(2) – z + 1 (z – 1)² F(z) » (3) by substituting the series (2) for log(x) into F(z). Your expression for the Taylor series should be general, similar to the series for log(x) (see Lab1A for examples of such compu- tations). For numerical evaluation it is useful to simplify the F(x) after substituting the first few terms of log z -= (z – 1) – (z – 1)?/2 + -.

Algebra and Trigonometry (6th Edition)
6th Edition
ISBN:9780134463216
Author:Robert F. Blitzer
Publisher:Robert F. Blitzer
ChapterP: Prerequisites: Fundamental Concepts Of Algebra
Section: Chapter Questions
Problem 1MCCP: In Exercises 1-25, simplify the given expression or perform the indicated operation (and simplify,...
icon
Related questions
Question
plz solve the question 3(c) with explanation and get multiple upvotes.
Problem 1
(a) Find the Taylor series with n+1 terms and the associated truncation error for
log(x) – z + 1
(z – 1)?
F(r)
(3)
by substituting the series (2) for log(x) into F(x). Your expression for the Taylor series
should be general, similar to the series for log(z) (see LablA for examples of such compu-
tations). For numerical evaluation it is useful to simplify the F(x) after substituting the
first few terms of log z = (r – 1) – (z – 1)°/2 + ....
(b) Construct an expression that bounds the truncation error, assuming n > 2, for a given
value of z. See especially the review material and examples related to Taylor's series with
remainder in Section 0.5 of the Text by Sauer.
Problem 2
(a) Modify an M-file for Taylor Series from Lab1A (e.g. for exp(z) without using Horner) to
compute and plot the Taylor series and F(x) from problem 1 above. (an M-file is expected
for this part).
A couple of implementation hints that may be useful:
(i) Note that the loop does not have to start with 1.
(i) Note that the first term in the series is now -1/2 rather than 0 so you will need to
change the initialization. A useful function to do this is the Matlab ones function which
you can multiply by -0.5 to get the appropriate initialization.
(ii) When calculating F(x) with a vector argument z instead of a scalar, you need to use
the vector operators for division / and powers." (i.e. with the. modifying the normal
operator).
(b) Plot a graph of F(x) and also its Taylor series with 4 terms (up to the cubic term) using
50 points over the range (0.999, 1.001). If you have done this correctly, the curves should
be essentially indistinguishable.
Problem 3
(a) Change the range of your plot in problem 2b above to (1–10-7,1+10-7). The two curves
should now look very different.
(b) Change the script so that it plots the absolute and relative errors (two different plots, one
for absolute error, one for relative error)related to the difference between the Taylor series
and F(2) over the interval (1 – 10-6,1+ 10-6). Make sure you use the Matllab abe
function to obtain the absolute value of the error. Use a log scale on the y-axis.
(c) To identify the source of the errors plotted in (b) it is useful to compare to a reasonable
bound for the truncation error expected for the Taylor series. Come up with a such a bound
and plot its magnitude on the same log-linear plot from (b). You should have a different
bound for z <1 and z>1 (you can first look at the simpler case of log(r) to understand
why this happens). For r>1 you can use the result mentioned in class for error of an
alternating series. The case z <1 is much harder. You should consider what dominates
F(2) as z+0*.
(d) Consider the results from (c). From this you should be able to conclude that the problem
is roundoff error rather than truncation error. Why? Explain what is making the roundoff
errors so large and give an argument as to whether the Taylor series or the directly computed
function is more accurate.
Transcribed Image Text:Problem 1 (a) Find the Taylor series with n+1 terms and the associated truncation error for log(x) – z + 1 (z – 1)? F(r) (3) by substituting the series (2) for log(x) into F(x). Your expression for the Taylor series should be general, similar to the series for log(z) (see LablA for examples of such compu- tations). For numerical evaluation it is useful to simplify the F(x) after substituting the first few terms of log z = (r – 1) – (z – 1)°/2 + .... (b) Construct an expression that bounds the truncation error, assuming n > 2, for a given value of z. See especially the review material and examples related to Taylor's series with remainder in Section 0.5 of the Text by Sauer. Problem 2 (a) Modify an M-file for Taylor Series from Lab1A (e.g. for exp(z) without using Horner) to compute and plot the Taylor series and F(x) from problem 1 above. (an M-file is expected for this part). A couple of implementation hints that may be useful: (i) Note that the loop does not have to start with 1. (i) Note that the first term in the series is now -1/2 rather than 0 so you will need to change the initialization. A useful function to do this is the Matlab ones function which you can multiply by -0.5 to get the appropriate initialization. (ii) When calculating F(x) with a vector argument z instead of a scalar, you need to use the vector operators for division / and powers." (i.e. with the. modifying the normal operator). (b) Plot a graph of F(x) and also its Taylor series with 4 terms (up to the cubic term) using 50 points over the range (0.999, 1.001). If you have done this correctly, the curves should be essentially indistinguishable. Problem 3 (a) Change the range of your plot in problem 2b above to (1–10-7,1+10-7). The two curves should now look very different. (b) Change the script so that it plots the absolute and relative errors (two different plots, one for absolute error, one for relative error)related to the difference between the Taylor series and F(2) over the interval (1 – 10-6,1+ 10-6). Make sure you use the Matllab abe function to obtain the absolute value of the error. Use a log scale on the y-axis. (c) To identify the source of the errors plotted in (b) it is useful to compare to a reasonable bound for the truncation error expected for the Taylor series. Come up with a such a bound and plot its magnitude on the same log-linear plot from (b). You should have a different bound for z <1 and z>1 (you can first look at the simpler case of log(r) to understand why this happens). For r>1 you can use the result mentioned in class for error of an alternating series. The case z <1 is much harder. You should consider what dominates F(2) as z+0*. (d) Consider the results from (c). From this you should be able to conclude that the problem is roundoff error rather than truncation error. Why? Explain what is making the roundoff errors so large and give an argument as to whether the Taylor series or the directly computed function is more accurate.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Algebra and Trigonometry (6th Edition)
Algebra and Trigonometry (6th Edition)
Algebra
ISBN:
9780134463216
Author:
Robert F. Blitzer
Publisher:
PEARSON
Contemporary Abstract Algebra
Contemporary Abstract Algebra
Algebra
ISBN:
9781305657960
Author:
Joseph Gallian
Publisher:
Cengage Learning
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Algebra And Trigonometry (11th Edition)
Algebra And Trigonometry (11th Edition)
Algebra
ISBN:
9780135163078
Author:
Michael Sullivan
Publisher:
PEARSON
Introduction to Linear Algebra, Fifth Edition
Introduction to Linear Algebra, Fifth Edition
Algebra
ISBN:
9780980232776
Author:
Gilbert Strang
Publisher:
Wellesley-Cambridge Press
College Algebra (Collegiate Math)
College Algebra (Collegiate Math)
Algebra
ISBN:
9780077836344
Author:
Julie Miller, Donna Gerken
Publisher:
McGraw-Hill Education