Question: 1. Create a python function func1 that calculates (x) = sin(x) exp(-5) Make a plot for x (-2.5, 1) using an x array representing 100

1. Create a python function func1 that calculates (x) = sin(x) exp(-5) Make a plot for x (-2.5, 1) using an x array representing 100 intervals. 2. Calculate the derivative numerically using this same equidistant array in x with, once with h = 0.2 and a second time with h = 0.01 . Make a plot of both derivatives using different line styles and all necessary plot decorations 3. Calculate the sum of the difference of the derivative with h - 0.01 minus the one with h = 0.2, round to two decimals and enter the answer into question deriv-diffi. 1. Write a function deriv2 that implements the 3rd-order derivative according to Egn. 3 in today's class notebook. Calculate the derivative with derive with the same x array and function func1 from Activity 1 and add that derivative with a dot-dashed line to the derivative figure in Activity 1. 2. Calculate again the sum of the difference of the derivative with h = 0.01 with derivi minus this one the one with h = 0.2 and deriv2, round to two decimals and enter the answer into question deriv2-diff. What is your observation regarding the accuracy of the deriv2 vs. deriv 3. Use the x array and the derivative array calculated in this problem to find the x locations of the three extrema in the function funci. One possibility is to find the array index pointing at the location where the sign of the derivative changes. Between the corresponding value pairs is the root. Interpolate linearly between these two points for an accurate determination of the x coordinate of the three extreme. Add the three values, round to two digits and enter into question deriv-roots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
