Problem 2 (15 points) (Core Course Outcomes 5 & 11)/MatlabGrader Consider the function f(x) = cos(x), where the argument is in radians, and its analytical second derivative d² = = cos(x) dx2f(x) 2. Use function defined on the interval 1 ≤ x ≤ 40 evaluated at Mk + 1 equally spaced points xi where Mk = mySecondDerivative Order 3 to calculate the error e; of the finite difference approximation of d² f/dx² at each point xi. For k = 7,8,9,..., 20, 21, plot the entry-wise 3-norm Lk of the error eż (see Exam 2) as a function of hk using a logarithmic scale for both Lk and hk. 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 examFig1 = 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. Required submission: well commented script source code submitted to Matlab Grader using the Canvas link for Exam 5 - Problem 2

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
Problem 2 (15 points) (Core Course Outcomes 5 & 11)/MatlabGrader
Consider the function
f(x) = cos(x),
where the argument is in radians, and its analytical second derivative
d²
= = cos(x)
dx2f(x)
2. Use function
defined on the interval 1 ≤ x ≤ 40 evaluated at Mk + 1 equally spaced points xi where Mk =
mySecondDerivative Order 3 to calculate the error e; of the finite difference approximation of d² f/dx² at each point xi.
For k = 7,8,9,..., 20, 21, plot the entry-wise 3-norm Lk of the error eż (see Exam 2) as a function of hk using a logarithmic
scale for both Lk and hk.
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
examFig1 = 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.
Required submission:
well commented script source code submitted to Matlab Grader using the Canvas link for Exam 5 - Problem 2
Transcribed Image Text:Problem 2 (15 points) (Core Course Outcomes 5 & 11)/MatlabGrader Consider the function f(x) = cos(x), where the argument is in radians, and its analytical second derivative d² = = cos(x) dx2f(x) 2. Use function defined on the interval 1 ≤ x ≤ 40 evaluated at Mk + 1 equally spaced points xi where Mk = mySecondDerivative Order 3 to calculate the error e; of the finite difference approximation of d² f/dx² at each point xi. For k = 7,8,9,..., 20, 21, plot the entry-wise 3-norm Lk of the error eż (see Exam 2) as a function of hk using a logarithmic scale for both Lk and hk. 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 examFig1 = 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. Required submission: well commented script source code submitted to Matlab Grader using the Canvas link for Exam 5 - Problem 2
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,