Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . 7 Evaluate e - 3 using two approaches, e - x = 1 - x + x 2 2 - x 3 3

3.7 Evaluate e-3 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_ task 3. 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.
By hand, calculate true and approximate relative error (expressed as percentages) for both approaches using 1,2, and 3 terms. Ensure your hand calculations match your Python results.
a. Show your work for credit.
b. Report true and approximate relative error (expressed as percentages) for both approaches in table form for the various number of terms (i.e.,1,2 and 3) used.
Answer the following question: Of these two approximation methods, which one would you consider more desirable and why? Please explain. Refer to figures as necessary when answering.
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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

Students also viewed these Databases questions

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago