It is required to approximate a given function f(x), over the interval 0⩽x⩽1, by the linear function λx, where λ is chosen to minimise
∫01(f(x)−λx)2dx. Show that
λ=3∫01xf(x)dx. The residual error, R, of this approximation process is such that
R2=∫01(f(x)−λx)2dx. Show that
R2=∫01(f(x))2dx−31λ2. Given now that f(x)=sin(πx/n), show that (i) for large n, λ≈π/n and (ii) limn→∞R=0.
Explain why, prior to any calculation, these results are to be expected.
[You may assume that, when θ is small, sinθ≈θ−θ3/6 and cosθ≈1−θ2/2.]