

IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU..ALL THE BEST..
AS FOR GIVEN DATA..
code:
clc
clear all
close all
x0=1.2;
h=-20:1:0;
h=10.^h;
f2=@(h) 2*cos((x0+h)/2).*sin((x0-h)/2);
v=f2(h);
fprintf('Values of h\t\tValues of f''(1.2)\n');
for i=1:length(v)
fprintf('%e\t%.17f\n',h(i),v(i));
end
I HOPE YOU UNDERSTAND..
PLS RATE THUMBS UP..ITS HELPS ME ALOT..
THANK YOU...!!
2. The function fi(xo.h)= sin(xo +h)- sin(xo) can be transformed into another form. f2(xo,h), using the trigonom...
2. The function fi(xo,h) = sin(xo+h)-sin(xo) can be transformed into another form., f2(xo,h), using the trigonometric formula sin()-sin() 2 cos sin Thus, fi and f2 have the same values, in exact arithmetic, for any given argument values xO and h. (a) Derive f2(xo,h). (b) Suggest a formula that avoids cancellation errors for computing the approximation (f(xo +h)- f(xo))/h to the derivative of f(x) sin(x) at x xo. Write a MATLAB pro- gram that implements your formula and computes an approximation...
In Python 3.6
Classes and Methods: A class for estimating the derivative of a function f) at the form: takes where h is a small change in x. The goal of this exercise is to use the formula above to differentinte a mat hematical function f(x) implemented as a Python function f(x) Implement class Diff with two special methods. The--init--() method takes in function object and also an optional argument h. The default value of h is le-4. Implement also...