Least squares approximation of a function

The best linear approximation of a function f (x)near a point cis the tangent line at (c, f (c)).In spite of the well‐known measure of the error in the approximation in elementary calculus, it is not clear for how wide an interval about cis the tangent line the best. A fairly strong competitor is the least squares linear approximation of the function that can be defined over any interval (β, α) containing c.General formulae are derived for the slope and y‐intercept of the least squares line. A comparison is made with the tangent line approximations in the special cases of the sine function and the cube root function for selected values of c, βand α. Numerical results indicate that the least squares approximation is generally better if xis relatively far from c.Values of care subject to the common restriction that f(c) must be readily computed. It is shown that, for given x,it is not always possible to find an appropriate csuch that the resulting tangent line approximation is guaranteed to be superior to t...