glitinosim3

2022-07-04

Let $f\left(x\right)=arctan\left(x\right)$. Use the derivative approximation:
${f}^{\prime }\left(x\right)=\frac{8f\left(x+h\right)-8f\left(x-h\right)-f\left(x+2h\right)+f\left(x-2h\right)}{12h}$ to approximate ${f}^{\prime }\left(\frac{1}{4}\pi \right)$ using ${h}^{-}1$ = $2,4,8$ . Try to take $h$ small enough that the rounding error effect begins to dominate the mathematical error. For what value of h does this begin to occur?

Tristin Case

Expert

To get an idea how good the approximation is, you can calculate the result for the special functions $f\left(x\right)=1,x,{x}^{2},{x}^{3}\cdots$. Here, we get the exact result for $f\left(x\right)=1,x,{x}^{2},{x}^{3},{x}^{4}$, so the formula is exact upto degree $4$ (Polynomials upto degree $4$ are differentiated exactly by the formula)
For $f\left(x\right)={x}^{5}$, you get ${f}^{\prime }\left(x\right)=5{x}^{4}-4{h}^{4}$, so you have an error of $4{h}^{4}$