Question: PLEASE PROVIDE CODE IN PYTHON. (a) (15%) Write and run a computer program to approximate the derivative of function f at point x defined by

PLEASE PROVIDE CODE IN PYTHON.

PLEASE PROVIDE CODE IN PYTHON. (a) (15\%) Write and run a computer

(a) (15\%) Write and run a computer program to approximate the derivative of function f at point x defined by the equation f(x)=limh0hf(x+h)f(x). Try f(x)=sin(x) at x=0.5 and hn=0.5hn1,h0=1,n=1,2,,30. Compute absolute errors of the approximation using the formula error =y f(x), where yn is yn is an output of the program in iteration n. Plot the errors on using a log-scale, i.e., the axes of the plot should be log10 error versus log10h. Analyze the results. Repeat the same experiment for f(x)=x1. (b) (5\%) Find a way to calculate accurate values for f(x)=x21+x21xtan(x)x2sin(x). Determine limx0f(x). Hint: Use Taylor series expansions sin(x)tan(x)=x3!x3+5!x5=x+3x3+152x5+

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!