Question: Please provide with full python code thanks - Central differencing method involves three points. Instead, we can take two points from each sides of x,
Please provide with full python code thanks


- Central differencing method involves three points. Instead, we can take two points from each sides of x, and derive a five-point formula: f(x)=12h1(f(x2h)8f(xh)+8f(x+h)f(x+2h))+O(h4) This improves the accuracy to O(h4). First derivative of sinx using five-point formula (much better compare with result from forward differencing in P.5) Q2. Five-point central differencing ( 20 points) (a) Derive the five-point central differencing formula in Lecture Note\#4 P.11 and show that the error is of order h4. (b) Write a Python program that calculates the first derivative of f(x)=cosx using the fivepoint central differencing formula. Make a plot of the numerical result versus x. Plot also sinx on the same graph to benchmark your numerical result. Label your graph properly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
