>If f(x)=sinx over the interval 0>x>pi/2 is wanted to be
>approximated by g(x)=px (p is a constant) what value of p
>would you choose to make:
>int.pi/2->0 f(x)dx= int.pi/2->0 g(x)dx ?
This is trivial. Just carry out the integration in
int((f - g)2)dx
to obtain a quadratic polynomial in p. Find the minimum of the parabola.
>and then what value of p would you choose to make:
>the maximum value of |f(x)-g(x)| in the interval as small as
This falls under the Chebyshev theorem. There will be three points where the maxumum is achieved. See, e.g. P. Davis, Interpolation and Approximation, ch 7.
>and to make:
>int.pi/2->0^2dx as small as possible??