Question: PYTHON question: Libraries we've learned are numpy, matplotlib, scipy.optimize, math, int, float...basic stuff. Exercise 5.1 (5 points) (a) Write a function that takes a list

PYTHON question:

PYTHON question: Libraries we've learned are numpy, matplotlib, scipy.optimize, math, int, float...basic

Libraries we've learned are numpy, matplotlib, scipy.optimize, math, int, float...basic stuff.

Exercise 5.1 (5 points) (a) Write a function that takes a list of function values fi and the spacing dx between them, and returns a list of values for the first derivative of the function. Test your function by giving it a list of known values "sin(x)", and making a graph for the difference between the output of your function and the expected results. (b) Make a similar graph as above but instead use for the derivative the Numpy built-in "gradientO" function

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 Databases Questions!