Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use Matlab, please. The function e-* can be approximated by its McLaurin series expansion as follows (note the alternating + and -): . e-2 ~1-r+
Use Matlab, please.
The function e-* can be approximated by its McLaurin series expansion as follows (note the alternating + and -): . e-2 ~1-r+ 20170 23 + 3! + n! 4 Alternatively, note that e- e. Thus, e- can also be apporximated by 1 over the McLaurin series expansion of e". That is, zn + n! 1 + x + + + Approximate e-2.5 using both approaches above for n = 1, 2, 3, 4, 5, 6 and 7. Note, n is the degree of the polynomial not the number of terms. So here you use 2 terms, then 3 terms, ..., and finally 8 terms. Compare each approximation to the true value of e-2.5 = 0.082084998...., using the true relative error. What conclusions can you make about the two approaches? You may do this by hand with a calculator or program it using either MATLAB or Python. Note, I have done something similar in lecture 2 which you may use. DELIVERABLES: All your work. If programmed, copies of functions and results plus the corresponding .m or .py filesStep 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