How approximate $p_n(x)$ to minimize the value of integral

621 Views Asked by At

I have a continues function $f:[a,b]\to \mathbb{R}$. And want to approximate this function by $p_n(x)$ , ($p_n(x)$ is a polynomial of maximum degree $n.$)

To do this, the value of below integral must be minimized.

Must the value of $\int\limits_0^1 |f(x)-p_n(x)|\, dx$ be minimize.

Whit the help of optimization , how this problem solved? how can determine the $p_n(x)$?

1

There are 1 best solutions below

6
On

If one considers the linear space $P_n$ of polynomials with degree $\leq n$, one can, via the Gram-Schmidt process, create an orthonormal basis of polynomials with respect to the inner product

$$\langle f,g \rangle = \int_0^1 f(t)g(t) dt.$$

Let these polynomials be $u_0,\cdots,u_n$. Then, one can project $f$ onto $P_n$ as

$$f_n(x) = \sum_{i=0}^n \langle f,u_i\rangle u_i(x).$$

This approximation $f_n(x)$ is the polynomial in $P_n$ that minimizes

$$\int_0^1 |f(x)-f_n(x)|^2 dx.$$

(As an aside, this is very similar to how a periodic function's Fourier series is constructed, using the already orthogonal basis $1,\cos(x),\sin(x),\cos(2x),\sin(2x),\cdots$ of the trigonometric polynomials.)