Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3 . 7 Evaluate e - 3 using two approaches, e - x = 1 - x + x 2 2 - x 3 3
Evaluate using two approaches,
cdots
and
and compare with the true value of Use terms to evaluate each series and compute true and approximate relative errors as terms are added.
You will:
Create a Python file called A task py that:
a Defines a Python function or two to approximate using both approaches. Your functions should have at least two inputs: the value of which will equal in this case and the number of terms to use, In each of the approaches, counts as the first term.
b Uses the functions in part a to solve the textbook problem.
c Graphs the results approximation value, true percent relative error, and approximate percent relative error axis as functions of the number of terms 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 and 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 ie and 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started