Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 3 : True and Approximate Relative Error ( 1 5 pts ) Solve problem 3 . 7 from the Chapra and Canale text (

Task 3: True and Approximate Relative Error (15 pts)
Solve problem 3.7 from the Chapra and Canale text (below) and follow the supplemental instructions
below. To clarify what the problem is asking, you are to compute the true percent relative error after
every iteration (there should be 20 of these error values) and the approximate percent relative error
between successive approximations (so there should be 19 of these).
3.7 Evaluate e-5 using two approaches,
e-x=1-x+x22-x33!+cdots
and
e-x=1ex=11+x+x22+x33!+cdots
and compare with the true value of 6.73794710-3. Use 20 terms to evaluate each series and
compute true and approximate relative errors as terms are added.
You will:
Create a Python file called A1_task3.py that:
a. Defines a Python function (or two) to approximate e-x using both approaches. Your
function(s) should have at least two inputs: the value of x(which will equal 5 in this case)
and the number of terms to use, n. In each of the approaches, '1' counts as the first term.
b. Uses the function(s) in part a. to solve the textbook problem.
c. Graphs the results (approximation value, true percent relative error, and approximate
percent relative error (y-axis) as functions of the number of terms (x axis) used in the
approximation). Plots need to have sufficient resolution on the axes.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building The Data Warehouse

Authors: W. H. Inmon

4th Edition

0764599445, 978-0764599446

More Books

Students also viewed these Databases questions

Question

The fear of making a fool of oneself

Answered: 1 week ago

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago