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:
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
Get step-by-step solutions from verified subject matter experts
