Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in matlab with the code please Part A: Roundoff Error Calculate ex for x=2 using from 1 to 20 significant figures for the evaluation of
in matlab with the code please
Part A: Roundoff Error Calculate ex for x=2 using from 1 to 20 significant figures for the evaluation of x (i.e. x=1, x=1.4,x=1.41,x=1.4142135623730950488 ) Compute the roundoff error for each value of x when compared to the true value of e2 and present a table with the results including the value used for x, the calculation of ex and the roundoff error. Report the tool(s) you used to calculate these values and briefly state any observations. Part B: Truncation Error The function ex can be represented using the following Maclaurin series, which becomes more accurate for larger values of n : ex=i=0nxx,asn or ex=1+x+21x2+32x2++xx2 Plot this series for n=0,n=1,n=2,n=3,n=4, and n=5, against the exact solution ex in MATLAB with all seven curves on the same plot. Set the x limits between 0 and 1,5 and the y limits between 0 and 4.5 and be sure to include an appropriate legend and title. Again, briefly state any observations. Compute the truncation error for n=0 through n=5 at x=2 and present a table with the results including the number of terms used in the series, the calculation of ex and the truncation error. Report the tool(s) you used to calculate these values and briefly state any observations. Bonus: Create the above table through n=19 Part C: Combined Error Compute the combined roundoff and truncation error for all possible combinations of 120 significant figures for x=2 and the Maclaurin series above for n=0 through n=5 as well as the exact equation ex and present a table with the results, with the number of significant figures used in the row labels, and the number of terms in the Maclaurin series in the column labels. Your table should look something like the following: Report the tool(s) you used to calculate these values and briefly state any observations. Bonus: Create the above table through 20 Maclaurin terms. Be sure to format your tables (or multiple tables) so they are legible in print form 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