Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please I need help with writing this matlab code for question 1.a) and 1.b), so please help me with this also please include comments explaining
Please I need help with writing this matlab code for question 1.a) and 1.b), so please help me with this also please include comments explaining the code and providing detail to it that explains what is do what and what does this variable represents, etc.
(a) Let Pn(x) be the nth-order Taylor Polynomial for f(x)=e2x about x=0. Find n so that Pn(x) is within 104 of e2x for all x[1,1]. (b) Write MATLAB code that takes as input a positive parameter k and a desired error threshold err, and returns the first value n so that the nth-order Taylor Polynomial for f(x)=ekx about x=0 is within err of ekx for all x[1,1]. Use your code to reproduce your answer to question 1 (a). HINT: Your code does not need to be fancy at all! By mimicking your theoretical analysis from 1(a), the computational challenge in finding the correct value for n should be quite elementary
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