Exercise: error of the sin x ≈ x approximation

Computing the numerical and percentage error when approximating sin(π/8)\sin(\pi/8) by π/8\pi/8.

Statement and solution

Example

For small values, sinxx\sin x\approx x. Compute the numerical and percentage error of using that approximation at x=π/8x=\pi/8.

  1. Analytic and approximate solution:

    y=sin ⁣(π8)=222,y^=π8y=\sin\!\left(\tfrac{\pi}{8}\right)=\frac{\sqrt{2-\sqrt2}}{2},\qquad \hat y=\frac{\pi}{8}
  2. Numerical error (rounded to six decimals):

    ϵ=222π8=0.010016\epsilon=\left|\frac{\sqrt{2-\sqrt2}}{2}-\frac{\pi}{8}\right|=0.010016

Percentage error:

ϵr=1000.01001622/2=2.617306%\epsilon_r=100\left|\frac{0.010016}{\sqrt{2-\sqrt2}/2}\right|=2.617306\,\%