Consider sampled at equally spaced points on

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists

Scientific Computing for Physicists, Ch Spectra with error bars: the fast transform, convolution and spectral estimation

Problem

Consider f(x)=sin⁡(3x)f(x) = \sin(3x) sampled at N=8N = 8 equally spaced points on [0,2π)[0, 2\pi), so Δx=π/4\Delta x = \pi/4. ((a)) Explain why the spectral derivative of these samples reproduces the exact derivative f′(x)=3cos⁡(3x)f'(x) = 3\cos(3x) at every grid point, and give its numerical error (state it as zero to rounding). ((b)) Compute the maximum, over the grid, of the error made by the standard central-difference formula Dcf(xj)=[f(xj+Δx)−f(xj−Δx)]/(2Δx)D_c f(x_j) = [f(x_j+\Delta x) - f(x_j-\Delta x)]/(2\Delta x) applied to the same samples.

Browse the problem library