Question: Problem 2 ( 1 5 points ) ( Core Course Outcomes 5 & 1 1 ) / ( M ) at labGrader Consider the function

Problem 2(15 points)(Core Course Outcomes 5 & 11)/(M)at labGrader
Consider the function
f(x)-cos(x),
where the argument is in radians, and its analytical second derivative
(d^(2))/(dx^(2))f(x)--cos(x)
defined on the interval 1=x=40 evaluated at M_(k)+1 equally spaced points x_(i) where M_(k)-2^(k). Use function
mySecondDerivativeOrder 3 to calculate the crror e_(i) of the finite difference approximation of d^(2)(f)/(d)x^(2) at each point x_(i).
For k-7,8,9,dots,20,21, plot the entry-wise 3-norm L_(k) of the error e_(i)(see Exam 2) as a function of h_(k) using a logarithmic
scale for both L_(k) and h_(k).
Notes for the MatlabGrader script submission:
Comment out clear or clear all in your script when submitting to MatlabGrader.
Generate and store the figure handle examFigl for the graph before doing any plotting commands, using
examFigl = figure(1);
Properly label both axis using the appropriate variable names (h,L).
Do not include the source code for any functions in your script submission. Necessary functions are provided on Matlab-
Grader.
Problem 2 ( 1 5 points ) ( Core Course Outcomes 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!