Minimax polynomials?

442 Views Asked by At

My linear algebra text discusses the solution to minimization problems by use of the Gram-Schmidt procedure, which produces the an approximation such as $$\sin{x} = \frac{105(1485 - 153\pi^2 + \pi^4)}{8\pi^6}x - \frac{315(1155 -125\pi^2 + \pi^4 )}{4\pi^8}x^3 + \frac{693(945 - 105 \pi^2 + \pi^4)}{8\pi^{10}}x^5$$

by minimization of the inner product $$\int_{-\pi}^{\pi} (f(x) - \sin{x} )^2 dx$$

I later read this article, and the algorithms discussed can easily be applied to the sine function. How is this procedure different from the one above?

1

There are 1 best solutions below

3
On

The objective function is not the same; both methods can be applied but the one you mention is really simpler.

Let me try to explain why using simple words.

Suppose that you want to fit $\sin(x)$ between $-\pi$ and $\pi$ using a pentic polynomial without intercept and with only odd powers. You could generate a table of $n$ points $\Big(x_i,\sin(x_i)\Big)$ and proceed to a multilinear square fit procedure. If you consider an infinite number of data points, minimizing the sum of squares of residuals is equivalent to minimizing $$F=\int_{-\pi}^{\pi} (f(x) - \sin{x} )^2 dx$$ So, consider that $f(x)=a x+bx^3+cx^5$. Replacing and integrating between bounds leads to $$F=\frac{2 \pi ^3 a^2}{3}+\frac{2}{7} \pi ^7 \left(2 a c+b^2\right)-4 \pi \left(a+\left(\pi ^2-6\right) b+\left(120-20 \pi ^2+\pi ^4\right) c\right)+\frac{4}{5} \pi ^5 a b+\frac{4}{9} \pi ^9 b c+\frac{2 \pi ^{11} c^2}{11}+\pi$$ and now you want to minimize $F$; so you take the partial derivatives with respect to $a,b,c$ and you set them equal to $0$. The derivatives are given by $$\frac{dF}{da}=\frac{4 \pi ^3 a}{3}+\frac{4 \pi ^5 b}{5}+\frac{4 \pi ^7 c}{7}-4 \pi=0$$ $$\frac{dF}{db}=\frac{4 \pi ^5 a}{5}+\frac{4 \pi ^7 b}{7}+\frac{4 \pi ^9 c}{9}-4 \pi \left(\pi ^2-6\right)=0$$ $$\frac{dF}{dc}=\frac{4 \pi ^7 a}{7}+\frac{4 \pi ^9 b}{9}+\frac{4 \pi ^{11} c}{11}-4 \pi \left(120-20 \pi ^2+\pi ^4\right)=0$$ This makes a system of three linear equations in $a,b,c$ for which the solution is $$a=\frac{105 \left(1485-153 \pi ^2+\pi ^4\right)}{8 \pi ^6}$$ $$b=-\frac{315 \left(1155-125 \pi ^2+\pi ^4\right)}{4 \pi ^8}$$ $$c=\frac{693 \left(945-105 \pi ^2+\pi ^4\right)}{8 \pi ^{10}}$$ For these values, we find $$F=\frac{-19646550+4365900 \pi ^2-287280 \pi ^4+5040 \pi ^6-42 \pi ^8+\pi ^{10}}{\pi ^9} \simeq 0.000116169$$ If Taylor expansion had been used, the result would heve been $$F=-11 \pi +2 \pi ^3-\frac{\pi ^5}{6}+\frac{4 \pi ^7}{315}-\frac{\pi ^9}{1620}+\frac{\pi ^{11}}{79200} \simeq 0.118702$$ which is almost $1000$ times larger.

By the way, there is a typo in your formula or in your book : $603$ should be $693$.

Added later to this answer

Just for personal fun, I continued the same exercise adding the term $x^7$; for this case $F=1.54037*10^{-7}$. Adding the term $x^9$, $F=8.40998*10^{-11}$. This is really quite impressive.