程序代写代做代考 a) It approximates the second derivative of f at x.

a) It approximates the second derivative of f at x.
b)
sub GetOptimalH{
my $ep = shift @_;
my $b = shift @_;
my $oph = (240 * $ep / $b) ** (1.0 / 6);
print “optimal h is: $oph\n”; }
GetOptimalH(2*(10**(-20)), 1);
c) f’’(x) = Q(h) + E(h, f)
E(h, f) is the error, from taylor expansion, we can get
E( f, h) = 16 * epsilon / (3*pow(h, 2)) + pow(h, 4) * pow(f(c), 6) / 90, where c is in [x − 2h, x + 2h].
let | pow(f(c), 6) | <= M, then |E(f,h)| <= 16*epsilon/(3*pow(h,2)) + pow(h,4)* M/90, When h is small, the first term is large due to the round-off error. When h is large, the second term is large due to the truncation error. When h = pow( (240* epsilon), 1/6), it is optimal.