find interpolation polynomial for $f(x) = x^4+3x^2$ of degree $\le3$ , such that $max_{x\in[-1,1]}|f(x)-p(x)|$ is minimal

237 Views Asked by At

find interpolation polynomial for $f(x) = x^4+3x^2$ of degree $\le3$ , such that $max_{x\in[-1,1]}|f(x)-p(x)|$ is minimal.

Well I think I don't understand Chebyshev's interpolation points correctly, I tried to take Chebyshev's polynomial of order 4 ($T_4(x)$), to get 4 roots (interpolation points): $\{x_k:=cos(\frac{\pi}{8} +\frac{\pi}{4}k) :k=0,1,2,3 \}$, Yet when calculating $f[x_0],f[x_0,x_1],f[x_0,x_1,x_2], f[x_0,x_1,x_2,x_3]$ in order to get the interpolation polynomial, due to the fact that the roots are $x_0 = -x_3 , x_1 =-x_2$ and the function $x^4+3x^2$, calculated in $x_0,x_1,x_2,x_3$ leads to $f[x_0]=f[x_3] , f[x_1]=f[x_2]$ , thus $f[x_0,x_1,x_2,x_3] =0 $ and I get a interpolation polynomial of order 2, which doesn't best approximate $f(x)$. I was sure that Chebyshev's roots are the only interpolation points which solves the min-max problem of $|f(x)-p(x)|$, but I feel that, there is something which I don't fully understand here.

Any help or reference would be appreciated.

2

There are 2 best solutions below

3
On BEST ANSWER

The interpolation method finds the unique polynomial of degree 3 or less that has the same value as $f(x)$ at $x_0,x_1,x_2$ and $x_3$, the roots of $T_4(x)=8x^4-8x^2+1$.

Since $f(x)$ is a polynomial of degree 4, it can be written as $\sum_{i=0}^4 a_i T_i(x)$, where comparison of the coefficients shows that $a_4=\frac18$.

Therefore the required approximation is $f(x)-\frac 18 T_4(x)$.

0
On

The solution to the uniform approximation problem will need to satisfy the Haar conditions $$ f(x_k)-p(x_k)=(-1)^kr $$ for 5 distinct points in the interval which also realize the maximum $|r|$ of $|f(x)-p(x)|$. The Chebyshev approximation usually provides a good starting point for the Remez exchange algorithm. It may be useful to compute the further stages still in terms of the Chebyshev polynomials as basis.


As result of solving this as general non-linear problem I get the results

xr = -0.707106947599892  -1.1668963128834e-16     0.707106947599893
r =   0.125000072497002
p =  -4.05725754051219e-17  4   2.33379262604217e-16  -0.125000072497002

essentially replacing $x^4$ with $x^2-\frac18$. The plots confirm the solution and Haar conditions

enter image description here

using octave/matlab's fsolve

function eqn = haar(u, f)
    x = sort(u(1:3)); r = u(4); p = u(5:8);
    df = polyder(f); dp=polyder(p);

    fp = @(x) polyval(f,x)-polyval(p,x);
    dfp = @(x) polyval(df,x)-polyval(dp,x);
    eqn = [ fp(-1)-r,
            fp(x(1))+r,
            fp(x(2))-r,
            fp(x(3))+r,
            fp(1)-r,
            dfp(x(1)),
            dfp(x(2)),
            dfp(x(3))
          ];
end

f = [1,0,3,0,0];
u = fsolve(@(u) haar(u,f), [-0.8,0.0, 0.8, 1, 0, 0, 0, 0]);     
xr = u(1:3)
r = u(4)
p = u(5:8)