Problem 1
Compute forward and backward difference approximations of \(O(h)\) and \(O\left(h^{2}\right),\) and central difference approximations of \(O\left(H^{2}\right)\) and \(O\left(h^{4}\right)\) for the first derivative of \(y=\sin x\) at \(x=\pi / 4\) using a value of \(h=\pi / 12 .\) Estimate the true percent relative error \(\varepsilon_{t}\) for each approximation.
Problem 3
Use centered difference approximations to estimate the first and second derivatives of \(y=e^{x}\) at \(x=2\) for \(h=0.1 .\) Employ both \(O\left(H^{2}\right)\) and \(O\left(h^{4}\right)\) formulas for your estimates.
Problem 4
Use Richardson extrapolation to estimate the first derivative of \(y=\cos x\) at \(x=\pi / 4\) using step sizes of \(h_{1}=\pi / 3\) and \(h_{2}=\pi / 6 .\) Employ centered differences of \(O\left(H^{2}\right)\) for the initial estimates.
Problem 8
Compute the first-order central difference approximations of \(O\left(h^{t}\right)\) for each of the following functions at the specified location and for the specified step size: (a) \(y=x^{3}+4 x-15\) \(\quad\) at \(x=0, \quad h=0.25\) (b) \(y=x^{2} \cos x\) \(\quad\) at \(x=0.4, h=0.1\) (c) \(y=\tan (x / 3)\) \(\quad\) at \(x=3, \quad h=0.5\) (d) \(y=\sin (0.5 \sqrt{x}) / x\) \(\quad\) at \(x=1, \quad h=0.2\) (e) \(y=e^{x}+x\) \(\quad\) at \(x=2, \quad h=0.2\) Compare your results with the analytical solutions.
Problem 9
The following data was collected for the distance traveled versus time for a rocket: $$\begin{array}{l|llllll} t, s & 0 & 25 & 50 & 75 & 100 & 125 \\ \hline y, k m & 0 & 32 & 58 & 78 & 92 & 100 \end{array}$$ Use numerical differentiation to estimate the rocket's velocity and acceleration at each time.
Problem 13
Recall that for the falling parachutist problem, the velocity is given by $$v(t)=\frac{g m}{c}\left(1-e^{-(c / m) t}\right) \quad (P23.13a)$$ and the distance traveled can be obtained by $$d(t)=\frac{g m}{c} \int_{0}^{t}\left(1-e^{-(c / m) t}\right) d t \quad (P23.13b)$$ Given \(g=9.81, m=70,\) and \(c=12,\) (a) Use MATLAB or Mathcad to integrate Eq. (P23.13a) from \(t=0\) to 10. (b) Analytically integrate Eq. (P23.13b) with the initial condition that \(d=0\) at \(t=0 .\) Evaluate the result at \(t=10\) to confirm (a). (c) Use MATLAB or Mathcad to differentiate Eq. (P23.13a) at \(t=10.\) (d) Analytically differentiate Eq. (P23.13a) at \(t=10\) to confirm (c).
Problem 18
Use the diff command in MATLAB and compute the finite-difference approximation to the first and second derivative at each \(x\) -value in the table below, excluding the two end points. Use finite-difference approximations that are second-order correct, \(O\left(\Delta x^{2}\right).\) $$\begin{array}{c|ccccccccccc} x & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline y & 1.4 & 2.1 & 3.3 & 4.8 & 6.8 & 6.6 & 8.6 & 7.5 & 8.9 & 10.9 & 10 \end{array}$$
Problem 20
Use a Taylor series expansion to derive a centered finite-difference approximation to the third derivative that is second-order accurate. To do this, you will have to use four different expansions for the points \(x_{i-2}, x_{i-1}, x_{i+1},\) and \(x_{i+2}\). In each case, the expansion will be around the point \(x_{i}\) The interval \(\Delta x\) will be used in each case of \(i-1\) and \(i+1\), and \(2 \Delta x\) will be used in each case of \(i-2\) and \(i+2 .\) The four equations must then be combined in a way to eliminate the first and second derivatives. Carry enough terms along in each expansion to evaluate the first term that will be truncated to determine the order of the approximation.
Problem 21
Use the following data to find the velocity and acceleration at \(t=10\) seconds: $$\begin{array}{l|ccccccccc} \text { Time, } t, s & 0 & 2 & 4 & 6 & 8 & 10 & 12 & 14 & 16 \\ \hline \text { Position, } x_{i}, \mathrm{m} & 0 & 0.7 & 1.8 & 3.4 & 5.1 & 6.3 & 7.3 & 8.0 & 8.4 \end{array}$$ Use second-order correct (a) centered finite-difference, (b) forward finite- difference, and (c) backward finite-difference methods.
Problem 25
You have to measure the flow rate of water through a small pipe. In order to do it, you place a bucket at the pipe's outlet and measure the volume in the bucket as a function of time as tabulated below. Estimate the flow rate at \(t=7\) s. $$\begin{array}{l|cccc} \text { Time, } s & 0 & 1 & 5 & 8 \\ \hline \text { Volume, } \mathrm{cm}^{3} & 0 & 1 & 8 & 16.4 \end{array}$$